summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web/share/js/kvm/stream_janus.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/web/share/js/kvm/stream_janus.js b/web/share/js/kvm/stream_janus.js
index 60090dc5..5a8b4cce 100644
--- a/web/share/js/kvm/stream_janus.js
+++ b/web/share/js/kvm/stream_janus.js
@@ -220,6 +220,15 @@ export function JanusStreamer(__setActive, __setInactive, __setInfo, __allow_aud
},
"onremotestream": function(stream) {
+ if (stream === null) {
+ // https://github.com/pikvm/pikvm/issues/1084
+ // Этого вообще не должно происходить, но почему-то янусу в unmute
+ // может прилететь null-эвент. Костыляем, наблюдаем.
+ __logError("Got invalid onremotestream(null). Restarting Janus...");
+ __destroyJanus();
+ return;
+ }
+
let tracks = stream.getTracks();
__logInfo("Got a remote stream changes:", stream, tracks);