From 9636acf2e29a2c0145a5172afb6f05eca95376c2 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Tue, 21 May 2024 03:50:41 +1200 Subject: [PATCH] update icons and add ability to mute incoming audio --- public/call.html | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/public/call.html b/public/call.html index f3d5ea7..12af3c9 100644 --- a/public/call.html +++ b/public/call.html @@ -89,9 +89,22 @@ + + + @@ -257,6 +270,7 @@ rxBytes: 0, isMicMuted: true, + isSoundMuted: false, codecMode: "1200", sampleRate: 8000, @@ -394,6 +408,11 @@ // listen to audio from call this.ws.onmessage = async (event) => { + // do nothing if muted + if(this.isSoundMuted){ + return; + } + // get encoded codec2 bytes from websocket message const encoded = await event.data.arrayBuffer();