diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2022-08-31 17:35:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-31 17:35:42 +0300 |
commit | ec558052b31f88398b654dab3498b2d33710014a (patch) | |
tree | 5d6e6045f578b766f337608a6cca7dd90d53b80c /src | |
parent | 689dadff0e22e0cf831f2b7d4d0d79b14a727f3c (diff) | |
parent | 9036b8879eddd3c36065d58469f1335a75c30fe4 (diff) |
Merge pull request #7237 from nextcloud/disconnect-received-videos-by-toggling-the-video-directly-in-janus
Disconnect received videos by toggling the video directly in Janus
Diffstat (limited to 'src')
-rw-r--r-- | src/utils/webrtc/simplewebrtc/peer.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/utils/webrtc/simplewebrtc/peer.js b/src/utils/webrtc/simplewebrtc/peer.js index df67298fd..fea3aa592 100644 --- a/src/utils/webrtc/simplewebrtc/peer.js +++ b/src/utils/webrtc/simplewebrtc/peer.js @@ -886,6 +886,19 @@ Peer.prototype.setRemoteVideoBlocked = function(remoteVideoBlocked) { return } + // If the HPB is used the remote video can be blocked through a standard + // WebRTC renegotiation or by toggling the video directly in Janus. The last + // one is preferred, as it requires less signaling messages to be exchanged + // and, besides that, the browser starts to decode the video faster once + // enabled again. + if (this.receiverOnly && this.parent.config.connection.hasFeature('update-sdp')) { + this.send('selectStream', { + video: !remoteVideoBlocked, + }) + + return + } + this._remoteVideoShouldBeBlocked = remoteVideoBlocked // The "negotiationneeded" event is emitted if needed based on the direction |