diff options
author | Maxim Devaev <[email protected]> | 2023-12-14 19:43:51 +0200 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2023-12-14 19:43:59 +0200 |
commit | b7d5a5f78f59d1dc836ba426f3909c434a6f12af (patch) | |
tree | e53ce8557c57bff2e4859ae7de89ce720f4d46f7 | |
parent | ff2ed7db398e884b90c0b7f2a95575f78f0827c2 (diff) |
pikvm/pikvm#1084: workaround for NULL unmute event
Note: Required a patch from Janus side:
- https://github.com/meetecho/janus-gateway/issues/3283
-rw-r--r-- | web/share/js/kvm/stream_janus.js | 9 |
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); |