diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2021-06-21 22:09:06 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2021-06-21 22:09:06 +0300 |
commit | a9ca74c3a726a2b1c1f09714b952960c2b05db17 (patch) | |
tree | be5eebff485cf2f8c317cdf60a2d6d7ed3d77b88 | |
parent | 087432048effdbd457c71fac484acdf31725cf45 (diff) |
Do not trigger processing of pending replace track actions on receivers
Receiver only peers do not handle local track changes, so there is no
need to trigger the processing of pending replace track actions in that
case, as there will be none.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
-rw-r--r-- | src/utils/webrtc/simplewebrtc/peer.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/webrtc/simplewebrtc/peer.js b/src/utils/webrtc/simplewebrtc/peer.js index c30b76192..893bdeb77 100644 --- a/src/utils/webrtc/simplewebrtc/peer.js +++ b/src/utils/webrtc/simplewebrtc/peer.js @@ -50,7 +50,7 @@ function Peer(options) { this.pc.addEventListener('negotiationneeded', this.emit.bind(this, 'negotiationNeeded')) this.pc.addEventListener('iceconnectionstatechange', this.emit.bind(this, 'iceConnectionStateChange')) this.pc.addEventListener('iceconnectionstatechange', function() { - if (self.pc.iceConnectionState !== 'new') { + if (!options.receiverOnly && self.pc.iceConnectionState !== 'new') { self._processPendingReplaceTracks().then(finished => { if (finished === false || self._initialStreamSetup) { return |