浏览代码

ref(qualitycontrol) Make ReceiveVideoController and SendVideoController default classes.

dev1
Jaya Allamsetty 3 年前
父节点
当前提交
98019e6c5d

+ 2
- 2
JitsiConference.js 查看文件

@@ -32,8 +32,8 @@ import { E2EEncryption } from './modules/e2ee/E2EEncryption';
32 32
 import E2ePing from './modules/e2eping/e2eping';
33 33
 import Jvb121EventGenerator from './modules/event/Jvb121EventGenerator';
34 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 37
 import RecordingManager from './modules/recording/RecordingManager';
38 38
 import Settings from './modules/settings/Settings';
39 39
 import AudioOutputProblemDetector from './modules/statistics/AudioOutputProblemDetector';

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

@@ -13,7 +13,7 @@ const LASTN_UNLIMITED = -1;
13 13
  * This class translates the legacy signaling format between the client and the bridge (that affects bandwidth
14 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 18
      * Creates a new instance.
19 19
      */
@@ -159,7 +159,7 @@ export class ReceiverVideoConstraints {
159 159
  * determined by the application based on how the remote video streams need to be displayed. This class is responsible
160 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 164
      * Creates a new instance for a given conference.
165 165
      *

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

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

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

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

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

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

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

@@ -1206,8 +1206,8 @@ import { E2EEncryption } from "./modules/e2ee/E2EEncryption";
1206 1206
 import { CodecSelection } from "./modules/RTC/CodecSelection";
1207 1207
 import E2ePing from "./modules/e2eping/e2eping";
1208 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 1211
 import ParticipantConnectionStatusHandler from "./modules/connectivity/ParticipantConnectionStatus";
1212 1212
 import Statistics from "./modules/statistics/statistics";
1213 1213
 import VADAudioAnalyser from "./modules/detection/VADAudioAnalyser";

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

@@ -1,67 +1,9 @@
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 2
  * This class manages the receive video contraints for a given {@link JitsiConference}. These constraints are
61 3
  * determined by the application based on how the remote video streams need to be displayed. This class is responsible
62 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 8
      * Creates a new instance for a given conference.
67 9
      *
@@ -121,3 +63,62 @@ export class ReceiveVideoController {
121 63
      */
122 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,7 +5,7 @@
5 5
  * because local tracks are shared and while JVB may have no preference, the remote p2p may have and they may be totally
6 6
  * different.
7 7
  */
8
-export class SendVideoController {
8
+export default class SendVideoController {
9 9
     /**
10 10
      * Creates new instance for a given conference.
11 11
      *

正在加载...
取消
保存