浏览代码

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,11 +13,13 @@ class FeatureFlags {
13 13
      *
14 14
      * @param {boolean} flags.runInLiteMode - Enables lite mode for testing to disable media decoding.
15 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 18
     init(flags) {
18 19
         this._runInLiteMode = Boolean(flags.runInLiteMode);
19 20
 
20 21
         this._sourceNameSignaling = Boolean(flags.sourceNameSignaling);
22
+        this._receiveMultipleVideoStreams = Boolean(flags.receiveMultipleVideoStreams);
21 23
         this._sendMultipleVideoStreams = Boolean(flags.sendMultipleVideoStreams);
22 24
         this._ssrcRewriting = Boolean(flags.ssrcRewritingOnBridgeSupported);
23 25
 
@@ -40,6 +42,15 @@ class FeatureFlags {
40 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 55
      * Checks if the run in lite mode is enabled.
45 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,6 +260,10 @@ export default class XMPP extends Listenable {
260 260
             logger.info('Source-name signaling is enabled');
261 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 268
         if (FeatureFlags.isSsrcRewritingSupported()) {
265 269
             logger.info('SSRC rewriting is supported');

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

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

正在加载...
取消
保存