Skip to content

Commit

Permalink
fix RTCPeerConnection.prototype.removeTrack to support Sender without…
Browse files Browse the repository at this point in the history
… track
  • Loading branch information
hthetiot committed Dec 6, 2021
1 parent b876365 commit 239b833
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions js/RTCPeerConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,11 @@ RTCPeerConnection.prototype.removeTrack = function (sender) {

track = sender.track;

// No sender track found
if (!track) {
return;
}

function matchLocalTrack(localTrack) {
return localTrack.id === track.id;
}
Expand Down

0 comments on commit 239b833

Please sign in to comment.