diff --git a/public/style.css b/public/style.css index 471333b..2d1bca2 100644 --- a/public/style.css +++ b/public/style.css @@ -114,4 +114,23 @@ figure.participant figcaption { 40%, 60% { transform: scale(1.3) rotate(30deg); } +} + +#messageBox { + position: fixed; + left: 0; + right: 0; + top: 50%; + transform: translateY(-50%); + height:100px; + background: #bbbbf2; + border: 3px solid black; +} + +#messageBox img { + max-height: 90%; +} + +.hide { + display: none; } \ No newline at end of file diff --git a/room.js b/room.js index b3a5e1b..28f5423 100644 --- a/room.js +++ b/room.js @@ -50,6 +50,8 @@ function addAudienceWS(roomId, ws) { function buzz(roomId, participant) { let room = getOrCreateRoom(roomId); + participant = room.participants.find(p => p.participantId === participant.participantId); + room.participants.forEach(p => { if (p.ws && p.participantId !== participant.participantId) { p.ws.send(JSON.stringify({ diff --git a/views/room.handlebars b/views/room.handlebars index 6d4bbed..aea5519 100644 --- a/views/room.handlebars +++ b/views/room.handlebars @@ -23,7 +23,7 @@ -
+
@@ -53,7 +53,7 @@ })); }); - showMessage(msg) { + function showMessage(msg) { let mb = document.getElementById('messageBox'); mb.innerHTML = msg; mb.classList.remove('hide');