From 777860f7576dae5ad700c80a7842733811c6bcad Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Fri, 6 Jan 2023 20:02:23 +0100 Subject: [PATCH] webrtc muxer: fix freeze on Firefox --- internal/core/webrtc_index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/core/webrtc_index.html b/internal/core/webrtc_index.html index 574034495b7..6b26a0b8e3f 100644 --- a/internal/core/webrtc_index.html +++ b/internal/core/webrtc_index.html @@ -80,7 +80,8 @@ switch (this.pc.iceConnectionState) { case "connected": this.pc.onicecandidate = undefined; - this.ws.onmessage = undefined; + // do not unbind ws.onmessage due to a strange Firefox bug + // if all callbacks are removed from WS, video freezes after some seconds. this.ws.onerror = undefined this.ws.onclose = undefined; // do not close the WebSocket connection