Add chat sound
This commit is contained in:
parent
37cab87a6f
commit
e7e43b9399
2 changed files with 4 additions and 1 deletions
|
@ -9,5 +9,6 @@ export const config = {
|
|||
"wss://computernewb.com/collab-vm/vm6",
|
||||
"wss://computernewb.com/collab-vm/vm7",
|
||||
"wss://computernewb.com/collab-vm/vm8",
|
||||
]
|
||||
],
|
||||
chatSound: "https://computernewb.com/collab-vm/notify.ogg"
|
||||
}
|
|
@ -15,6 +15,7 @@ const buttons = {
|
|||
var hasTurn = false;
|
||||
var vm;
|
||||
var connected = false;
|
||||
const chatsound = new Audio(config.chatSound);
|
||||
// Elements
|
||||
const turnstatus = window.document.getElementById("turnstatus");
|
||||
const vmlist = window.document.getElementById("vmlist");
|
||||
|
@ -91,6 +92,7 @@ class CollabVMClient {
|
|||
tr.appendChild(td);
|
||||
chatList.appendChild(tr);
|
||||
}
|
||||
chatsound.play();
|
||||
chatListDiv.scrollTop = chatListDiv.scrollHeight;
|
||||
break;
|
||||
case "size":
|
||||
|
|
Loading…
Reference in a new issue