瀏覽代碼

Add a receiveMultipleVideoStreams flag. (#2056)

* Add a receiveMultipleVideoStreams flag.
dev1
bgrozev 3 年之前
父節點
當前提交
818474e6fd
沒有連結到貢獻者的電子郵件帳戶。
共有 3 個檔案被更改,包括 23 行新增0 行删除
  1. 11
    0
      modules/flags/FeatureFlags.js
  2. 4
    0
      modules/xmpp/xmpp.js
  3. 8
    0
      types/auto/modules/flags/FeatureFlags.d.ts

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

13
      *
13
      *
14
      * @param {boolean} flags.runInLiteMode - Enables lite mode for testing to disable media decoding.
14
      * @param {boolean} flags.runInLiteMode - Enables lite mode for testing to disable media decoding.
15
      * @param {boolean} flags.sourceNameSignaling - Enables source names in the signaling.
15
      * @param {boolean} flags.sourceNameSignaling - Enables source names in the signaling.
16
+     * @param {boolean} flags.receiveMultipleVideoStreams - Signal support for receiving multiple video streams.
16
      */
17
      */
17
     init(flags) {
18
     init(flags) {
18
         this._runInLiteMode = Boolean(flags.runInLiteMode);
19
         this._runInLiteMode = Boolean(flags.runInLiteMode);
19
 
20
 
20
         this._sourceNameSignaling = Boolean(flags.sourceNameSignaling);
21
         this._sourceNameSignaling = Boolean(flags.sourceNameSignaling);
22
+        this._receiveMultipleVideoStreams = Boolean(flags.receiveMultipleVideoStreams);
21
         this._sendMultipleVideoStreams = Boolean(flags.sendMultipleVideoStreams);
23
         this._sendMultipleVideoStreams = Boolean(flags.sendMultipleVideoStreams);
22
         this._ssrcRewriting = Boolean(flags.ssrcRewritingOnBridgeSupported);
24
         this._ssrcRewriting = Boolean(flags.ssrcRewritingOnBridgeSupported);
23
 
25
 
40
         return this._sourceNameSignaling && this._sendMultipleVideoStreams && this._usesUnifiedPlan;
42
         return this._sourceNameSignaling && this._sendMultipleVideoStreams && this._usesUnifiedPlan;
41
     }
43
     }
42
 
44
 
45
+    /**
46
+     * Checks if receiving multiple video streams is supported.
47
+     *
48
+     * @returns {boolean}
49
+     */
50
+    isReceiveMultipleVideoStreamsSupported() {
51
+        return this._receiveMultipleVideoStreams;
52
+    }
53
+
43
     /**
54
     /**
44
      * Checks if the run in lite mode is enabled.
55
      * Checks if the run in lite mode is enabled.
45
      * This will cause any media to be received and not decoded. (Directions are inactive and no ssrc and ssrc-groups
56
      * This will cause any media to be received and not decoded. (Directions are inactive and no ssrc and ssrc-groups

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

260
             logger.info('Source-name signaling is enabled');
260
             logger.info('Source-name signaling is enabled');
261
             this.caps.addFeature('http://jitsi.org/source-name');
261
             this.caps.addFeature('http://jitsi.org/source-name');
262
         }
262
         }
263
+        if (FeatureFlags.isReceiveMultipleVideoStreamsSupported()) {
264
+            logger.info('Receiving multiple video streams is enabled');
265
+            this.caps.addFeature('http://jitsi.org/receive-multiple-video-streams');
266
+        }
263
 
267
 
264
         if (FeatureFlags.isSsrcRewritingSupported()) {
268
         if (FeatureFlags.isSsrcRewritingSupported()) {
265
             logger.info('SSRC rewriting is supported');
269
             logger.info('SSRC rewriting is supported');

+ 8
- 0
types/auto/modules/flags/FeatureFlags.d.ts 查看文件

9
      *
9
      *
10
      * @param {boolean} flags.runInLiteMode - Enables lite mode for testing to disable media decoding.
10
      * @param {boolean} flags.runInLiteMode - Enables lite mode for testing to disable media decoding.
11
      * @param {boolean} flags.sourceNameSignaling - Enables source names in the signaling.
11
      * @param {boolean} flags.sourceNameSignaling - Enables source names in the signaling.
12
+     * @param {boolean} flags.receiveMultipleVideoStreams - Signal support for receiving multiple video streams.
12
      */
13
      */
13
     init(flags: any): void;
14
     init(flags: any): void;
14
     _runInLiteMode: boolean;
15
     _runInLiteMode: boolean;
15
     _sourceNameSignaling: boolean;
16
     _sourceNameSignaling: boolean;
17
+    _receiveMultipleVideoStreams: boolean;
16
     _sendMultipleVideoStreams: boolean;
18
     _sendMultipleVideoStreams: boolean;
17
     _ssrcRewriting: boolean;
19
     _ssrcRewriting: boolean;
18
     _usesUnifiedPlan: any;
20
     _usesUnifiedPlan: any;
22
      * @returns {boolean}
24
      * @returns {boolean}
23
      */
25
      */
24
     isMultiStreamSupportEnabled(): boolean;
26
     isMultiStreamSupportEnabled(): boolean;
27
+    /**
28
+     * Checks if receiving multiple video streams is supported.
29
+     *
30
+     * @returns {boolean}
31
+     */
32
+    isReceiveMultipleVideoStreamsSupported(): boolean;
25
     /**
33
     /**
26
      * Checks if the run in lite mode is enabled.
34
      * Checks if the run in lite mode is enabled.
27
      * This will cause any media to be received and not decoded. (Directions are inactive and no ssrc and ssrc-groups
35
      * This will cause any media to be received and not decoded. (Directions are inactive and no ssrc and ssrc-groups

Loading…
取消
儲存