rx bytes should still be incremented even when muted
This commit is contained in:
@@ -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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user