Skip to content

Commit 239b833

Browse files
committed
fix RTCPeerConnection.prototype.removeTrack to support Sender without track
1 parent b876365 commit 239b833

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

js/RTCPeerConnection.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,11 @@ RTCPeerConnection.prototype.removeTrack = function (sender) {
555555

556556
track = sender.track;
557557

558+
// No sender track found
559+
if (!track) {
560+
return;
561+
}
562+
558563
function matchLocalTrack(localTrack) {
559564
return localTrack.id === track.id;
560565
}

0 commit comments

Comments
 (0)