瀏覽代碼

ref(qualitycontrol) Make ReceiveVideoController and SendVideoController default classes.

dev1
Jaya Allamsetty 3 年之前
父節點
當前提交
98019e6c5d

+ 2
- 2
JitsiConference.js 查看文件

32
 import E2ePing from './modules/e2eping/e2eping';
32
 import E2ePing from './modules/e2eping/e2eping';
33
 import Jvb121EventGenerator from './modules/event/Jvb121EventGenerator';
33
 import Jvb121EventGenerator from './modules/event/Jvb121EventGenerator';
34
 import FeatureFlags from './modules/flags/FeatureFlags';
34
 import FeatureFlags from './modules/flags/FeatureFlags';
35
-import { ReceiveVideoController } from './modules/qualitycontrol/ReceiveVideoController';
36
-import { SendVideoController } from './modules/qualitycontrol/SendVideoController';
35
+import ReceiveVideoController from './modules/qualitycontrol/ReceiveVideoController';
36
+import SendVideoController from './modules/qualitycontrol/SendVideoController';
37
 import RecordingManager from './modules/recording/RecordingManager';
37
 import RecordingManager from './modules/recording/RecordingManager';
38
 import Settings from './modules/settings/Settings';
38
 import Settings from './modules/settings/Settings';
39
 import AudioOutputProblemDetector from './modules/statistics/AudioOutputProblemDetector';
39
 import AudioOutputProblemDetector from './modules/statistics/AudioOutputProblemDetector';

+ 2
- 2
modules/qualitycontrol/ReceiveVideoController.js 查看文件

13
  * This class translates the legacy signaling format between the client and the bridge (that affects bandwidth
13
  * This class translates the legacy signaling format between the client and the bridge (that affects bandwidth
14
  * allocation) to the new format described here https://github.com/jitsi/jitsi-videobridge/blob/master/doc/allocation.md
14
  * allocation) to the new format described here https://github.com/jitsi/jitsi-videobridge/blob/master/doc/allocation.md
15
  */
15
  */
16
-export class ReceiverVideoConstraints {
16
+class ReceiverVideoConstraints {
17
     /**
17
     /**
18
      * Creates a new instance.
18
      * Creates a new instance.
19
      */
19
      */
159
  * determined by the application based on how the remote video streams need to be displayed. This class is responsible
159
  * determined by the application based on how the remote video streams need to be displayed. This class is responsible
160
  * for communicating these constraints to the bridge over the bridge channel.
160
  * for communicating these constraints to the bridge over the bridge channel.
161
  */
161
  */
162
-export class ReceiveVideoController {
162
+export default class ReceiveVideoController {
163
     /**
163
     /**
164
      * Creates a new instance for a given conference.
164
      * Creates a new instance for a given conference.
165
      *
165
      *

+ 1
- 1
modules/qualitycontrol/ReceiveVideoController.spec.js 查看文件

1
 import FeatureFlags from '../flags/FeatureFlags';
1
 import FeatureFlags from '../flags/FeatureFlags';
2
 import Listenable from '../util/Listenable';
2
 import Listenable from '../util/Listenable';
3
 
3
 
4
-import { ReceiveVideoController } from './ReceiveVideoController';
4
+import ReceiveVideoController from './ReceiveVideoController';
5
 
5
 
6
 // JSDocs disabled for Mock classes to avoid duplication - check on the original classes for info.
6
 // JSDocs disabled for Mock classes to avoid duplication - check on the original classes for info.
7
 /* eslint-disable require-jsdoc */
7
 /* eslint-disable require-jsdoc */

+ 1
- 1
modules/qualitycontrol/SendVideoController.js 查看文件

9
  * because local tracks are shared and while JVB may have no preference, the remote p2p may have and they may be totally
9
  * because local tracks are shared and while JVB may have no preference, the remote p2p may have and they may be totally
10
  * different.
10
  * different.
11
  */
11
  */
12
-export class SendVideoController {
12
+export default class SendVideoController {
13
     /**
13
     /**
14
      * Creates new instance for a given conference.
14
      * Creates new instance for a given conference.
15
      *
15
      *

+ 1
- 1
modules/qualitycontrol/SendVideoController.spec.js 查看文件

3
 import Listenable from '../util/Listenable';
3
 import Listenable from '../util/Listenable';
4
 import MediaSessionEvents from '../xmpp/MediaSessionEvents';
4
 import MediaSessionEvents from '../xmpp/MediaSessionEvents';
5
 
5
 
6
-import { SendVideoController } from './SendVideoController';
6
+import SendVideoController from './SendVideoController';
7
 
7
 
8
 // JSDocs disabled for Mock classes to avoid duplication - check on the original classes for info.
8
 // JSDocs disabled for Mock classes to avoid duplication - check on the original classes for info.
9
 /* eslint-disable require-jsdoc */
9
 /* eslint-disable require-jsdoc */

+ 2
- 2
types/auto/JitsiConference.d.ts 查看文件

1206
 import { CodecSelection } from "./modules/RTC/CodecSelection";
1206
 import { CodecSelection } from "./modules/RTC/CodecSelection";
1207
 import E2ePing from "./modules/e2eping/e2eping";
1207
 import E2ePing from "./modules/e2eping/e2eping";
1208
 import RTC from "./modules/RTC/RTC";
1208
 import RTC from "./modules/RTC/RTC";
1209
-import { ReceiveVideoController } from "./modules/qualitycontrol/ReceiveVideoController";
1210
-import { SendVideoController } from "./modules/qualitycontrol/SendVideoController";
1209
+import ReceiveVideoController from "./modules/qualitycontrol/ReceiveVideoController";
1210
+import SendVideoController from "./modules/qualitycontrol/SendVideoController";
1211
 import ParticipantConnectionStatusHandler from "./modules/connectivity/ParticipantConnectionStatus";
1211
 import ParticipantConnectionStatusHandler from "./modules/connectivity/ParticipantConnectionStatus";
1212
 import Statistics from "./modules/statistics/statistics";
1212
 import Statistics from "./modules/statistics/statistics";
1213
 import VADAudioAnalyser from "./modules/detection/VADAudioAnalyser";
1213
 import VADAudioAnalyser from "./modules/detection/VADAudioAnalyser";

+ 60
- 59
types/auto/modules/qualitycontrol/ReceiveVideoController.d.ts 查看文件

1
-/**
2
- * This class translates the legacy signaling format between the client and the bridge (that affects bandwidth
3
- * allocation) to the new format described here https://github.com/jitsi/jitsi-videobridge/blob/master/doc/allocation.md
4
- */
5
-export class ReceiverVideoConstraints {
6
-    _defaultConstraints: {
7
-        maxHeight: number;
8
-    };
9
-    _lastN: number;
10
-    _maxFrameHeight: number;
11
-    _selectedEndpoints: any[];
12
-    _receiverVideoConstraints: {
13
-        constraints: {};
14
-        defaultConstraints: any;
15
-        lastN: number;
16
-        onStageEndpoints: any[];
17
-        selectedEndpoints: any[];
18
-    };
19
-    /**
20
-     * Returns the receiver video constraints that need to be sent on the bridge channel.
21
-     */
22
-    get constraints(): {
23
-        constraints: {};
24
-        defaultConstraints: any;
25
-        lastN: number;
26
-        onStageEndpoints: any[];
27
-        selectedEndpoints: any[];
28
-    };
29
-    /**
30
-     * Updates the lastN field of the ReceiverVideoConstraints sent to the bridge.
31
-     *
32
-     * @param {number} value
33
-     * @returns {boolean} Returns true if the the value has been updated, false otherwise.
34
-     */
35
-    updateLastN(value: number): boolean;
36
-    /**
37
-     * Updates the resolution (height requested) in the contraints field of the ReceiverVideoConstraints
38
-     * sent to the bridge.
39
-     *
40
-     * @param {number} maxFrameHeight
41
-     * @requires {boolean} Returns true if the the value has been updated, false otherwise.
42
-     */
43
-    updateReceiveResolution(maxFrameHeight: number): boolean;
44
-    /**
45
-     * Updates the receiver constraints sent to the bridge.
46
-     *
47
-     * @param {Object} videoConstraints
48
-     * @returns {boolean} Returns true if the the value has been updated, false otherwise.
49
-     */
50
-    updateReceiverVideoConstraints(videoConstraints: any): boolean;
51
-    /**
52
-     * Updates the list of selected endpoints.
53
-     *
54
-     * @param {Array<string>} ids
55
-     * @returns {void}
56
-     */
57
-    updateSelectedEndpoints(ids: Array<string>): void;
58
-}
59
 /**
1
 /**
60
  * This class manages the receive video contraints for a given {@link JitsiConference}. These constraints are
2
  * This class manages the receive video contraints for a given {@link JitsiConference}. These constraints are
61
  * determined by the application based on how the remote video streams need to be displayed. This class is responsible
3
  * determined by the application based on how the remote video streams need to be displayed. This class is responsible
62
  * for communicating these constraints to the bridge over the bridge channel.
4
  * for communicating these constraints to the bridge over the bridge channel.
63
  */
5
  */
64
-export class ReceiveVideoController {
6
+export default class ReceiveVideoController {
65
     /**
7
     /**
66
      * Creates a new instance for a given conference.
8
      * Creates a new instance for a given conference.
67
      *
9
      *
121
      */
63
      */
122
     setReceiverConstraints(constraints: any): void;
64
     setReceiverConstraints(constraints: any): void;
123
 }
65
 }
66
+/**
67
+ * This class translates the legacy signaling format between the client and the bridge (that affects bandwidth
68
+ * allocation) to the new format described here https://github.com/jitsi/jitsi-videobridge/blob/master/doc/allocation.md
69
+ */
70
+declare class ReceiverVideoConstraints {
71
+    _defaultConstraints: {
72
+        maxHeight: number;
73
+    };
74
+    _lastN: number;
75
+    _maxFrameHeight: number;
76
+    _selectedEndpoints: any[];
77
+    _receiverVideoConstraints: {
78
+        constraints: {};
79
+        defaultConstraints: any;
80
+        lastN: number;
81
+        onStageEndpoints: any[];
82
+        selectedEndpoints: any[];
83
+    };
84
+    /**
85
+     * Returns the receiver video constraints that need to be sent on the bridge channel.
86
+     */
87
+    get constraints(): {
88
+        constraints: {};
89
+        defaultConstraints: any;
90
+        lastN: number;
91
+        onStageEndpoints: any[];
92
+        selectedEndpoints: any[];
93
+    };
94
+    /**
95
+     * Updates the lastN field of the ReceiverVideoConstraints sent to the bridge.
96
+     *
97
+     * @param {number} value
98
+     * @returns {boolean} Returns true if the the value has been updated, false otherwise.
99
+     */
100
+    updateLastN(value: number): boolean;
101
+    /**
102
+     * Updates the resolution (height requested) in the contraints field of the ReceiverVideoConstraints
103
+     * sent to the bridge.
104
+     *
105
+     * @param {number} maxFrameHeight
106
+     * @requires {boolean} Returns true if the the value has been updated, false otherwise.
107
+     */
108
+    updateReceiveResolution(maxFrameHeight: number): boolean;
109
+    /**
110
+     * Updates the receiver constraints sent to the bridge.
111
+     *
112
+     * @param {Object} videoConstraints
113
+     * @returns {boolean} Returns true if the the value has been updated, false otherwise.
114
+     */
115
+    updateReceiverVideoConstraints(videoConstraints: any): boolean;
116
+    /**
117
+     * Updates the list of selected endpoints.
118
+     *
119
+     * @param {Array<string>} ids
120
+     * @returns {void}
121
+     */
122
+    updateSelectedEndpoints(ids: Array<string>): void;
123
+}
124
+export {};

+ 1
- 1
types/auto/modules/qualitycontrol/SendVideoController.d.ts 查看文件

5
  * because local tracks are shared and while JVB may have no preference, the remote p2p may have and they may be totally
5
  * because local tracks are shared and while JVB may have no preference, the remote p2p may have and they may be totally
6
  * different.
6
  * different.
7
  */
7
  */
8
-export class SendVideoController {
8
+export default class SendVideoController {
9
     /**
9
     /**
10
      * Creates new instance for a given conference.
10
      * Creates new instance for a given conference.
11
      *
11
      *

Loading…
取消
儲存