From a142f5c84c875b43ee8835dce100a5f95d081fb1 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Tue, 21 May 2024 17:02:21 +1200 Subject: [PATCH] show remote audio codec in ui --- public/call.html | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/public/call.html b/public/call.html index 15e1d5b..ad85979 100644 --- a/public/call.html +++ b/public/call.html @@ -72,18 +72,23 @@
{{ formatBytes(rxBytes) }}
+
+
Incoming Audio
+
{{ remoteAudioCodec || "Unknown" }}
+
+
-
Codec2 Mode
+
Outgoing Audio
@@ -291,6 +296,8 @@ codecMode: "MODE_1200", // seems to be the smallest size with the best quality from my testing sampleRate: 8000, + remoteAudioCodec: null, + audioContext: null, mediaStreamSource: null, audioWorkletNode: null, @@ -374,6 +381,7 @@ // update ui this.callHash = callHash; + this.remoteAudioCodec = null; // reset stats this.txBytes = 0; @@ -466,6 +474,9 @@ const mode = Codec2AudioMode.valuesById[codec2Audio.mode].replace("MODE_", ""); const encoded = new Uint8Array(codec2Audio.encoded); + // update ui + this.remoteAudioCodec = "Codec2 Mode " + mode; + // decode codec2 audio const decoded = await Codec2Lib.runDecode(mode, encoded);