|
@@ -1675,22 +1675,22 @@ export default class JingleSessionPC extends JingleSession {
|
1675
|
1675
|
const workFunction = finishCallback => {
|
1676
|
1676
|
const removeSsrcInfo = this.peerconnection.getRemoteSourceInfoByParticipant(id);
|
1677
|
1677
|
|
1678
|
|
- if (!removeSsrcInfo.length) {
|
1679
|
|
- logger.debug(`No remote SSRCs for participant: ${id} found.`);
|
1680
|
|
- finishCallback();
|
1681
|
|
- }
|
1682
|
|
- const oldLocalSdp = new SDP(this.peerconnection.localDescription.sdp);
|
1683
|
|
- const newRemoteSdp = this._processRemoteRemoveSource(removeSsrcInfo);
|
|
1678
|
+ if (removeSsrcInfo.length) {
|
|
1679
|
+ const oldLocalSdp = new SDP(this.peerconnection.localDescription.sdp);
|
|
1680
|
+ const newRemoteSdp = this._processRemoteRemoveSource(removeSsrcInfo);
|
1684
|
1681
|
|
1685
|
|
- remoteTracks = this.peerconnection.removeRemoteTracks(id);
|
1686
|
|
- this._renegotiate(newRemoteSdp.raw)
|
1687
|
|
- .then(() => {
|
1688
|
|
- const newLocalSDP = new SDP(this.peerconnection.localDescription.sdp);
|
|
1682
|
+ remoteTracks = this.peerconnection.removeRemoteTracks(id);
|
|
1683
|
+ this._renegotiate(newRemoteSdp.raw)
|
|
1684
|
+ .then(() => {
|
|
1685
|
+ const newLocalSDP = new SDP(this.peerconnection.localDescription.sdp);
|
1689
|
1686
|
|
1690
|
|
- this.notifyMySSRCUpdate(oldLocalSdp, newLocalSDP);
|
1691
|
|
- finishCallback();
|
1692
|
|
- })
|
1693
|
|
- .catch(err => finishCallback(err));
|
|
1687
|
+ this.notifyMySSRCUpdate(oldLocalSdp, newLocalSDP);
|
|
1688
|
+ finishCallback();
|
|
1689
|
+ })
|
|
1690
|
+ .catch(err => finishCallback(err));
|
|
1691
|
+ } else {
|
|
1692
|
+ finishCallback();
|
|
1693
|
+ }
|
1694
|
1694
|
};
|
1695
|
1695
|
|
1696
|
1696
|
return new Promise((resolve, reject) => {
|