🌶🎥 Checkpoint
./views/room.handlebars:530995/80 ./views/audience.handlebars:530995/371 ./server.js:530995/328 ./room.js:530995/345 ./public/style.css:530995/79
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
socket.onmessage = function(event) {
|
||||
let msg = JSON.parse(event.data);
|
||||
if (msg.type === "buzz") {
|
||||
beep();
|
||||
let buzzed = document.getElementById(`p-${msg.participant.participantId}`);
|
||||
buzzed.classList.add('buzzed');
|
||||
setTimeout(() => buzzed.classList.remove('buzzed'), 5000)
|
||||
@@ -42,10 +43,11 @@
|
||||
window.location = window.location;
|
||||
}
|
||||
};
|
||||
|
||||
socket.onerror = function(error) {
|
||||
alert(`[error] ${error.message}`);
|
||||
};
|
||||
|
||||
function beep() {
|
||||
window.navigator.vibrate(500);
|
||||
new Audio("https://cdn.glitch.com/81aebabf-079d-4504-b844-d90d643962c4%2FGame-show-buzzer-sound-effect.mp3?v=1586451448374").play();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -62,6 +62,7 @@
|
||||
});
|
||||
|
||||
function showMessage(msg) {
|
||||
window.navigator.vibrate(500);
|
||||
document.getElementById('buzzer').disabled = true;
|
||||
let mb = document.getElementById('messageBox');
|
||||
mb.innerHTML = msg;
|
||||
@@ -73,6 +74,7 @@
|
||||
}
|
||||
|
||||
function beep() {
|
||||
window.navigator.vibrate(500);
|
||||
new Audio("https://cdn.glitch.com/81aebabf-079d-4504-b844-d90d643962c4%2FGame-show-buzzer-sound-effect.mp3?v=1586451448374").play();
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user