rx bytes should still be incremented even when muted

This commit is contained in:
liamcottle
2024-05-21 14:56:15 +12:00
parent 4d6beb4af8
commit e91fe7870f

View File

@@ -422,17 +422,17 @@
// listen to audio from call // listen to audio from call
this.ws.onmessage = async (event) => { this.ws.onmessage = async (event) => {
// do nothing if muted
if(this.isSoundMuted){
return;
}
// get encoded codec2 bytes from websocket message // get encoded codec2 bytes from websocket message
const encoded = await event.data.arrayBuffer(); const encoded = await event.data.arrayBuffer();
// update stats // update stats
this.rxBytes += encoded.byteLength; this.rxBytes += encoded.byteLength;
// do nothing if muted
if(this.isSoundMuted){
return;
}
// decode codec2 audio // decode codec2 audio
const decoded = await Codec2Lib.runDecode(this.codecMode, encoded); const decoded = await Codec2Lib.runDecode(this.codecMode, encoded);