瀏覽代碼

fix(multi-stream) Set the source name of replaced track before configuring it.

With just source-name enabled, set the source name of the replaced track before configuring the encodings, this fixes an issues where the sender constraints are not applied on the p2p connection because the source name is undefined.
tags/v0.0.2
Jaya Allamsetty 3 年之前
父節點
當前提交
7251f3aab5
共有 2 個文件被更改,包括 8 次插入4 次删除
  1. 0
    4
      JitsiConference.js
  2. 8
    0
      modules/xmpp/JingleSessionPC.js

+ 0
- 4
JitsiConference.js 查看文件

@@ -1282,10 +1282,6 @@ JitsiConference.prototype.replaceTrack = function(oldTrack, newTrack) {
1282 1282
         logger.warn(`JitsiConference.replaceTrack oldTrack (${oldTrack} does not belong to this conference`);
1283 1283
     }
1284 1284
 
1285
-    if (FeatureFlags.isMultiStreamSupportEnabled() && oldTrack && newTrack && oldTrack.isVideoTrack()) {
1286
-        newTrack.setSourceName(oldTrack.getSourceName());
1287
-    }
1288
-
1289 1285
     // Now replace the stream at the lower levels
1290 1286
     return this._doReplaceTrack(oldTrackBelongsToConference ? oldTrack : null, newTrack)
1291 1287
         .then(() => {

+ 8
- 0
modules/xmpp/JingleSessionPC.js 查看文件

@@ -2259,6 +2259,14 @@ export default class JingleSessionPC extends JingleSession {
2259 2259
                     }
2260 2260
 
2261 2261
                     return promise.then(() => {
2262
+                        // Set the source name of the new track.
2263
+                        if (FeatureFlags.isSourceNameSignalingEnabled()
2264
+                            && oldTrack
2265
+                            && newTrack
2266
+                            && oldTrack.isVideoTrack()) {
2267
+                            newTrack.setSourceName(oldTrack.getSourceName());
2268
+                        }
2269
+
2262 2270
                         if (newTrack?.isVideoTrack()) {
2263 2271
                             logger.debug(`${this} replaceTrack worker: configuring video stream`);
2264 2272
 

Loading…
取消
儲存