fcr-core 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/base-session.d.ts +3 -0
- package/lib/base-session.js +8 -0
- package/lib/chat-connection/config.d.ts +51 -0
- package/lib/chat-connection/config.js +105 -0
- package/lib/chat-connection/index.d.ts +25 -0
- package/lib/chat-connection/index.js +118 -0
- package/lib/chat-connection/type.d.ts +17 -0
- package/lib/chat-connection/type.js +12 -0
- package/lib/engine/index.d.ts +86 -0
- package/lib/engine/index.js +317 -0
- package/lib/imports.d.ts +43 -0
- package/lib/imports.js +322 -0
- package/lib/index.d.ts +22 -0
- package/lib/index.js +140 -0
- package/lib/media-control/desktop.d.ts +1 -0
- package/lib/media-control/desktop.js +120 -0
- package/lib/media-control/mobile.d.ts +1 -0
- package/lib/media-control/mobile.js +168 -0
- package/lib/media-control/type.d.ts +640 -0
- package/lib/media-control/type.js +5 -0
- package/lib/monitor-control/index.d.ts +1 -0
- package/lib/monitor-control/index.js +22 -0
- package/lib/monitor-control/type.d.ts +16 -0
- package/lib/monitor-control/type.js +5 -0
- package/lib/peer-session/index.d.ts +1 -0
- package/lib/peer-session/index.js +286 -0
- package/lib/peer-session/type.d.ts +54 -0
- package/lib/peer-session/type.js +5 -0
- package/lib/plugins/chatroom.d.ts +1 -0
- package/lib/plugins/chatroom.js +331 -0
- package/lib/plugins/electron-rtc-plugin.d.ts +1 -0
- package/lib/plugins/electron-rtc-plugin.js +13 -0
- package/lib/plugins/rtm-plugin.d.ts +1 -0
- package/lib/plugins/rtm-plugin.js +13 -0
- package/lib/plugins/web-rtc-plugin.d.ts +1 -0
- package/lib/plugins/web-rtc-plugin.js +13 -0
- package/lib/room-control/chatroom-control/config.d.ts +51 -0
- package/lib/room-control/chatroom-control/config.js +105 -0
- package/lib/room-control/chatroom-control/index.d.ts +1 -0
- package/lib/room-control/chatroom-control/index.js +323 -0
- package/lib/room-control/chatroom-control/type.d.ts +95 -0
- package/lib/room-control/chatroom-control/type.js +18 -0
- package/lib/room-control/group-control/index.d.ts +25 -0
- package/lib/room-control/group-control/index.js +227 -0
- package/lib/room-control/index.d.ts +1 -0
- package/lib/room-control/index.js +459 -0
- package/lib/room-control/interpreter-control/index.d.ts +1 -0
- package/lib/room-control/interpreter-control/index.js +136 -0
- package/lib/room-control/interpreter-control/room.d.ts +1 -0
- package/lib/room-control/interpreter-control/room.js +22 -0
- package/lib/room-control/interpreter-control/types.d.ts +66 -0
- package/lib/room-control/interpreter-control/types.js +32 -0
- package/lib/room-control/mainroom-control/index.d.ts +1 -0
- package/lib/room-control/mainroom-control/index.js +181 -0
- package/lib/room-control/privilege-control/helper.d.ts +9 -0
- package/lib/room-control/privilege-control/helper.js +43 -0
- package/lib/room-control/privilege-control/index.d.ts +1 -0
- package/lib/room-control/privilege-control/index.js +245 -0
- package/lib/room-control/privilege-control/type.d.ts +293 -0
- package/lib/room-control/privilege-control/type.js +141 -0
- package/lib/room-control/room-connector-control/index.d.ts +1 -0
- package/lib/room-control/room-connector-control/index.js +160 -0
- package/lib/room-control/room-connector-control/type.d.ts +102 -0
- package/lib/room-control/room-connector-control/type.js +34 -0
- package/lib/room-control/room-session/index.d.ts +1 -0
- package/lib/room-control/room-session/index.js +286 -0
- package/lib/room-control/room-session/type.d.ts +61 -0
- package/lib/room-control/room-session/type.js +5 -0
- package/lib/room-control/stream-control/index.d.ts +1 -0
- package/lib/room-control/stream-control/index.js +341 -0
- package/lib/room-control/stream-control/type.d.ts +209 -0
- package/lib/room-control/stream-control/type.js +5 -0
- package/lib/room-control/type.d.ts +281 -0
- package/lib/room-control/type.js +23 -0
- package/lib/room-control/user-control/index.d.ts +1 -0
- package/lib/room-control/user-control/index.js +318 -0
- package/lib/room-control/user-control/type.d.ts +177 -0
- package/lib/room-control/user-control/type.js +17 -0
- package/lib/room-control/waitingroom-control/index.d.ts +1 -0
- package/lib/room-control/waitingroom-control/index.js +46 -0
- package/lib/room-control/whiteboard-control/board-window.d.ts +47 -0
- package/lib/room-control/whiteboard-control/board-window.js +396 -0
- package/lib/room-control/whiteboard-control/enums.d.ts +164 -0
- package/lib/room-control/whiteboard-control/enums.js +96 -0
- package/lib/room-control/whiteboard-control/index.d.ts +1 -0
- package/lib/room-control/whiteboard-control/index.js +342 -0
- package/lib/room-control/whiteboard-control/mount-manager.d.ts +4 -0
- package/lib/room-control/whiteboard-control/mount-manager.js +15 -0
- package/lib/room-control/whiteboard-control/types.d.ts +330 -0
- package/lib/room-control/whiteboard-control/types.js +12 -0
- package/lib/room-control/whiteboard-control/utils.d.ts +51 -0
- package/lib/room-control/whiteboard-control/utils.js +273 -0
- package/lib/room-control/whiteboard-control-v2/index.d.ts +35 -0
- package/lib/room-control/whiteboard-control-v2/index.js +242 -0
- package/lib/room-control/whiteboard-control-v2/main-window.d.ts +33 -0
- package/lib/room-control/whiteboard-control-v2/main-window.js +213 -0
- package/lib/room-control/whiteboard-control-v2/utils.d.ts +3 -0
- package/lib/room-control/whiteboard-control-v2/utils.js +39 -0
- package/lib/service/api.d.ts +401 -0
- package/lib/service/api.js +924 -0
- package/lib/service/type.d.ts +7 -0
- package/lib/service/type.js +5 -0
- package/lib/type.d.ts +254 -0
- package/lib/type.js +87 -0
- package/lib/utilities/cmd.d.ts +1 -0
- package/lib/utilities/cmd.js +7 -0
- package/lib/utilities/collection.d.ts +22 -0
- package/lib/utilities/collection.js +74 -0
- package/lib/utilities/error.d.ts +41 -0
- package/lib/utilities/error.js +68 -0
- package/lib/utilities/package-info.d.ts +1 -0
- package/lib/utilities/package-info.js +12 -0
- package/lib/utilities/parameters.d.ts +9 -0
- package/lib/utilities/parameters.js +30 -0
- package/lib/utilities/stream.d.ts +27 -0
- package/lib/utilities/stream.js +34 -0
- package/lib/utilities/user.d.ts +7 -0
- package/lib/utilities/user.js +34 -0
- package/package.json +98 -0
|
@@ -0,0 +1,640 @@
|
|
|
1
|
+
import { AgoraRteAudioRawDataConfig, AgoraRteBeautyOptions, AgoraRteCameraPosition, AgoraRteScreenCaptureParams, AgoraRteScreenCaptureType, AgoraRteVirtualBackgroundOptions, AgoraRteVideoOrientation, AgoraRteCameraCaptureParams, AgoraRtcAudioOutputRouting } from '../imports';
|
|
2
|
+
import { FcrDeviceInfo, FcrDeviceType, FcrDisplayInfo, FcrRenderView, FcrWindowInfo } from '../type';
|
|
3
|
+
import { FcrMediaSourceState, FcrVideoRenderMode, FcrAiDenoiseLevel, FcrVideoSourceType, FcrAudioSourceType, FcrCapability } from '..';
|
|
4
|
+
export type FcrAudioOutputRouting = AgoraRtcAudioOutputRouting;
|
|
5
|
+
export type FcrDesktopMediaObserver = {
|
|
6
|
+
/**
|
|
7
|
+
* Callback to receive the auto play failed event.
|
|
8
|
+
*/
|
|
9
|
+
onAutoPlayFailed?(): void;
|
|
10
|
+
/**
|
|
11
|
+
* Callback when a camera is added.
|
|
12
|
+
* @param device
|
|
13
|
+
*/
|
|
14
|
+
onCameraAdded?(device: FcrDeviceInfo): void;
|
|
15
|
+
/**
|
|
16
|
+
* Callback when a camera is removed.
|
|
17
|
+
* @param device
|
|
18
|
+
*/
|
|
19
|
+
onCameraRemoved?(device: FcrDeviceInfo): void;
|
|
20
|
+
/**
|
|
21
|
+
* Callback when a microphone is added.
|
|
22
|
+
* @param device
|
|
23
|
+
*/
|
|
24
|
+
onMicrophoneAdded?(device: FcrDeviceInfo): void;
|
|
25
|
+
/**
|
|
26
|
+
* Callback when a microphone is removed.
|
|
27
|
+
* @param device
|
|
28
|
+
*/
|
|
29
|
+
onMicrophoneRemoved?(device: FcrDeviceInfo): void;
|
|
30
|
+
/**
|
|
31
|
+
* Callback when a speaker is added.
|
|
32
|
+
* @param device
|
|
33
|
+
*/
|
|
34
|
+
onSpeakerAdded?(device: FcrDeviceInfo): void;
|
|
35
|
+
/**
|
|
36
|
+
* Callback when a speaker is removed.
|
|
37
|
+
* @param device
|
|
38
|
+
*/
|
|
39
|
+
onSpeakerRemoved?(device: FcrDeviceInfo): void;
|
|
40
|
+
/**
|
|
41
|
+
* Callback to receive the volume indication of the speaker test.
|
|
42
|
+
* @param volume
|
|
43
|
+
*/
|
|
44
|
+
onSpeakerTestVolumeIndicationUpdated?(volume: number): void;
|
|
45
|
+
/**
|
|
46
|
+
* Callback to receive the volume changes of the selected speaker.
|
|
47
|
+
* @param volume
|
|
48
|
+
* @param muted
|
|
49
|
+
*/
|
|
50
|
+
onSelectedSpeakerVolumeUpdated?(volume: number, muted: boolean): void;
|
|
51
|
+
};
|
|
52
|
+
export type FcrMobileMediaObserver = {
|
|
53
|
+
/**
|
|
54
|
+
* Callback to receive the auto play failed event.
|
|
55
|
+
*/
|
|
56
|
+
onAutoPlayFailed?(): void;
|
|
57
|
+
onCameraStateUpdated?(state: FcrMediaSourceState): void;
|
|
58
|
+
onMicrophoneStateUpdated?(state: FcrMediaSourceState): void;
|
|
59
|
+
onMicrophoneVolumeIndicationUpdated?(volume: number): void;
|
|
60
|
+
onOutputVolumeIndicationUpdated?(volume: number): void;
|
|
61
|
+
onAudioOutputRoutingUpdated?(routing: FcrAudioOutputRouting): void;
|
|
62
|
+
onScreenCaptureStateUpdated?(state: FcrMediaSourceState): void;
|
|
63
|
+
};
|
|
64
|
+
export type FcrScreenTrackObserver = {
|
|
65
|
+
/**
|
|
66
|
+
* Callback to receive the state changes of the screen video track.
|
|
67
|
+
* @param sourceId
|
|
68
|
+
* @param state
|
|
69
|
+
*/
|
|
70
|
+
onScreenCaptureStateUpdated?(sourceId: string, state: FcrMediaSourceState): void;
|
|
71
|
+
};
|
|
72
|
+
export type FcrMicrophoneTrackObserver = {
|
|
73
|
+
/**
|
|
74
|
+
* Callback to receive the state changes of the microphone audio track.
|
|
75
|
+
* @param deviceId
|
|
76
|
+
* @param state
|
|
77
|
+
*/
|
|
78
|
+
onMicrophoneStateUpdated?(deviceId: string, state: FcrMediaSourceState): void;
|
|
79
|
+
/**
|
|
80
|
+
* Callback to receive the volume indication of the microphone.
|
|
81
|
+
* @param deviceId
|
|
82
|
+
* @param volume
|
|
83
|
+
*/
|
|
84
|
+
onVolumeIndicationUpdated?(deviceId: string, volume: number): void;
|
|
85
|
+
};
|
|
86
|
+
export type FcrCameraTrackObserver = {
|
|
87
|
+
/**
|
|
88
|
+
* Callback to receive the state changes of the camera video track.
|
|
89
|
+
* @param deviceId
|
|
90
|
+
* @param state
|
|
91
|
+
*/
|
|
92
|
+
onCameraStateUpdated?: (deviceId: string, state: FcrMediaSourceState) => void;
|
|
93
|
+
};
|
|
94
|
+
export type FcrLoopbackObserver = {
|
|
95
|
+
/**
|
|
96
|
+
* Callback to receive the state changes of the loopback audio track.
|
|
97
|
+
* @param deviceId
|
|
98
|
+
* @param state
|
|
99
|
+
*/
|
|
100
|
+
onLoopbackStateUpdated?: (deviceId: string, state: FcrMediaSourceState) => void;
|
|
101
|
+
};
|
|
102
|
+
export type FcrRenderConfig = {
|
|
103
|
+
renderMode: FcrVideoRenderMode;
|
|
104
|
+
isMirror: boolean;
|
|
105
|
+
};
|
|
106
|
+
export type FcrBeautyOptions = AgoraRteBeautyOptions;
|
|
107
|
+
export type FcrVirtualBackgroundOptions = AgoraRteVirtualBackgroundOptions;
|
|
108
|
+
export type FcrCameraPosition = AgoraRteCameraPosition;
|
|
109
|
+
export type FcrAudioRawDataConfig = AgoraRteAudioRawDataConfig;
|
|
110
|
+
export type FcrScreenCaptureParams = AgoraRteScreenCaptureParams;
|
|
111
|
+
export type FcrScreenCaptureType = AgoraRteScreenCaptureType;
|
|
112
|
+
export type FcrCameraCaptureParams = AgoraRteCameraCaptureParams;
|
|
113
|
+
export type FcrVideoOrientation = AgoraRteVideoOrientation;
|
|
114
|
+
export interface FcrAudioEffectEnhancer {
|
|
115
|
+
/**
|
|
116
|
+
* Enables the AI denoiser for the audio track.
|
|
117
|
+
*/
|
|
118
|
+
enableAiDenoiser(): void;
|
|
119
|
+
/**
|
|
120
|
+
* Disables the AI denoiser for the audio track.
|
|
121
|
+
*/
|
|
122
|
+
disableAiDenoiser(): void;
|
|
123
|
+
/**
|
|
124
|
+
* Sets the AI denoiser level for the audio track.
|
|
125
|
+
* @param level The AI denoiser level to set.
|
|
126
|
+
*/
|
|
127
|
+
setAiDenoiseLevel(level: FcrAiDenoiseLevel): void;
|
|
128
|
+
/**
|
|
129
|
+
* Enables HiFi mode for the audio track.
|
|
130
|
+
*/
|
|
131
|
+
enableHiFiMode(): void;
|
|
132
|
+
/**
|
|
133
|
+
* Disables HiFi mode for the audio track.
|
|
134
|
+
*/
|
|
135
|
+
disableHiFiMode(): void;
|
|
136
|
+
/**
|
|
137
|
+
* Enables echo cancellation for the audio track.
|
|
138
|
+
*/
|
|
139
|
+
enableEchoCancellation(): void;
|
|
140
|
+
/**
|
|
141
|
+
* Disables echo cancellation for the audio track.
|
|
142
|
+
*/
|
|
143
|
+
disableEchoCancellation(): void;
|
|
144
|
+
/**
|
|
145
|
+
* Enables stereo mode for the audio track.
|
|
146
|
+
*/
|
|
147
|
+
enableStereoMode(): void;
|
|
148
|
+
/**
|
|
149
|
+
* Disables stereo mode for the audio track.
|
|
150
|
+
*/
|
|
151
|
+
disableStereoMode(): void;
|
|
152
|
+
/**
|
|
153
|
+
* Enables original sound mode for the audio track.
|
|
154
|
+
*/
|
|
155
|
+
enableOriginalSoundMode(): void;
|
|
156
|
+
/**
|
|
157
|
+
* Disables original sound mode for the audio track.
|
|
158
|
+
*/
|
|
159
|
+
disableOriginalSoundMode(): void;
|
|
160
|
+
}
|
|
161
|
+
export interface FcrVideoEffectEnhancer {
|
|
162
|
+
/**
|
|
163
|
+
* Sets the beauty options for the video track.
|
|
164
|
+
* @param options The beauty options.
|
|
165
|
+
* @param view The HTML element to render the video on.
|
|
166
|
+
*/
|
|
167
|
+
setBeautyOptions(options: FcrBeautyOptions): void;
|
|
168
|
+
/**
|
|
169
|
+
* Enables the beauty effect for the video track.
|
|
170
|
+
*/
|
|
171
|
+
enableBeauty(): void;
|
|
172
|
+
/**
|
|
173
|
+
* Disables the beauty effect for the video track.
|
|
174
|
+
*/
|
|
175
|
+
disableBeauty(): void;
|
|
176
|
+
/**
|
|
177
|
+
* Sets the virtual background options for the video track.
|
|
178
|
+
* @param options The virtual background options.
|
|
179
|
+
*/
|
|
180
|
+
setVirtualBackgroundOptions(options: FcrVirtualBackgroundOptions): void;
|
|
181
|
+
/**
|
|
182
|
+
* Enables the virtual background for the video track.
|
|
183
|
+
*/
|
|
184
|
+
enableVirtualBackground(): void;
|
|
185
|
+
/**
|
|
186
|
+
* Disables the virtual background for the video track.
|
|
187
|
+
*/
|
|
188
|
+
disableVirtualBackground(): void;
|
|
189
|
+
/**
|
|
190
|
+
* Enables lowlight enhancement for the video track.
|
|
191
|
+
*
|
|
192
|
+
* This method enhances the video quality in low-light conditions by adjusting
|
|
193
|
+
* the brightness and contrast to improve visibility.
|
|
194
|
+
*/
|
|
195
|
+
enableLowlightEnhancement(): void;
|
|
196
|
+
/**
|
|
197
|
+
* Disables lowlight enhancement for the video track.
|
|
198
|
+
*
|
|
199
|
+
* This method turns off the lowlight enhancement feature, reverting any adjustments
|
|
200
|
+
* made to the brightness and contrast for low-light conditions.
|
|
201
|
+
*/
|
|
202
|
+
disableLowlightEnhancement(): void;
|
|
203
|
+
/**
|
|
204
|
+
* Enables the video denoiser for the video track.
|
|
205
|
+
*
|
|
206
|
+
* This method reduces noise in the video stream, resulting in a clearer and more
|
|
207
|
+
* visually appealing video output.
|
|
208
|
+
*/
|
|
209
|
+
enableVideoDenoiser(): void;
|
|
210
|
+
/**
|
|
211
|
+
* Disables the video denoiser for the video track.
|
|
212
|
+
*
|
|
213
|
+
* This method turns off the video denoiser feature, allowing the video stream
|
|
214
|
+
* to be displayed without noise reduction.
|
|
215
|
+
*/
|
|
216
|
+
disableVideoDenoiser(): void;
|
|
217
|
+
/**
|
|
218
|
+
* Enables the hardware encoder for the video track.
|
|
219
|
+
*
|
|
220
|
+
* This method utilizes the hardware encoder of the device to encode the video stream,
|
|
221
|
+
* which can improve performance and reduce CPU usage.
|
|
222
|
+
*/
|
|
223
|
+
enableHardwareEncoder(): void;
|
|
224
|
+
/**
|
|
225
|
+
* Disables the hardware encoder for the video track.
|
|
226
|
+
*
|
|
227
|
+
* This method stops using the hardware encoder of the device to encode the video stream,
|
|
228
|
+
* potentially increasing CPU usage but providing more flexibility in software encoding.
|
|
229
|
+
*/
|
|
230
|
+
disableHardwareEncoder(): void;
|
|
231
|
+
/**
|
|
232
|
+
* Checks if the system satisfies the requirements for using virtual backgrounds.
|
|
233
|
+
*
|
|
234
|
+
* This method verifies if the current system meets the necessary conditions to enable
|
|
235
|
+
* virtual backgrounds, such as hardware capabilities and software configurations.
|
|
236
|
+
*
|
|
237
|
+
* @returns {boolean} True if the system satisfies the requirements, false otherwise.
|
|
238
|
+
*/
|
|
239
|
+
checkSatisfyVirtualBackgroundRequirements(): boolean;
|
|
240
|
+
/**
|
|
241
|
+
* Checks if the system satisfies the requirements for using beauty effects.
|
|
242
|
+
*
|
|
243
|
+
* This method verifies if the current system meets the necessary conditions to enable
|
|
244
|
+
* beauty effects, such as hardware capabilities and software configurations.
|
|
245
|
+
*
|
|
246
|
+
* @returns {boolean} True if the system satisfies the requirements, false otherwise.
|
|
247
|
+
*/
|
|
248
|
+
checkSatisfyBeautyRequirements(): boolean;
|
|
249
|
+
}
|
|
250
|
+
export interface FcrCameraTrack {
|
|
251
|
+
/**
|
|
252
|
+
* Gets the device ID of the camera.
|
|
253
|
+
* @returns The device ID of the camera.
|
|
254
|
+
*/
|
|
255
|
+
getDeviceId(): string;
|
|
256
|
+
/**
|
|
257
|
+
* Gets the current state of the camera.
|
|
258
|
+
* @returns The current state of the camera.
|
|
259
|
+
*/
|
|
260
|
+
getState(): FcrMediaSourceState;
|
|
261
|
+
/**
|
|
262
|
+
* Gets the video source type.
|
|
263
|
+
* @returns The video source type.
|
|
264
|
+
*/
|
|
265
|
+
getVideoSourceType(): FcrVideoSourceType;
|
|
266
|
+
/**
|
|
267
|
+
* Starts the camera.
|
|
268
|
+
*/
|
|
269
|
+
start(): void;
|
|
270
|
+
/**
|
|
271
|
+
* Stops the camera.
|
|
272
|
+
*/
|
|
273
|
+
stop(): void;
|
|
274
|
+
/**
|
|
275
|
+
* Starts the camera test.
|
|
276
|
+
*/
|
|
277
|
+
startTest(): void;
|
|
278
|
+
/**
|
|
279
|
+
* Stops the camera test.
|
|
280
|
+
*/
|
|
281
|
+
stopTest(): void;
|
|
282
|
+
/**
|
|
283
|
+
* Starts the camera preview with the specified configuration and view.
|
|
284
|
+
* @param config The configuration for the video render.
|
|
285
|
+
* @param view The HTML element to render the video on.
|
|
286
|
+
*/
|
|
287
|
+
startPreview(config: FcrRenderConfig, view: FcrRenderView): void;
|
|
288
|
+
/**
|
|
289
|
+
* Stops the camera preview.
|
|
290
|
+
* @param view The HTML element to render the video on.
|
|
291
|
+
*/
|
|
292
|
+
stopPreview(view: FcrRenderView): void;
|
|
293
|
+
/**
|
|
294
|
+
* Sets the capture parameters for the camera.
|
|
295
|
+
* @param params The parameters for the video capture.
|
|
296
|
+
*/
|
|
297
|
+
setCaptureParams(params: FcrCameraCaptureParams): void;
|
|
298
|
+
/**
|
|
299
|
+
* Retrieves the video effect enhancer.
|
|
300
|
+
*
|
|
301
|
+
* This method returns an instance of the video effect enhancer, which is used to apply various effects to the video.
|
|
302
|
+
*
|
|
303
|
+
* @returns {VideoEffectEnhancer} An instance of the video effect enhancer.
|
|
304
|
+
*/
|
|
305
|
+
getVideoEffectEnhancer(): FcrVideoEffectEnhancer;
|
|
306
|
+
/**
|
|
307
|
+
* Sets the video orientation for the camera.
|
|
308
|
+
* @param orientation orientation of the camera video.
|
|
309
|
+
*/
|
|
310
|
+
setVideoOrientation(orientation: FcrVideoOrientation): void;
|
|
311
|
+
/**
|
|
312
|
+
*
|
|
313
|
+
* @param observer
|
|
314
|
+
*/
|
|
315
|
+
addObserver(observer: FcrCameraTrackObserver): void;
|
|
316
|
+
/**
|
|
317
|
+
*
|
|
318
|
+
* @param observer
|
|
319
|
+
*/
|
|
320
|
+
removeObserver(observer: FcrCameraTrackObserver): void;
|
|
321
|
+
}
|
|
322
|
+
export interface FcrLoopbackTrack {
|
|
323
|
+
/**
|
|
324
|
+
* Gets the device ID of the loopback audio track.
|
|
325
|
+
* @returns The device ID of the loopback audio track.
|
|
326
|
+
*/
|
|
327
|
+
getDeviceId(): string;
|
|
328
|
+
/**
|
|
329
|
+
* Gets the state of the loopback audio track.
|
|
330
|
+
* @returns The state of the loopback audio track.
|
|
331
|
+
*/
|
|
332
|
+
getState(): FcrMediaSourceState;
|
|
333
|
+
/**
|
|
334
|
+
* Gets the audio source type of the loopback audio track.
|
|
335
|
+
*/
|
|
336
|
+
getAudioSourceType(): FcrAudioSourceType;
|
|
337
|
+
/**
|
|
338
|
+
* Starts the loopback audio track.
|
|
339
|
+
*/
|
|
340
|
+
start(): void;
|
|
341
|
+
/**
|
|
342
|
+
* Stops the loopback audio track.
|
|
343
|
+
*/
|
|
344
|
+
stop(): void;
|
|
345
|
+
/**
|
|
346
|
+
* Updates the signal volume for the loopback audio track.
|
|
347
|
+
* @param volume Range from 0 to 400. 100 is the default volume.
|
|
348
|
+
*/
|
|
349
|
+
adjustVolume(volume: number): void;
|
|
350
|
+
/**
|
|
351
|
+
*
|
|
352
|
+
* @param observer
|
|
353
|
+
*/
|
|
354
|
+
addObserver(observer: FcrLoopbackObserver): void;
|
|
355
|
+
/**
|
|
356
|
+
*
|
|
357
|
+
* @param observer
|
|
358
|
+
*/
|
|
359
|
+
removeObserver(observer: FcrLoopbackObserver): void;
|
|
360
|
+
}
|
|
361
|
+
export interface FcrMicrophoneTrack {
|
|
362
|
+
/**
|
|
363
|
+
* Gets the device ID of the microphone.
|
|
364
|
+
*/
|
|
365
|
+
getDeviceId(): string;
|
|
366
|
+
/**
|
|
367
|
+
* Gets the state of the microphone audio track.
|
|
368
|
+
*/
|
|
369
|
+
getState(): FcrMediaSourceState;
|
|
370
|
+
/**
|
|
371
|
+
* Gets the audio source type of the microphone audio track.
|
|
372
|
+
*/
|
|
373
|
+
getAudioSourceType(): FcrAudioSourceType;
|
|
374
|
+
/**
|
|
375
|
+
* Sets the audio raw data configuration for the track.
|
|
376
|
+
* @param config The audio raw data configuration.
|
|
377
|
+
*/
|
|
378
|
+
/**
|
|
379
|
+
* Adds an observer for the audio raw data.
|
|
380
|
+
* @param observer The observer for the audio raw data.
|
|
381
|
+
*/
|
|
382
|
+
/**
|
|
383
|
+
* Removes an observer for the audio raw data.
|
|
384
|
+
* @param observer The observer for the audio raw data.
|
|
385
|
+
*/
|
|
386
|
+
/**
|
|
387
|
+
* Starts the microphone audio track for the specified device.
|
|
388
|
+
* onLocalMicrophoneAudioStateUpdated callback will be triggered when the state of the microphone changes.
|
|
389
|
+
* Note:
|
|
390
|
+
* - {@link startTest} should be called after this method when you are not in a channel,
|
|
391
|
+
* otherwise onLocalMicrophoneAudioStateUpdated may not be triggered in electron.
|
|
392
|
+
*/
|
|
393
|
+
start(): void;
|
|
394
|
+
/**
|
|
395
|
+
* Stops the microphone audio track for the specified device.
|
|
396
|
+
*/
|
|
397
|
+
stop(): void;
|
|
398
|
+
/**
|
|
399
|
+
* Starts the microphone test for the specified device.
|
|
400
|
+
* @param interval The interval for the microphone test.
|
|
401
|
+
*/
|
|
402
|
+
startTest(interval: number): void;
|
|
403
|
+
/**
|
|
404
|
+
* Stops the microphone test for the specified device.
|
|
405
|
+
*/
|
|
406
|
+
stopTest(): void;
|
|
407
|
+
/**
|
|
408
|
+
* Updates the signal volume for the microphone audio track.
|
|
409
|
+
* @param volume Range from 0 to 400. 100 is the default volume.
|
|
410
|
+
*/
|
|
411
|
+
adjustVolume(volume: number): void;
|
|
412
|
+
/**
|
|
413
|
+
* Retrieves the audio effect enhancer.
|
|
414
|
+
*
|
|
415
|
+
* This method returns an instance of the audio effect enhancer, which is used to apply various effects to the audio stream.
|
|
416
|
+
*
|
|
417
|
+
* @returns {AudioEffectEnhancer} An instance of the audio effect enhancer.
|
|
418
|
+
*/
|
|
419
|
+
getAudioEffectEnhancer(): FcrAudioEffectEnhancer;
|
|
420
|
+
addObserver(observer: FcrMicrophoneTrackObserver): void;
|
|
421
|
+
removeObserver(observer: FcrMicrophoneTrackObserver): void;
|
|
422
|
+
}
|
|
423
|
+
export interface FcrScreenTrack {
|
|
424
|
+
/**
|
|
425
|
+
* Gets the device ID of the screen.
|
|
426
|
+
* @returns The device ID of the screen.
|
|
427
|
+
*/
|
|
428
|
+
getSourceId(): string;
|
|
429
|
+
/**
|
|
430
|
+
* Gets the current state of the screen.
|
|
431
|
+
* @returns The current state of the screen.
|
|
432
|
+
*/
|
|
433
|
+
getState(): FcrMediaSourceState;
|
|
434
|
+
/**
|
|
435
|
+
* Gets the video source type.
|
|
436
|
+
* @returns The video source type.
|
|
437
|
+
*/
|
|
438
|
+
getVideoSourceType(): FcrVideoSourceType;
|
|
439
|
+
/**
|
|
440
|
+
* Starts the screen preview with the specified configuration and view.
|
|
441
|
+
* @param config The configuration for the video render.
|
|
442
|
+
* @param view The HTML element to render the video on.
|
|
443
|
+
*/
|
|
444
|
+
startPreview(config: FcrRenderConfig, view: FcrRenderView): void;
|
|
445
|
+
/**
|
|
446
|
+
* Stops the screen preview.
|
|
447
|
+
* @param view The HTML element to render the video on.
|
|
448
|
+
*/
|
|
449
|
+
stopPreview(view: FcrRenderView): void;
|
|
450
|
+
/**
|
|
451
|
+
* Sets the capture parameters for the screen.
|
|
452
|
+
* @param params The parameters for the video capture.
|
|
453
|
+
*/
|
|
454
|
+
setCaptureParams(params: FcrScreenCaptureParams): void;
|
|
455
|
+
/**
|
|
456
|
+
* Starts the screen video track with the specified type and parameters.
|
|
457
|
+
* @param type The type of screen capture.
|
|
458
|
+
* @param params The parameters for the screen capture.
|
|
459
|
+
* @returns A promise that resolves when the start is successful.
|
|
460
|
+
*/
|
|
461
|
+
start(type: FcrScreenCaptureType, params: FcrScreenCaptureParams): void;
|
|
462
|
+
/**
|
|
463
|
+
* Stops the screen video track for the specified source.
|
|
464
|
+
* @returns A promise that resolves when the stop is successful.
|
|
465
|
+
*/
|
|
466
|
+
stop(): void;
|
|
467
|
+
/**
|
|
468
|
+
* Adds an observer for the screen video track.
|
|
469
|
+
* @param observer The observer for the screen video track.
|
|
470
|
+
*/
|
|
471
|
+
addObserver(observer: FcrScreenTrackObserver): void;
|
|
472
|
+
/**
|
|
473
|
+
* Removes an observer for the screen video track.
|
|
474
|
+
* @param observer The observer for the screen video track.
|
|
475
|
+
*/
|
|
476
|
+
removeObserver(observer: FcrScreenTrackObserver): void;
|
|
477
|
+
}
|
|
478
|
+
export interface FcrDesktopMediaControl {
|
|
479
|
+
/**
|
|
480
|
+
* Get the list of cameras.
|
|
481
|
+
* @returns An array of device information for each camera.
|
|
482
|
+
*/
|
|
483
|
+
getCameraList(): Promise<FcrDeviceInfo[]>;
|
|
484
|
+
/**
|
|
485
|
+
* Get the list of microphones.
|
|
486
|
+
* @returns An array of device information for each microphone.
|
|
487
|
+
*/
|
|
488
|
+
getMicrophoneList(): Promise<FcrDeviceInfo[]>;
|
|
489
|
+
/**
|
|
490
|
+
* Get the list of speakers.
|
|
491
|
+
* @returns An array of device information for each speaker.
|
|
492
|
+
*/
|
|
493
|
+
getSpeakerList(): Promise<FcrDeviceInfo[]>;
|
|
494
|
+
/**
|
|
495
|
+
* Get the system selected microphone.
|
|
496
|
+
* @returns The system selected microphone, could be undefined if no microphone device.
|
|
497
|
+
*/
|
|
498
|
+
getSystemSelectedMicrophone(): Promise<FcrDeviceInfo | undefined>;
|
|
499
|
+
/**
|
|
500
|
+
* Get the system selected speaker.
|
|
501
|
+
* @returns The system selected speaker, could be undefined if no speaker device.
|
|
502
|
+
*/
|
|
503
|
+
getSystemSelectedSpeaker(): Promise<FcrDeviceInfo | undefined>;
|
|
504
|
+
/**
|
|
505
|
+
* Get the list of windows.
|
|
506
|
+
* @returns A promise that resolves with an array of window information.
|
|
507
|
+
*/
|
|
508
|
+
getWindowList(): Promise<FcrWindowInfo[]>;
|
|
509
|
+
/**
|
|
510
|
+
* Get the list of displays.
|
|
511
|
+
* @returns A promise that resolves with an array of display information.
|
|
512
|
+
*/
|
|
513
|
+
getDisplayList(): Promise<FcrDisplayInfo[]>;
|
|
514
|
+
/**
|
|
515
|
+
* Get the video track of the specified camera.
|
|
516
|
+
* @param deviceId The ID of the camera.
|
|
517
|
+
* @returns The video track of the camera.
|
|
518
|
+
*/
|
|
519
|
+
getCameraTrack(deviceId: string): FcrCameraTrack;
|
|
520
|
+
/**
|
|
521
|
+
* Get the audio track of the specified microphone.
|
|
522
|
+
* @param deviceId The ID of the microphone.
|
|
523
|
+
* @returns The audio track of the microphone.
|
|
524
|
+
*/
|
|
525
|
+
getMicrophoneTrack(deviceId: string): FcrMicrophoneTrack;
|
|
526
|
+
/**
|
|
527
|
+
* Get the video track of the specified screen.
|
|
528
|
+
* @param sourceId The ID of the screen.
|
|
529
|
+
* @returns The video track of the screen.
|
|
530
|
+
*/
|
|
531
|
+
getScreenTrack(sourceId: string): FcrScreenTrack;
|
|
532
|
+
/**
|
|
533
|
+
* Get the audio track of the specified loopback source.
|
|
534
|
+
* @param sourceId The ID of the loopback source.
|
|
535
|
+
* @returns The audio track of the loopback source.
|
|
536
|
+
*/
|
|
537
|
+
getLoopbackTrack(sourceId: string): FcrLoopbackTrack;
|
|
538
|
+
/**
|
|
539
|
+
* Set the specified device as the speaker.
|
|
540
|
+
* @param deviceId The ID of the device to set as the speaker.
|
|
541
|
+
*/
|
|
542
|
+
setSelectedSpeaker(deviceId: string): void;
|
|
543
|
+
/**
|
|
544
|
+
* Start a speaker test with the specified URL and interval.
|
|
545
|
+
* @param url The URL to use for the test, which can be a base64 URL in browsers or absolute file path in Electron.
|
|
546
|
+
* @param interval The interval between every time `onLocalMicrophoneAudioVolumeUpdated` is called.
|
|
547
|
+
*/
|
|
548
|
+
startSelectedSpeakerTest(url: string, interval: number): void;
|
|
549
|
+
/**
|
|
550
|
+
* Stop the speaker test.
|
|
551
|
+
*/
|
|
552
|
+
stopSelectedSpeakerTest(): void;
|
|
553
|
+
/**
|
|
554
|
+
* Adjust the output volume.
|
|
555
|
+
* @param volume Range from 0 to 400. 100 is the default volume.
|
|
556
|
+
*/
|
|
557
|
+
adjustAudioOutputVolume(volume: number): void;
|
|
558
|
+
/**
|
|
559
|
+
* Check if the media control supports the specified capability.
|
|
560
|
+
* @param capability
|
|
561
|
+
* @returns Whether the media control supports the specified capability.
|
|
562
|
+
*/
|
|
563
|
+
isCapabilitySupported(capability: FcrCapability): boolean;
|
|
564
|
+
/**
|
|
565
|
+
* Add an observer to the media control.
|
|
566
|
+
* @param observer The observer to add.
|
|
567
|
+
*/
|
|
568
|
+
addObserver(observer: FcrDesktopMediaObserver): void;
|
|
569
|
+
/**
|
|
570
|
+
* Remove an observer from the media control.
|
|
571
|
+
* @param observer The observer to remove.
|
|
572
|
+
*/
|
|
573
|
+
removeObserver(observer: FcrDesktopMediaObserver): void;
|
|
574
|
+
/**
|
|
575
|
+
* Set the volume of the speaker.
|
|
576
|
+
* @param volume Range from 0 to 100.
|
|
577
|
+
*/
|
|
578
|
+
setSelectedSpeakerVolume(volume: number): void;
|
|
579
|
+
/**
|
|
580
|
+
* Get the volume of the speaker.
|
|
581
|
+
* @returns The volume of the speaker. Range from 0 to 100.
|
|
582
|
+
*/
|
|
583
|
+
getSelectedSpeakerVolume(): number;
|
|
584
|
+
/**
|
|
585
|
+
* Check loopback device status
|
|
586
|
+
* @returns 0 if the loopback device is available; otherwise,
|
|
587
|
+
* 1 if not downloaded,
|
|
588
|
+
* 2 if not installed/activated
|
|
589
|
+
*/
|
|
590
|
+
checkLoopbackDevice(): Promise<number>;
|
|
591
|
+
}
|
|
592
|
+
export interface FcrMobileMediaControl {
|
|
593
|
+
/**
|
|
594
|
+
* Open the specified device.
|
|
595
|
+
* @param deviceType The type of the device to open.
|
|
596
|
+
*/
|
|
597
|
+
openDevice(deviceType: FcrDeviceType): void;
|
|
598
|
+
/**
|
|
599
|
+
* Close the specified device.
|
|
600
|
+
* @param deviceType The type of the device to close.
|
|
601
|
+
*/
|
|
602
|
+
closeDevice(deviceType: FcrDeviceType): void;
|
|
603
|
+
getDeviceId(deviceType: FcrDeviceType): string;
|
|
604
|
+
getDeviceState(deviceType: FcrDeviceType): FcrMediaSourceState;
|
|
605
|
+
adjustOutputVolume(volume: number): void;
|
|
606
|
+
/**
|
|
607
|
+
* Switch the camera position.
|
|
608
|
+
* @returns The new camera position.
|
|
609
|
+
*/
|
|
610
|
+
switchCamera(): FcrCameraPosition;
|
|
611
|
+
/**
|
|
612
|
+
* Get the current camera position.
|
|
613
|
+
* @returns The current camera position.
|
|
614
|
+
*/
|
|
615
|
+
getCameraPosition(): FcrCameraPosition;
|
|
616
|
+
startCameraTest(): void;
|
|
617
|
+
stopCameraTest(): void;
|
|
618
|
+
startCameraPreview(view: string | object, config: FcrRenderConfig): void;
|
|
619
|
+
stopCameraPreview(view: string | object): void;
|
|
620
|
+
stopCameraPreviewOnAllCanvas(): void;
|
|
621
|
+
isCapabilitySupported(capability: FcrCapability): boolean;
|
|
622
|
+
startScreenCapture(params: FcrScreenCaptureParams): void;
|
|
623
|
+
updateScreenCapture(hasAudio: boolean): void;
|
|
624
|
+
stopScreenCapture(): void;
|
|
625
|
+
getScreenCaptureState(): FcrMediaSourceState;
|
|
626
|
+
enableSpeaker(enable: boolean): void;
|
|
627
|
+
getAudioOutputRouting(): FcrAudioOutputRouting;
|
|
628
|
+
getAudioEffectEnhancer(): FcrAudioEffectEnhancer;
|
|
629
|
+
getVideoEffectEnhancer(): FcrVideoEffectEnhancer;
|
|
630
|
+
/**
|
|
631
|
+
* Add an observer to the media control.
|
|
632
|
+
* @param observer The observer to add.
|
|
633
|
+
*/
|
|
634
|
+
addObserver(observer: FcrMobileMediaObserver): void;
|
|
635
|
+
/**
|
|
636
|
+
* Remove an observer from the media control.
|
|
637
|
+
* @param observer The observer to remove.
|
|
638
|
+
*/
|
|
639
|
+
removeObserver(observer: FcrMobileMediaObserver): void;
|
|
640
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FcrMonitorControlImpl = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
class FcrMonitorControlImpl {
|
|
11
|
+
constructor(engine, _config) {
|
|
12
|
+
this._config = _config;
|
|
13
|
+
this._monitor = engine.getMonitor();
|
|
14
|
+
}
|
|
15
|
+
addObserver(observer) {
|
|
16
|
+
this._monitor.addObserver(observer);
|
|
17
|
+
}
|
|
18
|
+
removeObserver(observer) {
|
|
19
|
+
this._monitor.addObserver(observer);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.FcrMonitorControlImpl = FcrMonitorControlImpl;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FcrPerformanceInfo } from '../type';
|
|
2
|
+
export interface FcrMonitorObserver {
|
|
3
|
+
onPerformanceInfoUpdated?: (status: FcrPerformanceInfo) => void;
|
|
4
|
+
}
|
|
5
|
+
export interface FcrMonitorControl {
|
|
6
|
+
/**
|
|
7
|
+
* Add an observer to the monitor.
|
|
8
|
+
* @param observer
|
|
9
|
+
*/
|
|
10
|
+
addObserver(observer: FcrMonitorObserver): void;
|
|
11
|
+
/**
|
|
12
|
+
* Remove the observer from the monitor.
|
|
13
|
+
* @param observer
|
|
14
|
+
*/
|
|
15
|
+
removeObserver(observer: FcrMonitorObserver): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|