瀏覽代碼

fix(RTC): Remove support for plan-b SDP. (#2430)

* fix(RTC): Remove support for plan-b SDP.
Since unified plan mode becomes the default mode, so does multi-stream mode.

* squash: Remove plan-b unit tests and fix comments

* squash: address review comments
release-8443
Jaya Allamsetty 1 年之前
父節點
當前提交
d53d010679
沒有連結到貢獻者的電子郵件帳戶。

+ 6
- 8
JitsiConference.js 查看文件

@@ -1088,8 +1088,7 @@ JitsiConference.prototype.addTrack = function(track) {
1088 1088
 
1089 1089
         // Currently, only adding multiple video streams of different video types is supported.
1090 1090
         // TODO - remove this limitation once issues with jitsi-meet trying to add multiple camera streams is fixed.
1091
-        if (FeatureFlags.isMultiStreamSendSupportEnabled()
1092
-            && mediaType === MediaType.VIDEO
1091
+        if (mediaType === MediaType.VIDEO
1093 1092
             && !localTracks.find(t => t.getVideoType() === track.getVideoType())) {
1094 1093
             const sourceName = getSourceNameForJitsiTrack(
1095 1094
                 this.myUserId(),
@@ -1122,7 +1121,7 @@ JitsiConference.prototype.addTrack = function(track) {
1122 1121
             // Presence needs to be sent here for desktop track since we need the presence to reach the remote peer
1123 1122
             // before signaling so that a fake participant tile is created for screenshare. Otherwise, presence will
1124 1123
             // only be sent after a session-accept or source-add is ack'ed.
1125
-            if (track.getVideoType() === VideoType.DESKTOP && FeatureFlags.isMultiStreamSendSupportEnabled()) {
1124
+            if (track.getVideoType() === VideoType.DESKTOP) {
1126 1125
                 this._updateRoomPresence(this.getActiveMediaSession());
1127 1126
             }
1128 1127
         });
@@ -1260,7 +1259,7 @@ JitsiConference.prototype.replaceTrack = function(oldTrack, newTrack) {
1260 1259
     const mediaType = oldTrack?.getType() || newTrack?.getType();
1261 1260
     const newVideoType = newTrack?.getVideoType();
1262 1261
 
1263
-    if (FeatureFlags.isMultiStreamSendSupportEnabled() && oldTrack && newTrack && oldVideoType !== newVideoType) {
1262
+    if (oldTrack && newTrack && oldVideoType !== newVideoType) {
1264 1263
         throw new Error(`Replacing a track of videoType=${oldVideoType} with a track of videoType=${newVideoType} is`
1265 1264
             + ' not supported in this mode.');
1266 1265
     }
@@ -2087,12 +2086,11 @@ JitsiConference.prototype.onRemoteTrackRemoved = function(removedTrack) {
2087 2086
  */
2088 2087
 JitsiConference.prototype._onIncomingCallP2P = function(jingleSession, jingleOffer) {
2089 2088
     let rejectReason;
2090
-    const usesUnifiedPlan = browser.supportsUnifiedPlan();
2091 2089
     const contentName = jingleOffer.find('>content').attr('name');
2092 2090
     const peerUsesUnifiedPlan = contentName === '0' || contentName === '1';
2093 2091
 
2094 2092
     // Reject P2P between endpoints that are not running in the same mode w.r.t to SDPs (plan-b and unified plan).
2095
-    if (usesUnifiedPlan !== peerUsesUnifiedPlan) {
2093
+    if (!peerUsesUnifiedPlan) {
2096 2094
         rejectReason = {
2097 2095
             reason: 'decline',
2098 2096
             reasonDescription: 'P2P disabled',
@@ -2227,7 +2225,7 @@ JitsiConference.prototype._acceptJvbIncomingCall = function(jingleSession, jingl
2227 2225
             localTracks
2228 2226
         );
2229 2227
 
2230
-        // Enable or disable simulcast for plan-b screensharing based on the capture fps if it is set through the UI.
2228
+        // Set the capture fps for screenshare if it is set through the UI.
2231 2229
         this._desktopSharingFrameRate
2232 2230
             && jingleSession.peerconnection.setDesktopSharingFrameRate(this._desktopSharingFrameRate);
2233 2231
 
@@ -3518,7 +3516,7 @@ JitsiConference.prototype.setDesktopSharingFrameRate = function(maxFps) {
3518 3516
 
3519 3517
     this._desktopSharingFrameRate = maxFps;
3520 3518
 
3521
-    // Enable or disable simulcast for plan-b screensharing based on the capture fps.
3519
+    // Set capture fps for screenshare.
3522 3520
     this.jvbJingleSession && this.jvbJingleSession.peerconnection.setDesktopSharingFrameRate(maxFps);
3523 3521
 
3524 3522
     // Set the capture rate for desktop sharing.

+ 2
- 6
modules/RTC/JitsiLocalTrack.js 查看文件

@@ -20,7 +20,6 @@ import {
20 20
     createNoDataFromSourceEvent
21 21
 } from '../../service/statistics/AnalyticsEvents';
22 22
 import browser from '../browser';
23
-import FeatureFlags from '../flags/FeatureFlags';
24 23
 import Statistics from '../statistics/statistics';
25 24
 
26 25
 import JitsiTrack from './JitsiTrack';
@@ -354,8 +353,7 @@ export default class JitsiLocalTrack extends JitsiTrack {
354 353
      * @returns {Promise}
355 354
      */
356 355
     _setMuted(muted) {
357
-        if (this.isMuted() === muted
358
-            && !(this.videoType === VideoType.DESKTOP && FeatureFlags.isMultiStreamSendSupportEnabled())) {
356
+        if (this.isMuted() === muted && this.videoType !== VideoType.DESKTOP) {
359 357
             return Promise.resolve();
360 358
         }
361 359
 
@@ -377,9 +375,7 @@ export default class JitsiLocalTrack extends JitsiTrack {
377 375
         // conference. This is needed because we don't want the client to signal a source-remove to the remote peer for
378 376
         // the desktop track when screenshare is stopped. Later when screenshare is started again, the same sender will
379 377
         // be re-used without the need for signaling a new ssrc through source-add.
380
-        if (this.isAudioTrack()
381
-                || (this.videoType === VideoType.DESKTOP && !FeatureFlags.isMultiStreamSendSupportEnabled())
382
-                || !doesVideoMuteByStreamRemove) {
378
+        if (this.isAudioTrack() || !doesVideoMuteByStreamRemove) {
383 379
             logMuteInfo();
384 380
 
385 381
             // If we have a stream effect that implements its own mute functionality, prioritize it before

+ 0
- 9
modules/RTC/RTC.js 查看文件

@@ -363,7 +363,6 @@ export default class RTC extends Listenable {
363 363
      * enabled on the PeerConnection.
364 364
      * @param {boolean} options.forceTurnRelay If set to true, the browser will generate only Relay ICE candidates.
365 365
      * @param {boolean} options.startSilent If set to 'true' no audio will be sent or received.
366
-     * @param {boolean} options.usesUnifiedPlan Indicates if the  browser is running in unified plan mode.
367 366
      * @param {Object} options.videoQuality - Quality settings to applied on the outbound video streams.
368 367
      * @return {TraceablePeerConnection}
369 368
      */
@@ -375,14 +374,6 @@ export default class RTC extends Listenable {
375 374
             pcConfig.encodedInsertableStreams = true;
376 375
         }
377 376
 
378
-        // TODO: remove this.
379
-        const supportsSdpSemantics = browser.isChromiumBased() && !options.usesUnifiedPlan;
380
-
381
-        if (supportsSdpSemantics) {
382
-            logger.debug('WebRTC application is running in plan-b mode');
383
-            pcConfig.sdpSemantics = 'plan-b';
384
-        }
385
-
386 377
         if (options.forceTurnRelay) {
387 378
             pcConfig.iceTransportPolicy = 'relay';
388 379
         }

+ 1
- 9
modules/RTC/TPCUtils.js 查看文件

@@ -10,7 +10,6 @@ import { STANDARD_CODEC_SETTINGS } from '../../service/RTC/StandardVideoSettings
10 10
 import VideoEncoderScalabilityMode from '../../service/RTC/VideoEncoderScalabilityMode';
11 11
 import { VideoType } from '../../service/RTC/VideoType';
12 12
 import browser from '../browser';
13
-import FeatureFlags from '../flags/FeatureFlags';
14 13
 
15 14
 const logger = getLogger(__filename);
16 15
 const DESKTOP_SHARE_RATE = 500000;
@@ -379,7 +378,6 @@ export class TPCUtils {
379 378
      * @returns {Array<number>}
380 379
      */
381 380
     calculateEncodingsBitrates(localVideoTrack, codec, newHeight) {
382
-        const videoType = localVideoTrack.getVideoType();
383 381
         const desktopShareBitrate = this.pc.options?.videoQuality?.desktopbitrate || DESKTOP_SHARE_RATE;
384 382
         const encodingsBitrates = this._getVideoStreamEncodings(localVideoTrack.getVideoType(), codec)
385 383
         .map((encoding, idx) => {
@@ -395,11 +393,6 @@ export class TPCUtils {
395 393
             // Multiple video streams.
396 394
             if (this._isScreenshareBitrateCapped(localVideoTrack)) {
397 395
                 bitrate = desktopShareBitrate;
398
-            } else if (videoType === VideoType.DESKTOP && browser.isChromiumBased() && !this.pc.usesUnifiedPlan()) {
399
-                // For high fps screenshare, 'maxBitrate' setting must be cleared on Chrome in plan-b, because
400
-                // if simulcast is enabled for screen and maxBitrates are set then Chrome will not send the
401
-                // desktop stream.
402
-                bitrate = undefined;
403 396
             }
404 397
 
405 398
             return bitrate;
@@ -666,8 +659,7 @@ export class TPCUtils {
666 659
         const mediaType = newTrack?.getType() ?? oldTrack?.getType();
667 660
         const localTracks = this.pc.getLocalTracks(mediaType);
668 661
         const track = newTrack?.getTrack() ?? null;
669
-        const isNewLocalSource = FeatureFlags.isMultiStreamSendSupportEnabled()
670
-            && localTracks?.length
662
+        const isNewLocalSource = localTracks?.length
671 663
             && !oldTrack
672 664
             && newTrack
673 665
             && !localTracks.find(t => t === newTrack);

+ 136
- 749
modules/RTC/TraceablePeerConnection.js
文件差異過大導致無法顯示
查看文件


+ 0
- 11
modules/browser/BrowserCapabilities.js 查看文件

@@ -289,17 +289,6 @@ export default class BrowserCapabilities extends BrowserDetection {
289 289
             && window.RTCRtpReceiver.getCapabilities('audio').codecs.some(codec => codec.mimeType === 'audio/red'));
290 290
     }
291 291
 
292
-    /**
293
-     * Checks if the browser supports unified plan.
294
-     *
295
-     * @returns {boolean}
296
-     */
297
-    supportsUnifiedPlan() {
298
-        // We do not want to enable unified plan on Electron clients that have Chromium version < 96 because of
299
-        // performance and screensharing issues.
300
-        return !(this.isElectron() && this.isEngineVersionLessThan(96));
301
-    }
302
-
303 292
     /**
304 293
      * Checks if the browser supports voice activity detection via the @type {VADAudioAnalyser} service.
305 294
      *

+ 0
- 9
modules/flags/FeatureFlags.js 查看文件

@@ -19,15 +19,6 @@ class FeatureFlags {
19 19
         this._joinAsVisitor = Boolean(flags.enableJoinAsVisitor ?? true);
20 20
     }
21 21
 
22
-    /**
23
-     * Checks if multiple local video streams support is enabled.
24
-     *
25
-     * @returns {boolean}
26
-     */
27
-    isMultiStreamSendSupportEnabled() {
28
-        return browser.supportsUnifiedPlan();
29
-    }
30
-
31 22
     /**
32 23
      * Checks if the run in lite mode is enabled.
33 24
      * This will cause any media to be received and not decoded. (Insertable streams are used to discard

+ 0
- 162
modules/sdp/LocalSdpMunger.js 查看文件

@@ -3,9 +3,7 @@ import { getLogger } from '@jitsi/logger';
3 3
 import { MediaDirection } from '../../service/RTC/MediaDirection';
4 4
 import { MediaType } from '../../service/RTC/MediaType';
5 5
 import { getSourceNameForJitsiTrack } from '../../service/RTC/SignalingLayer';
6
-import { VideoType } from '../../service/RTC/VideoType';
7 6
 import browser from '../browser';
8
-import FeatureFlags from '../flags/FeatureFlags';
9 7
 
10 8
 import { SdpTransformWrap } from './SdpTransformUtil';
11 9
 
@@ -34,130 +32,6 @@ export default class LocalSdpMunger {
34 32
         this.videoSourcesToMsidMap = new Map();
35 33
     }
36 34
 
37
-    /**
38
-     * Makes sure that muted local video tracks associated with the parent
39
-     * {@link TraceablePeerConnection} are described in the local SDP. It's done
40
-     * in order to prevent from sending 'source-remove'/'source-add' Jingle
41
-     * notifications when local video track is muted (<tt>MediaStream</tt> is
42
-     * removed from the peerconnection).
43
-     *
44
-     * NOTE 1 video track is assumed
45
-     *
46
-     * @param {SdpTransformWrap} transformer the transformer instance which will
47
-     * be used to process the SDP.
48
-     * @return {boolean} <tt>true</tt> if there were any modifications to
49
-     * the SDP wrapped by <tt>transformer</tt>.
50
-     * @private
51
-     */
52
-    _addMutedLocalVideoTracksToSDP(transformer) {
53
-        // Go over each video tracks and check if the SDP has to be changed
54
-        const localVideos = this.tpc.getLocalTracks(MediaType.VIDEO);
55
-
56
-        if (!localVideos.length) {
57
-            return false;
58
-        } else if (localVideos.length !== 1) {
59
-            logger.error(
60
-                `${this.tpc} there is more than 1 video track ! `
61
-                    + 'Strange things may happen !', localVideos);
62
-        }
63
-
64
-        const videoMLine = transformer.selectMedia(MediaType.VIDEO)?.[0];
65
-
66
-        if (!videoMLine) {
67
-            logger.debug(
68
-                `${this.tpc} unable to hack local video track SDP`
69
-                    + '- no "video" media');
70
-
71
-            return false;
72
-        }
73
-
74
-        let modified = false;
75
-
76
-        for (const videoTrack of localVideos) {
77
-            const muted = videoTrack.isMuted();
78
-            const mediaStream = videoTrack.getOriginalStream();
79
-            const isCamera = videoTrack.videoType === VideoType.CAMERA;
80
-
81
-            // During the mute/unmute operation there are periods of time when
82
-            // the track's underlying MediaStream is not added yet to
83
-            // the PeerConnection. The SDP needs to be munged in such case.
84
-            const isInPeerConnection
85
-                = mediaStream && this.tpc.isMediaStreamInPc(mediaStream);
86
-            const shouldFakeSdp = isCamera && (muted || !isInPeerConnection);
87
-
88
-            if (!shouldFakeSdp) {
89
-                continue; // eslint-disable-line no-continue
90
-            }
91
-
92
-            // Inject removed SSRCs
93
-            const requiredSSRCs
94
-                = this.tpc.isSpatialScalabilityOn()
95
-                    ? this.tpc.simulcast.ssrcCache
96
-                    : [ this.tpc.sdpConsistency.cachedPrimarySsrc ];
97
-
98
-            if (!requiredSSRCs.length) {
99
-                logger.error(`No SSRCs stored for: ${videoTrack} in ${this.tpc}`);
100
-
101
-                continue; // eslint-disable-line no-continue
102
-            }
103
-
104
-            modified = true;
105
-
106
-            // We need to fake sendrecv.
107
-            // NOTE the SDP produced here goes only to Jicofo and is never set
108
-            // as localDescription. That's why
109
-            // TraceablePeerConnection.mediaTransferActive is ignored here.
110
-            videoMLine.direction = MediaDirection.SENDRECV;
111
-
112
-            // Check if the recvonly has MSID
113
-            const primarySSRC = requiredSSRCs[0];
114
-
115
-            // FIXME The cname could come from the stream, but may turn out to
116
-            // be too complex. It is fine to come up with any value, as long as
117
-            // we only care about the actual SSRC values when deciding whether
118
-            // or not an update should be sent.
119
-            const primaryCname = `injected-${primarySSRC}`;
120
-
121
-            for (const ssrcNum of requiredSSRCs) {
122
-                // Remove old attributes
123
-                videoMLine.removeSSRC(ssrcNum);
124
-
125
-                // Inject
126
-                videoMLine.addSSRCAttribute({
127
-                    id: ssrcNum,
128
-                    attribute: 'cname',
129
-                    value: primaryCname
130
-                });
131
-                videoMLine.addSSRCAttribute({
132
-                    id: ssrcNum,
133
-                    attribute: 'msid',
134
-                    value: videoTrack.storedMSID
135
-                });
136
-            }
137
-            if (requiredSSRCs.length > 1) {
138
-                const group = {
139
-                    ssrcs: requiredSSRCs.join(' '),
140
-                    semantics: 'SIM'
141
-                };
142
-
143
-                if (!videoMLine.findGroup(group.semantics, group.ssrcs)) {
144
-                    // Inject the group
145
-                    videoMLine.addSSRCGroup(group);
146
-                }
147
-            }
148
-
149
-            // Insert RTX
150
-            // FIXME in P2P RTX is used by Chrome regardless of config option
151
-            // status. Because of that 'source-remove'/'source-add'
152
-            // notifications are still sent to remove/add RTX SSRC and FID group
153
-            if (!this.tpc.options.disableRtx) {
154
-                this.tpc.rtxModifier.modifyRtxSsrcs2(videoMLine);
155
-            }
156
-        }
157
-
158
-        return modified;
159
-    }
160
-
161 35
     /**
162 36
      * Returns a string that can be set as the MSID attribute for a source.
163 37
      *
@@ -277,31 +151,6 @@ export default class LocalSdpMunger {
277 151
         }
278 152
     }
279 153
 
280
-    /**
281
-     * Maybe modifies local description to fake local video tracks SDP when
282
-     * those are muted.
283
-     *
284
-     * @param {object} desc the WebRTC SDP object instance for the local
285
-     * description.
286
-     * @returns {RTCSessionDescription}
287
-     */
288
-    maybeAddMutedLocalVideoTracksToSDP(desc) {
289
-        if (!desc) {
290
-            throw new Error('No local description passed in.');
291
-        }
292
-
293
-        const transformer = new SdpTransformWrap(desc.sdp);
294
-
295
-        if (this._addMutedLocalVideoTracksToSDP(transformer)) {
296
-            return new RTCSessionDescription({
297
-                type: desc.type,
298
-                sdp: transformer.toRawSDP()
299
-            });
300
-        }
301
-
302
-        return desc;
303
-    }
304
-
305 154
     /**
306 155
      * This transformation will make sure that stream identifiers are unique
307 156
      * across all of the local PeerConnections even if the same stream is used
@@ -333,22 +182,11 @@ export default class LocalSdpMunger {
333 182
 
334 183
         const videoMlines = transformer.selectMedia(MediaType.VIDEO);
335 184
 
336
-        if (!FeatureFlags.isMultiStreamSendSupportEnabled()) {
337
-            videoMlines.splice(1);
338
-        }
339
-
340 185
         for (const videoMLine of videoMlines) {
341 186
             this._transformMediaIdentifiers(videoMLine);
342 187
             this._injectSourceNames(videoMLine);
343 188
         }
344 189
 
345
-        // Plan-b clients generate new SSRCs and trackIds whenever tracks are removed and added back to the
346
-        // peerconnection, therefore local track based map for msids needs to be reset after every transformation.
347
-        if (!this.tpc._usesUnifiedPlan) {
348
-            this.audioSourcesToMsidMap.clear();
349
-            this.videoSourcesToMsidMap.clear();
350
-        }
351
-
352 190
         return new RTCSessionDescription({
353 191
             type: sessionDesc.type,
354 192
             sdp: transformer.toRawSDP()

+ 0
- 60
modules/sdp/LocalSdpMunger.spec.js 查看文件

@@ -141,63 +141,3 @@ describe('Transform msids for source-name signaling', () => {
141 141
         expect(videoMsid).toBe('sRdpsdg-video-0-1');
142 142
     });
143 143
 });
144
-
145
-describe('Track replace operations in plan-b', () => {
146
-    const tpc = new MockPeerConnection('1', false);
147
-    const localEndpointId = 'sRdpsdg';
148
-    let desc, newSdp, sdpStr, transformedDesc, videoMsid, videoMsidLine;
149
-    const localSdpMunger = new LocalSdpMunger(tpc, localEndpointId);
150
-
151
-    it('should not increment track index for new tracks', () => {
152
-        FeatureFlags.init({ });
153
-
154
-        sdpStr = transform.write(SampleSdpStrings.simulcastRtxSdp);
155
-        desc = new RTCSessionDescription({
156
-            type: 'offer',
157
-            sdp: sdpStr
158
-        });
159
-        transformedDesc = localSdpMunger.transformStreamIdentifiers(desc);
160
-        newSdp = transform.parse(transformedDesc.sdp);
161
-
162
-        videoMsidLine = getSsrcLines(newSdp, 'video').find(ssrc => ssrc.attribute === 'msid')?.value;
163
-        videoMsid = videoMsidLine.split(' ')[0];
164
-
165
-        expect(videoMsid).toBe('sRdpsdg-video-0-1');
166
-
167
-        sdpStr = transform.write(SampleSdpStrings.simulcastRtxSdpReplacedTrack);
168
-        desc = new RTCSessionDescription({
169
-            type: 'offer',
170
-            sdp: sdpStr
171
-        });
172
-        transformedDesc = localSdpMunger.transformStreamIdentifiers(desc);
173
-        newSdp = transform.parse(transformedDesc.sdp);
174
-
175
-        videoMsidLine = getSsrcLines(newSdp, 'video').find(ssrc => ssrc.attribute === 'msid')?.value;
176
-        videoMsid = videoMsidLine.split(' ')[0];
177
-
178
-        expect(videoMsid).toBe('sRdpsdg-video-0-1');
179
-    });
180
-});
181
-
182
-describe('Transform msids for plan-b', () => {
183
-    const tpc = new MockPeerConnection('1', false);
184
-    const localEndpointId = 'sRdpsdg';
185
-    let desc, newSdp, sdpStr, transformedDesc;
186
-    const localSdpMunger = new LocalSdpMunger(tpc, localEndpointId);
187
-
188
-    it('should inject source-names', () => {
189
-        sdpStr = transform.write(SampleSdpStrings.simulcastRtxSdp);
190
-        desc = new RTCSessionDescription({
191
-            type: 'offer',
192
-            sdp: sdpStr
193
-        });
194
-        transformedDesc = localSdpMunger.transformStreamIdentifiers(desc);
195
-        newSdp = transform.parse(transformedDesc.sdp);
196
-
197
-        const audioSsrcs = getSsrcLines(newSdp, 'audio');
198
-        const videoSsrcs = getSsrcLines(newSdp, 'video');
199
-
200
-        expect(audioSsrcs.length).toEqual(1 + 1 /* injected source name */);
201
-        expect(videoSsrcs.length).toEqual(6 + 6 /* injected source name into each ssrc */);
202
-    });
203
-});

+ 0
- 127
modules/sdp/SdpConsistency.js 查看文件

@@ -1,127 +0,0 @@
1
-import { getLogger } from '@jitsi/logger';
2
-
3
-import { MediaType } from '../../service/RTC/MediaType';
4
-
5
-import {
6
-    SdpTransformWrap,
7
-    parsePrimarySSRC,
8
-    parseSecondarySSRC
9
-} from './SdpTransformUtil';
10
-
11
-const logger = getLogger(__filename);
12
-
13
-/**
14
- * Handles the work of keeping video ssrcs consistent across multiple
15
- * o/a cycles, making it such that all stream operations can be
16
- * kept local and do not need to be signaled.
17
- * NOTE: This only keeps the 'primary' video ssrc consistent: meaning
18
- * the primary video stream
19
- */
20
-export default class SdpConsistency {
21
-    /**
22
-     * Constructor
23
-     * @param {string} logPrefix the log prefix appended to every logged
24
-     * message, currently used to distinguish for which
25
-     * <tt>TraceablePeerConnection</tt> the instance works.
26
-     */
27
-    constructor(logPrefix) {
28
-        this.clearVideoSsrcCache();
29
-        this.logPrefix = logPrefix;
30
-    }
31
-
32
-    /**
33
-     * Clear the cached video primary and primary rtx ssrcs so that
34
-     *  they will not be used for the next call to
35
-     *  makeVideoPrimarySsrcsConsistent
36
-     */
37
-    clearVideoSsrcCache() {
38
-        this.cachedPrimarySsrc = null;
39
-        this.injectRecvOnly = false;
40
-    }
41
-
42
-    /**
43
-     * Explicitly set the primary ssrc to be used in
44
-     *  makeVideoPrimarySsrcsConsistent
45
-     * @param {number} primarySsrc the primarySsrc to be used
46
-     *  in future calls to makeVideoPrimarySsrcsConsistent
47
-     * @throws Error if <tt>primarySsrc</tt> is not a number
48
-     */
49
-    setPrimarySsrc(primarySsrc) {
50
-        if (typeof primarySsrc !== 'number') {
51
-            throw new Error('Primary SSRC must be a number!');
52
-        }
53
-        this.cachedPrimarySsrc = primarySsrc;
54
-    }
55
-
56
-    /**
57
-     * Checks whether or not there is a primary video SSRC cached already.
58
-     * @return {boolean}
59
-     */
60
-    hasPrimarySsrcCached() {
61
-        return Boolean(this.cachedPrimarySsrc);
62
-    }
63
-
64
-    /**
65
-     * Given an sdp string, either:
66
-     *  1) record the primary video and primary rtx ssrcs to be
67
-     *   used in future calls to makeVideoPrimarySsrcsConsistent or
68
-     *  2) change the primary and primary rtx ssrcs in the given sdp
69
-     *   to match the ones previously cached
70
-     * @param {string} sdpStr the sdp string to (potentially)
71
-     *  change to make the video ssrcs consistent
72
-     * @returns {string} a (potentially) modified sdp string
73
-     *  with ssrcs consistent with this class' cache
74
-     */
75
-    makeVideoPrimarySsrcsConsistent(sdpStr) {
76
-        const sdpTransformer = new SdpTransformWrap(sdpStr);
77
-        const videoMLine = sdpTransformer.selectMedia(MediaType.VIDEO)?.[0];
78
-
79
-        if (!videoMLine) {
80
-            logger.debug(`${this.logPrefix} no 'video' media found in the sdp: ${sdpStr}`);
81
-
82
-            return sdpStr;
83
-        }
84
-
85
-        if (videoMLine.direction === 'recvonly') {
86
-            // If the mline is recvonly, we'll add the primary
87
-            //  ssrc as a recvonly ssrc
88
-            if (this.cachedPrimarySsrc && this.injectRecvOnly) {
89
-                videoMLine.addSSRCAttribute({
90
-                    id: this.cachedPrimarySsrc,
91
-                    attribute: 'cname',
92
-                    value: `recvonly-${this.cachedPrimarySsrc}`
93
-                });
94
-            } else {
95
-                logger.info(`${this.logPrefix} no SSRC found for the recvonly video stream!`);
96
-            }
97
-        } else {
98
-            const newPrimarySsrc = videoMLine.getPrimaryVideoSsrc();
99
-
100
-            if (!newPrimarySsrc) {
101
-                logger.info(`${this.logPrefix} sdp-consistency couldn't parse new primary ssrc`);
102
-
103
-                return sdpStr;
104
-            }
105
-            if (this.cachedPrimarySsrc) {
106
-                videoMLine.replaceSSRC(newPrimarySsrc, this.cachedPrimarySsrc);
107
-                for (const group of videoMLine.ssrcGroups) {
108
-                    if (group.semantics === 'FID') {
109
-                        const primarySsrc = parsePrimarySSRC(group);
110
-                        const rtxSsrc = parseSecondarySSRC(group);
111
-
112
-                        // eslint-disable-next-line max-depth
113
-                        if (primarySsrc === newPrimarySsrc) {
114
-                            group.ssrcs
115
-                                = `${this.cachedPrimarySsrc} ${rtxSsrc}`;
116
-                        }
117
-                    }
118
-                }
119
-            } else {
120
-                this.cachedPrimarySsrc = newPrimarySsrc;
121
-            }
122
-            this.injectRecvOnly = true;
123
-        }
124
-
125
-        return sdpTransformer.toRawSDP();
126
-    }
127
-}

+ 40
- 145
modules/xmpp/JingleSessionPC.js 查看文件

@@ -412,7 +412,6 @@ export default class JingleSessionPC extends JingleSession {
412 412
         }
413 413
         pcOptions.forceTurnRelay = options.forceTurnRelay;
414 414
         pcOptions.audioQuality = options.audioQuality;
415
-        pcOptions.usesUnifiedPlan = this.usesUnifiedPlan = browser.supportsUnifiedPlan();
416 415
         pcOptions.disableSimulcast = this.isP2P ? true : options.disableSimulcast;
417 416
 
418 417
         if (!this.isP2P) {
@@ -557,8 +556,7 @@ export default class JingleSessionPC extends JingleSession {
557 556
                 if (!this.wasConnected
558 557
                     && (this.wasstable
559 558
                         || isStable
560
-                        || (this.usesUnifiedPlan && this.isInitiator
561
-                            && (browser.isChromiumBased() || browser.isReactNative())))) {
559
+                        || (this.isInitiator && (browser.isChromiumBased() || browser.isReactNative())))) {
562 560
 
563 561
                     Statistics.sendAnalytics(
564 562
                         ICE_DURATION,
@@ -641,8 +639,7 @@ export default class JingleSessionPC extends JingleSession {
641 639
             const state = this.peerconnection.signalingState;
642 640
             const remoteDescription = this.peerconnection.remoteDescription;
643 641
 
644
-            if (this.usesUnifiedPlan
645
-                && !this.isP2P
642
+            if (!this.isP2P
646 643
                 && state === 'stable'
647 644
                 && remoteDescription
648 645
                 && typeof remoteDescription.sdp === 'string') {
@@ -948,19 +945,6 @@ export default class JingleSessionPC extends JingleSession {
948 945
         });
949 946
     }
950 947
 
951
-    /**
952
-     * Makes the underlying TraceablePeerConnection generate new SSRC for
953
-     * the recvonly video stream.
954
-     * @deprecated
955
-     */
956
-    generateRecvonlySsrc() {
957
-        if (this.peerconnection) {
958
-            this.peerconnection.generateRecvonlySsrc();
959
-        } else {
960
-            logger.error(`${this} Unable to generate recvonly SSRC - no peerconnection`);
961
-        }
962
-    }
963
-
964 948
     /**
965 949
      * Returns the video codec configured as the preferred codec on the peerconnection.
966 950
      */
@@ -1005,9 +989,7 @@ export default class JingleSessionPC extends JingleSession {
1005 989
                     const videoTracks = localTracks.filter(track => track.getType() === MediaType.VIDEO);
1006 990
 
1007 991
                     videoTracks.length && videoTracks.splice(0, 1);
1008
-                    if (FeatureFlags.isMultiStreamSendSupportEnabled() && videoTracks.length) {
1009
-                        this.addTracks(videoTracks);
1010
-                    }
992
+                    videoTracks.length && this.addTracks(videoTracks);
1011 993
                 },
1012 994
                 error => {
1013 995
                     failure(error);
@@ -1150,7 +1132,7 @@ export default class JingleSessionPC extends JingleSession {
1150 1132
         // Add only 1 video track at a time. Adding 2 or more video tracks to the peerconnection at the same time
1151 1133
         // makes the browser go into a renegotiation loop by firing 'negotiationneeded' event after every
1152 1134
         // renegotiation.
1153
-        if (FeatureFlags.isMultiStreamSendSupportEnabled() && videoTracks.length > 1) {
1135
+        if (videoTracks.length > 1) {
1154 1136
             tracks = [ ...audioTracks, videoTracks[0] ];
1155 1137
         }
1156 1138
         for (const track of tracks) {
@@ -1716,8 +1698,7 @@ export default class JingleSessionPC extends JingleSession {
1716 1698
                 if (currentRemoteSdp.containsSSRC(ssrc)) {
1717 1699
 
1718 1700
                     // Do not print the warning for unified plan p2p case since ssrcs are never removed from the SDP.
1719
-                    !(self.usesUnifiedPlan && self.isP2P)
1720
-                        && logger.warn(`${self} Source-add request for existing SSRC: ${ssrc}`);
1701
+                    !self.isP2P && logger.warn(`${self} Source-add request for existing SSRC: ${ssrc}`);
1721 1702
 
1722 1703
                     return;
1723 1704
                 }
@@ -1994,51 +1975,43 @@ export default class JingleSessionPC extends JingleSession {
1994 1975
      *  in removeSsrcInfo
1995 1976
      */
1996 1977
     _processRemoteRemoveSource(removeSsrcInfo) {
1997
-        const remoteSdp = this.usesUnifiedPlan
1998
-            ? new SDP(this.peerconnection.peerconnection.remoteDescription.sdp)
1999
-            : new SDP(this.peerconnection.remoteDescription.sdp);
1978
+        const remoteSdp = new SDP(this.peerconnection.peerconnection.remoteDescription.sdp);
2000 1979
         let ssrcs;
2001 1980
 
2002
-        removeSsrcInfo.forEach((lines, idx) => {
1981
+        removeSsrcInfo.forEach(lines => {
2003 1982
             // eslint-disable-next-line no-param-reassign
2004 1983
             lines = lines.split('\r\n');
2005 1984
             lines.pop(); // remove empty last element;
2006 1985
             ssrcs = lines.map(line => Number(line.split('a=ssrc:')[1]?.split(' ')[0]));
2007 1986
 
2008
-            if (this.usesUnifiedPlan) {
2009
-                let mid;
2010
-
2011
-                lines.forEach(line => {
2012
-                    mid = remoteSdp.media.findIndex(mLine => mLine.includes(line));
2013
-                    if (mid > -1) {
2014
-                        remoteSdp.media[mid] = remoteSdp.media[mid].replace(`${line}\r\n`, '');
2015
-                        if (this.isP2P) {
2016
-                            const mediaType = SDPUtil.parseMLine(remoteSdp.media[mid].split('\r\n')[0])?.media;
2017
-                            const desiredDirection = this.peerconnection.getDesiredMediaDirection(mediaType, false);
2018
-
2019
-                            [ MediaDirection.SENDRECV, MediaDirection.SENDONLY ].forEach(direction => {
2020
-                                remoteSdp.media[mid] = remoteSdp.media[mid]
2021
-                                    .replace(`a=${direction}`, `a=${desiredDirection}`);
2022
-                            });
2023
-                        } else {
2024
-                            // Jvb connections will have direction set to 'sendonly' for the remote sources.
1987
+            let mid;
1988
+
1989
+            lines.forEach(line => {
1990
+                mid = remoteSdp.media.findIndex(mLine => mLine.includes(line));
1991
+                if (mid > -1) {
1992
+                    remoteSdp.media[mid] = remoteSdp.media[mid].replace(`${line}\r\n`, '');
1993
+                    if (this.isP2P) {
1994
+                        const mediaType = SDPUtil.parseMLine(remoteSdp.media[mid].split('\r\n')[0])?.media;
1995
+                        const desiredDirection = this.peerconnection.getDesiredMediaDirection(mediaType, false);
1996
+
1997
+                        [ MediaDirection.SENDRECV, MediaDirection.SENDONLY ].forEach(direction => {
2025 1998
                             remoteSdp.media[mid] = remoteSdp.media[mid]
2026
-                                .replace(`a=${MediaDirection.SENDONLY}`, `a=${MediaDirection.INACTIVE}`);
1999
+                                .replace(`a=${direction}`, `a=${desiredDirection}`);
2000
+                        });
2001
+                    } else {
2002
+                        // Jvb connections will have direction set to 'sendonly' for the remote sources.
2003
+                        remoteSdp.media[mid] = remoteSdp.media[mid]
2004
+                            .replace(`a=${MediaDirection.SENDONLY}`, `a=${MediaDirection.INACTIVE}`);
2027 2005
 
2028
-                            // Reject the m-line so that the browser removes the associated transceiver from the list
2029
-                            // of available transceivers. This will prevent the client from trying to re-use these
2030
-                            // inactive transceivers when additional video sources are added to the peerconnection.
2031
-                            const { media, port } = SDPUtil.parseMLine(remoteSdp.media[mid].split('\r\n')[0]);
2006
+                        // Reject the m-line so that the browser removes the associated transceiver from the list
2007
+                        // of available transceivers. This will prevent the client from trying to re-use these
2008
+                        // inactive transceivers when additional video sources are added to the peerconnection.
2009
+                        const { media, port } = SDPUtil.parseMLine(remoteSdp.media[mid].split('\r\n')[0]);
2032 2010
 
2033
-                            remoteSdp.media[mid] = remoteSdp.media[mid].replace(`m=${media} ${port}`, `m=${media} 0`);
2034
-                        }
2011
+                        remoteSdp.media[mid] = remoteSdp.media[mid].replace(`m=${media} ${port}`, `m=${media} 0`);
2035 2012
                     }
2036
-                });
2037
-            } else {
2038
-                lines.forEach(line => {
2039
-                    remoteSdp.media[idx] = remoteSdp.media[idx].replace(`${line}\r\n`, '');
2040
-                });
2041
-            }
2013
+                }
2014
+            });
2042 2015
         });
2043 2016
 
2044 2017
         // Update the ssrc owners list.
@@ -2061,9 +2034,7 @@ export default class JingleSessionPC extends JingleSession {
2061 2034
 
2062 2035
         // Add a new m-line in the remote description if the source info for a secondary video source is recceived from
2063 2036
         // the remote p2p peer when multi-stream support is enabled.
2064
-        if (addSsrcInfo.length > remoteSdp.media.length
2065
-            && this.isP2P
2066
-            && this.usesUnifiedPlan) {
2037
+        if (addSsrcInfo.length > remoteSdp.media.length && this.isP2P) {
2067 2038
             remoteSdp.addMlineForNewLocalSource(MediaType.VIDEO);
2068 2039
             remoteSdp = new SDP(remoteSdp.raw);
2069 2040
         }
@@ -2072,7 +2043,7 @@ export default class JingleSessionPC extends JingleSession {
2072 2043
 
2073 2044
             // Make sure to change the direction to 'sendrecv/sendonly' only for p2p connections. For jvb connections,
2074 2045
             // a new m-line is added for the new remote sources.
2075
-            if (this.isP2P && this.usesUnifiedPlan) {
2046
+            if (this.isP2P) {
2076 2047
                 const mediaType = SDPUtil.parseMLine(remoteSdp.media[idx].split('\r\n')[0])?.media;
2077 2048
                 const desiredDirection = this.peerconnection.getDesiredMediaDirection(mediaType, true);
2078 2049
 
@@ -2152,9 +2123,11 @@ export default class JingleSessionPC extends JingleSession {
2152 2123
      * otherwise.
2153 2124
      */
2154 2125
     addTracks(localTracks = null) {
2155
-        if (!FeatureFlags.isMultiStreamSendSupportEnabled()
2156
-            || !localTracks?.length
2157
-            || localTracks.find(track => track.getType() !== MediaType.VIDEO)) {
2126
+        if (!localTracks?.length) {
2127
+            Promise.reject(new Error('No tracks passed'));
2128
+        }
2129
+
2130
+        if (localTracks.find(track => track.getType() !== MediaType.VIDEO)) {
2158 2131
             return Promise.reject(new Error('Multiple tracks of the given media type are not supported'));
2159 2132
         }
2160 2133
 
@@ -2254,41 +2227,6 @@ export default class JingleSessionPC extends JingleSession {
2254 2227
         const workFunction = finishedCallback => {
2255 2228
             logger.debug(`${this} replaceTrack worker started. oldTrack = ${oldTrack}, newTrack = ${newTrack}`);
2256 2229
 
2257
-            if (!this.usesUnifiedPlan) {
2258
-                // NOTE the code below assumes that no more than 1 video track
2259
-                // can be added to the peer connection.
2260
-                // Transition from camera to desktop share
2261
-                // or transition from one camera source to another.
2262
-                if (this.peerconnection.options.capScreenshareBitrate
2263
-                    && oldTrack && newTrack && newTrack.isVideoTrack()) {
2264
-                    // Clearing current primary SSRC will make
2265
-                    // the SdpConsistency generate a new one which will result
2266
-                    // with:
2267
-                    // 1. source-remove for the old video stream.
2268
-                    // 2. source-add for the new video stream.
2269
-                    this.peerconnection.clearRecvonlySsrc();
2270
-                }
2271
-
2272
-                // Transition from no video to video (unmute).
2273
-                if (!oldTrack && newTrack && newTrack.isVideoTrack()) {
2274
-                    // Clearing current primary SSRC will make
2275
-                    // the SdpConsistency generate a new one which will result
2276
-                    // with:
2277
-                    // 1. source-remove for the recvonly
2278
-                    // 2. source-add for the new video stream
2279
-                    this.peerconnection.clearRecvonlySsrc();
2280
-
2281
-                // Transition from video to no video
2282
-                } else if (oldTrack && oldTrack.isVideoTrack() && !newTrack) {
2283
-                    // Clearing current primary SSRC and generating the recvonly
2284
-                    // will result in:
2285
-                    // 1. source-remove for the old video stream
2286
-                    // 2. source-add for the recvonly stream
2287
-                    this.peerconnection.clearRecvonlySsrc();
2288
-                    this.peerconnection.generateRecvonlySsrc();
2289
-                }
2290
-            }
2291
-
2292 2230
             this.peerconnection.replaceTrack(oldTrack, newTrack)
2293 2231
                 .then(shouldRenegotiate => {
2294 2232
                     let promise = Promise.resolve();
@@ -2407,42 +2345,6 @@ export default class JingleSessionPC extends JingleSession {
2407 2345
         return removeSsrcInfo;
2408 2346
     }
2409 2347
 
2410
-    /**
2411
-     * Will print an error if there is any difference, between the SSRCs given
2412
-     * in the <tt>oldSDP</tt> and the ones currently described in
2413
-     * the peerconnection's local description.
2414
-     * @param {string} operationName the operation's name which will be printed
2415
-     * in the error message.
2416
-     * @param {SDP} oldSDP the old local SDP which will be compared with
2417
-     * the current one.
2418
-     * @return {boolean} <tt>true</tt> if there was any change or <tt>false</tt>
2419
-     * otherwise.
2420
-     * @private
2421
-     */
2422
-    _verifyNoSSRCChanged(operationName, oldSDP) {
2423
-        const currentLocalSDP
2424
-            = new SDP(this.peerconnection.localDescription.sdp);
2425
-        let sdpDiff = new SDPDiffer(oldSDP, currentLocalSDP);
2426
-        const addedMedia = sdpDiff.getNewMedia();
2427
-
2428
-        if (Object.keys(addedMedia).length) {
2429
-            logger.error(`${this} - some SSRC were added on ${operationName}`, addedMedia);
2430
-
2431
-            return false;
2432
-        }
2433
-
2434
-        sdpDiff = new SDPDiffer(currentLocalSDP, oldSDP);
2435
-        const removedMedia = sdpDiff.getNewMedia();
2436
-
2437
-        if (Object.keys(removedMedia).length) {
2438
-            logger.error(`${this} - some SSRCs were removed on ${operationName}`, removedMedia);
2439
-
2440
-            return false;
2441
-        }
2442
-
2443
-        return true;
2444
-    }
2445
-
2446 2348
     /**
2447 2349
      * Adds local track back to the peerconnection associated with this session.
2448 2350
      * @param {JitsiLocalTrack} track
@@ -2492,7 +2394,6 @@ export default class JingleSessionPC extends JingleSession {
2492 2394
 
2493 2395
                 return;
2494 2396
             }
2495
-            const oldLocalSDP = tpc.localDescription.sdp;
2496 2397
             const operationPromise
2497 2398
                 = isRemove
2498 2399
                     ? tpc.removeTrackFromPc(track)
@@ -2500,14 +2401,8 @@ export default class JingleSessionPC extends JingleSession {
2500 2401
 
2501 2402
             operationPromise
2502 2403
                 .then(shouldRenegotiate => {
2503
-                    if (shouldRenegotiate && oldLocalSDP && tpc.remoteDescription.sdp) {
2504
-                        this._renegotiate()
2505
-                            .then(() => {
2506
-                                // The results are ignored, as this check failure is not enough to fail the whole
2507
-                                // operation. It will log an error inside for plan-b.
2508
-                                !this.usesUnifiedPlan && this._verifyNoSSRCChanged(operationName, new SDP(oldLocalSDP));
2509
-                                finishedCallback();
2510
-                            });
2404
+                    if (shouldRenegotiate) {
2405
+                        this._renegotiate().then(finishedCallback);
2511 2406
                     } else {
2512 2407
                         finishedCallback();
2513 2408
                     }

+ 0
- 17
package-lock.json 查看文件

@@ -14,7 +14,6 @@
14 14
         "@jitsi/logger": "2.0.2",
15 15
         "@jitsi/rtcstats": "9.7.0",
16 16
         "@jitsi/sdp-interop": "git+https://github.com/jitsi/sdp-interop#3d49eb4aa26863a3f8d32d7581cdb4321244266b",
17
-        "@jitsi/sdp-simulcast": "0.4.0",
18 17
         "@testrtc/watchrtc-sdk": "1.36.3",
19 18
         "async-es": "3.2.4",
20 19
         "base64-js": "1.3.1",
@@ -2063,14 +2062,6 @@
2063 2062
         "sdp-verify": "checker.js"
2064 2063
       }
2065 2064
     },
2066
-    "node_modules/@jitsi/sdp-simulcast": {
2067
-      "version": "0.4.0",
2068
-      "resolved": "https://registry.npmjs.org/@jitsi/sdp-simulcast/-/sdp-simulcast-0.4.0.tgz",
2069
-      "integrity": "sha512-jXJM3/XM853UwPlxhSJx5Fc13G4158RIeTgjis3lA286Y7lp18GOR0xFlRvx/5UyhtE3qT2NzSmAwR+CpJohFw==",
2070
-      "dependencies": {
2071
-        "sdp-transform": "2.3.0"
2072
-      }
2073
-    },
2074 2065
     "node_modules/@jridgewell/gen-mapping": {
2075 2066
       "version": "0.3.2",
2076 2067
       "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz",
@@ -8818,14 +8809,6 @@
8818 8809
         }
8819 8810
       }
8820 8811
     },
8821
-    "@jitsi/sdp-simulcast": {
8822
-      "version": "0.4.0",
8823
-      "resolved": "https://registry.npmjs.org/@jitsi/sdp-simulcast/-/sdp-simulcast-0.4.0.tgz",
8824
-      "integrity": "sha512-jXJM3/XM853UwPlxhSJx5Fc13G4158RIeTgjis3lA286Y7lp18GOR0xFlRvx/5UyhtE3qT2NzSmAwR+CpJohFw==",
8825
-      "requires": {
8826
-        "sdp-transform": "2.3.0"
8827
-      }
8828
-    },
8829 8812
     "@jridgewell/gen-mapping": {
8830 8813
       "version": "0.3.2",
8831 8814
       "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz",

+ 0
- 1
package.json 查看文件

@@ -20,7 +20,6 @@
20 20
     "@jitsi/logger": "2.0.2",
21 21
     "@jitsi/rtcstats": "9.7.0",
22 22
     "@jitsi/sdp-interop": "git+https://github.com/jitsi/sdp-interop#3d49eb4aa26863a3f8d32d7581cdb4321244266b",
23
-    "@jitsi/sdp-simulcast": "0.4.0",
24 23
     "@testrtc/watchrtc-sdk": "1.36.3",
25 24
     "async-es": "3.2.4",
26 25
     "base64-js": "1.3.1",

+ 0
- 7
types/hand-crafted/modules/RTC/TraceablePeerConnection.d.ts 查看文件

@@ -3,7 +3,6 @@ import JitsiTrack from './JitsiTrack';
3 3
 import JitsiRemoteTrack from './JitsiRemoteTrack';
4 4
 import JitsiLocalTrack from './JitsiLocalTrack';
5 5
 import LocalSdpMunger from '../sdp/LocalSdpMunger';
6
-import SdpConsistency from '../sdp/SdpConsistency';
7 6
 import RtxModifier from '../sdp/RtxModifier';
8 7
 import SignalingLayer from '../../service/RTC/SignalingLayer';
9 8
 import { MediaType } from '../../service/RTC/MediaType';
@@ -16,7 +15,6 @@ export default function TraceablePeerConnection( rtc: RTC, id: number, signaling
16 15
   disabledCodec: string;
17 16
   preferredCodec: string;
18 17
   startSilent: boolean;
19
-  usesUnifiedPlan: boolean;
20 18
 } ): void; // TODO:
21 19
 
22 20
 export default class TraceablePeerConnection {
@@ -60,7 +58,6 @@ export default class TraceablePeerConnection {
60 58
   maxstats: unknown; // TODO:
61 59
   interop: unknown; // TODO: unknown = Interop refers to @jitsi/sdp-interop
62 60
   simulcast: unknown; // TODO: unknown = Simulcast refers to @jitsi/sdp-simulcast
63
-  sdpConsistency: SdpConsistency; // TODO:
64 61
   localSdpMunger: LocalSdpMunger; // TODO:
65 62
   eventEmitter: unknown; // TODO:
66 63
   rtxModifier: RtxModifier; // TODO:
@@ -109,14 +106,10 @@ export default class TraceablePeerConnection {
109 106
   setSenderVideoConstraint: ( frameHeight: number ) => Promise<void>;
110 107
   setVideoTransferActive: ( active: boolean ) => boolean;
111 108
   sendTones: ( tones: string, duration: number, interToneGap: number ) => void;
112
-  generateRecvonlySsrc: () => void;
113
-  clearRecvonlySsrc: () => void;
114 109
   close: () => void;
115 110
   createAnswer: ( constraints: unknown ) => unknown; // TODO:
116 111
   createOffer: ( constraints: unknown ) => unknown; // TODO:
117 112
   addIceCandidate: ( candidate: unknown ) => unknown; // TODO:
118
-  generateNewStreamSSRCInfo: (track: JitsiLocalTrack) => TraceablePeerConnection['localSSRCs'];
119
-  usesUnifiedPlan: () => boolean;
120 113
   getStats: () => unknown; // TODO:
121 114
   toString: () => string;
122 115
 }

+ 0
- 1
types/hand-crafted/modules/browser/BrowserCapabilities.d.ts 查看文件

@@ -19,6 +19,5 @@ export default class BrowserCapabilities {
19 19
   supportsGetDisplayMedia: () => boolean;
20 20
   supportsInsertableStreams: () => boolean;
21 21
   supportsAudioRed: () => boolean;
22
-  supportsUnifiedPlan: () => boolean;
23 22
   supportsVADDetection: () => boolean;
24 23
 }

+ 0
- 1
types/hand-crafted/modules/sdp/LocalSdpMunger.d.ts 查看文件

@@ -2,6 +2,5 @@ import TraceablePeerConnection from '../RTC/TraceablePeerConnection';
2 2
 
3 3
 export default class LocalSdpMunger {
4 4
   constructor( tpc: TraceablePeerConnection, localEndpointId: string );
5
-  maybeAddMutedLocalVideoTracksToSDP: ( desc: unknown ) => RTCSessionDescription; // TODO:
6 5
   transformStreamIdentifiers: ( sessionDesc: RTCSessionDescription ) => RTCSessionDescription;
7 6
 }

+ 0
- 7
types/hand-crafted/modules/sdp/SdpConsistency.d.ts 查看文件

@@ -1,7 +0,0 @@
1
-export default class SdpConsistency {
2
-  constructor( logPrefix: string );
3
-  clearVideoSsrcCache: () => void;
4
-  setPrimarySsrc: ( primarySsrc: number ) => void;
5
-  hasPrimarySsrcCached: () => void;
6
-  makeVideoPrimarySsrcsConsistent: ( sdpStr: string ) => string;
7
-}

+ 0
- 1
types/hand-crafted/modules/xmpp/JingleSessionPC.d.ts 查看文件

@@ -14,7 +14,6 @@ export default class JingleSessionPC extends JingleSession {
14 14
   sendIceFailedNotification: () => void;
15 15
   addIceCandidates: ( elem: unknown ) => void; // TODO:
16 16
   readSsrcInfo: ( contents: unknown ) => void; // TODO:
17
-  generateRecvonlySsrc: () => void;
18 17
   getConfiguredVideoCodec: () => CodecMimeType;
19 18
   acceptOffer: ( jingleOffer: JQuery, success: ( params: unknown ) => unknown, failure: ( params: unknown ) => unknown, localTracks?: JitsiLocalTrack[] ) => void; // TODO:
20 19
   invite: ( localTracks?: JitsiLocalTrack[] ) => void;

Loading…
取消
儲存