Explorar el Código

fix(JingleSessionPC) Do not force track removal at pc level on user leave.

When a user leaves, the ssrcs associated with the ep are removed from the remote description and a renegotiation is forced. The browser then fires 'removetrack' event on the associated MediaStream when sRD is called with ssrcs removed. The remote track is then disposed of in the event handler. Therefore, there is no need to delete the tracks at the TPC level before renegotiation. This also prevents the 'Removed track not found for stream' events from showing up in the browser console log.
dev1
Jaya Allamsetty hace 3 años
padre
commit
161835ec58

+ 1
- 2
modules/xmpp/JingleSessionPC.js Ver fichero

1720
     }
1720
     }
1721
 
1721
 
1722
     /**
1722
     /**
1723
-     * Handles the deletion of the remote tracks and SSRCs associated with a remote endpoint.
1723
+     * Handles the deletion of SSRCs associated with a remote user from the remote description when the user leaves.
1724
      *
1724
      *
1725
      * @param {string} id Endpoint id of the participant that has left the call.
1725
      * @param {string} id Endpoint id of the participant that has left the call.
1726
      * @returns {void}
1726
      * @returns {void}
1730
             const removeSsrcInfo = this.peerconnection.getRemoteSourceInfoByParticipant(id);
1730
             const removeSsrcInfo = this.peerconnection.getRemoteSourceInfoByParticipant(id);
1731
 
1731
 
1732
             if (removeSsrcInfo.length) {
1732
             if (removeSsrcInfo.length) {
1733
-                this.peerconnection.removeRemoteTracks(id);
1734
                 const oldLocalSdp = new SDP(this.peerconnection.localDescription.sdp);
1733
                 const oldLocalSdp = new SDP(this.peerconnection.localDescription.sdp);
1735
                 const newRemoteSdp = this._processRemoteRemoveSource(removeSsrcInfo);
1734
                 const newRemoteSdp = this._processRemoteRemoveSource(removeSsrcInfo);
1736
 
1735
 

+ 1
- 1
types/auto/modules/xmpp/JingleSessionPC.d.ts Ver fichero

393
      */
393
      */
394
     removeRemoteStream(elem: any): void;
394
     removeRemoteStream(elem: any): void;
395
     /**
395
     /**
396
-     * Handles the deletion of the remote tracks and SSRCs associated with a remote endpoint.
396
+     * Handles the deletion of SSRCs associated with a remote user from the remote description when the user leaves.
397
      *
397
      *
398
      * @param {string} id Endpoint id of the participant that has left the call.
398
      * @param {string} id Endpoint id of the participant that has left the call.
399
      * @returns {void}
399
      * @returns {void}

Loading…
Cancelar
Guardar