add chat sound

This commit is contained in:
Elijah R 2024-02-04 00:11:47 -05:00
parent 9f39678fd0
commit 9103626705
2 changed files with 3 additions and 0 deletions

View File

@ -1,4 +1,5 @@
export const Config = { export const Config = {
ChatSound: "//computernewb.com/collab-vm/notify.ogg",
ServerAddresses: [ ServerAddresses: [
"wss://computernewb.com/collab-vm/vm0", "wss://computernewb.com/collab-vm/vm0",
"wss://computernewb.com/collab-vm/vm1", "wss://computernewb.com/collab-vm/vm1",

View File

@ -263,6 +263,7 @@ var turnTimer = 0;
var voteTimer = 0; var voteTimer = 0;
var rank : Rank = Rank.Unregistered; var rank : Rank = Rank.Unregistered;
var perms : Permissions = new Permissions(0); var perms : Permissions = new Permissions(0);
const chatsound = new Audio(Config.ChatSound);
// Active VM // Active VM
var VM : CollabVMClient | null = null; var VM : CollabVMClient | null = null;
@ -458,6 +459,7 @@ function chatMessage(username : string, message : string) {
tr.appendChild(td); tr.appendChild(td);
elements.chatList.appendChild(tr); elements.chatList.appendChild(tr);
elements.chatListDiv.scrollTop = elements.chatListDiv.scrollHeight; elements.chatListDiv.scrollTop = elements.chatListDiv.scrollHeight;
chatsound.play();
} }
function addUser(user : User) { function addUser(user : User) {