diff --git a/public/style.css b/public/style.css index 9661b5a..bc35ad7 100644 --- a/public/style.css +++ b/public/style.css @@ -56,8 +56,8 @@ footer { } #buzzer { - width: 500px; - height: 500px; + width: 95vw; + height: 95vw; margin: 0 auto; border-radius: 500px; background: red; @@ -78,6 +78,7 @@ h2 img { figure.participant { display: inline-block; + transition: ease-in all .2s; } figure.participant img { @@ -89,5 +90,6 @@ figure.participant figcaption { } .buzzed { - background: limegreen; + background: yellow; + transform: scale(1.3); } \ No newline at end of file diff --git a/room.js b/room.js index 26bff3f..ce9046d 100644 --- a/room.js +++ b/room.js @@ -50,7 +50,7 @@ function addAudienceWS(roomId, ws) { function buzz(roomId, participant) { let room = getOrCreateRoom(roomId); room.participants.forEach(p => { - if (p.ws) { + if (p.ws && p.participantId !== participant.participantId) { p.ws.send(JSON.stringify({ type: "buzz", participant: participant.participantName diff --git a/views/room.handlebars b/views/room.handlebars index dcb3740..5fa9991 100644 --- a/views/room.handlebars +++ b/views/room.handlebars @@ -47,7 +47,7 @@ alert(`[error] ${error.message}`); }; - document.getElementById('buzzer').addEventListener('click', function() { + document.getElementById('buzzer').addEventListener('touchstart', function() { socket.send(JSON.stringify({ type: "buzz" }));