Selaa lähdekoodia

ref(TPC): remove unused findSenderByStream

master
paweldomas 4 vuotta sitten
vanhempi
commit
84367d8508
1 muutettua tiedostoa jossa 0 lisäystä ja 20 poistoa
  1. 0
    20
      modules/RTC/TraceablePeerConnection.js

+ 0
- 20
modules/RTC/TraceablePeerConnection.js Näytä tiedosto

@@ -1669,26 +1669,6 @@ TraceablePeerConnection.prototype.findSenderByKind = function(mediaType) {
1669 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 1673
  * Returns the receiver corresponding to the given MediaStreamTrack.
1694 1674
  *

Loading…
Peruuta
Tallenna