Преглед изворни кода

ref: convert to TS.

release-8443
Jaya Allamsetty пре 1 година
родитељ
комит
8e9df2166e
1 измењених фајлова са 6 додато и 4 уклоњено
  1. 6
    4
      modules/flags/FeatureFlags.ts

modules/flags/FeatureFlags.js → modules/flags/FeatureFlags.ts Прегледај датотеку

1
-
2
 import browser from '../browser';
1
 import browser from '../browser';
3
 
2
 
4
 /**
3
 /**
5
  * A global module for accessing information about different feature flags state.
4
  * A global module for accessing information about different feature flags state.
6
  */
5
  */
7
 class FeatureFlags {
6
 class FeatureFlags {
7
+    private _runInLiteMode: boolean;
8
+    private _ssrcRewriting: boolean;
9
+    
8
     /**
10
     /**
9
      * Configures the module.
11
      * Configures the module.
10
      *
12
      *
12
      * @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.
13
      * @param {boolean=} flags.ssrcRewritingEnabled - Use SSRC rewriting.
15
      * @param {boolean=} flags.ssrcRewritingEnabled - Use SSRC rewriting.
14
      */
16
      */
15
-    init(flags) {
17
+    init(flags: { runInLiteMode?: boolean | undefined; ssrcRewritingEnabled?: boolean | undefined; }) {
16
         this._runInLiteMode = Boolean(flags.runInLiteMode);
18
         this._runInLiteMode = Boolean(flags.runInLiteMode);
17
         this._ssrcRewriting = Boolean(flags.ssrcRewritingEnabled);
19
         this._ssrcRewriting = Boolean(flags.ssrcRewritingEnabled);
18
     }
20
     }
24
      *
26
      *
25
      * @returns {boolean}
27
      * @returns {boolean}
26
      */
28
      */
27
-    isRunInLiteModeEnabled() {
29
+    isRunInLiteModeEnabled(): boolean {
28
         return this._runInLiteMode && browser.supportsInsertableStreams();
30
         return this._runInLiteMode && browser.supportsInsertableStreams();
29
     }
31
     }
30
 
32
 
32
      * Checks if the clients supports re-writing of the SSRCs on the media streams by the bridge.
34
      * Checks if the clients supports re-writing of the SSRCs on the media streams by the bridge.
33
      * @returns {boolean}
35
      * @returns {boolean}
34
      */
36
      */
35
-    isSsrcRewritingSupported() {
37
+    isSsrcRewritingSupported(): boolean {
36
         return this._ssrcRewriting;
38
         return this._ssrcRewriting;
37
     }
39
     }
38
 }
40
 }

Loading…
Откажи
Сачувај