Browse Source

ref(TPC): remove unused findSenderByStream

master
paweldomas 5 years ago
parent
commit
84367d8508
1 changed files with 0 additions and 20 deletions
  1. 0
    20
      modules/RTC/TraceablePeerConnection.js

+ 0
- 20
modules/RTC/TraceablePeerConnection.js View File

1669
     return this.peerconnection.getSenders().find(s => s.track && s.track.kind === mediaType);
1669
     return this.peerconnection.getSenders().find(s => s.track && s.track.kind === mediaType);
1670
 };
1670
 };
1671
 
1671
 
1672
-/**
1673
- * Returns the sender corresponding to the given MediaStream.
1674
- *
1675
- * @param {MediaStream} stream - The media stream used for the search.
1676
- * @returns {RTPSender|undefined} - The found sender or undefined if no sender
1677
- * was found.
1678
- */
1679
-TraceablePeerConnection.prototype.findSenderByStream = function(stream) {
1680
-    const track = stream.getTracks()[0];
1681
-
1682
-    if (!track) {
1683
-        logger.error('Cannot find sender: no tracks.');
1684
-
1685
-        return;
1686
-    }
1687
-
1688
-    // Find the right sender (for audio or video)
1689
-    return this.peerconnection.getSenders().find(s => s.track === track);
1690
-};
1691
-
1692
 /**
1672
 /**
1693
  * Returns the receiver corresponding to the given MediaStreamTrack.
1673
  * Returns the receiver corresponding to the given MediaStreamTrack.
1694
  *
1674
  *

Loading…
Cancel
Save