omnirtc-web 0.0.19 → 0.0.21

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/dist/omni.d.ts DELETED
@@ -1,1409 +0,0 @@
1
- declare function getRTCInstance(token: string): IOmniRTC;
2
- export default getRTCInstance;
3
-
4
- declare class OmniRTCError extends Error {
5
- readonly code: OmniRTCErrorCode;
6
- readonly message: string;
7
- readonly data?: any;
8
- readonly name: string;
9
- constructor(code: OmniRTCErrorCode, message?: string, data?: any);
10
- toString(): string;
11
- print(level?: "error" | "warning"): OmniRTCError;
12
- throw(): never;
13
- }
14
-
15
- declare enum OmniRTCErrorCode {
16
- UNEXPECTED_ERROR = "UNEXPECTED_ERROR",
17
- UNEXPECTED_RESPONSE = "UNEXPECTED_RESPONSE",
18
- TIMEOUT = "TIMEOUT",
19
- INVALID_PARAMS = "INVALID_PARAMS",
20
- NOT_READABLE = "NOT_READABLE",
21
- NOT_SUPPORTED = "NOT_SUPPORTED",
22
- INVALID_OPERATION = "INVALID_OPERATION",
23
- OPERATION_ABORTED = "OPERATION_ABORTED",
24
- WEB_SECURITY_RESTRICT = "WEB_SECURITY_RESTRICT",
25
- EXCHANGE_SDP_FAILED = "EXCHANGE_SDP_FAILED",
26
- NETWORK_ERROR = "NETWORK_ERROR",
27
- NETWORK_TIMEOUT = "NETWORK_TIMEOUT",
28
- NETWORK_RESPONSE_ERROR = "NETWORK_RESPONSE_ERROR",
29
- API_INVOKE_TIMEOUT = "API_INVOKE_TIMEOUT",
30
- ENUMERATE_DEVICES_FAILED = "ENUMERATE_DEVICES_FAILED",
31
- DEVICE_NOT_FOUND = "DEVICE_NOT_FOUND",
32
- ELECTRON_IS_NULL = "ELECTRON_IS_NULL",
33
- ELECTRON_DESKTOP_CAPTURER_GET_SOURCES_ERROR = "ELECTRON_DESKTOP_CAPTURER_GET_SOURCES_ERROR",
34
- CHROME_PLUGIN_NO_RESPONSE = "CHROME_PLUGIN_NO_RESPONSE",
35
- CHROME_PLUGIN_NOT_INSTALL = "CHROME_PLUGIN_NOT_INSTALL",
36
- MEDIA_OPTION_INVALID = "MEDIA_OPTION_INVALID",
37
- PERMISSION_DENIED = "PERMISSION_DENIED",
38
- CONSTRAINT_NOT_SATISFIED = "CONSTRAINT_NOT_SATISFIED",
39
- TRACK_IS_DISABLED = "TRACK_IS_DISABLED",
40
- GET_VIDEO_ELEMENT_VISIBLE_ERROR = "GET_VIDEO_ELEMENT_VISIBLE_ERROR",
41
- SHARE_AUDIO_NOT_ALLOWED = "SHARE_AUDIO_NOT_ALLOWED",
42
- LOW_STREAM_ENCODING_ERROR = "LOW_STREAM_ENCODING_ERROR",
43
- SET_ENCODING_PARAMETER_ERROR = "SET_ENCODING_PARAMETER_ERROR",
44
- TRACK_STATE_UNREACHABLE = "TRACK_STATE_UNREACHABLE",
45
- INVALID_UINT_UID_FROM_STRING_UID = "INVALID_UINT_UID_FROM_STRING_UID",
46
- CAN_NOT_GET_PROXY_SERVER = "CAN_NOT_GET_PROXY_SERVER",
47
- CAN_NOT_GET_GATEWAY_SERVER = "CAN_NOT_GET_GATEWAY_SERVER",
48
- VOID_GATEWAY_ADDRESS = "VOID_GATEWAY_ADDRESS",
49
- UID_CONFLICT = "UID_CONFLICT",
50
- MULTI_UNILBS_RESPONSE_ERROR = "MULTI_UNILBS_RESPONSE_ERROR",
51
- UPDATE_TICKET_FAILED = "UPDATE_TICKET_FAILED",
52
- INVALID_LOCAL_TRACK = "INVALID_LOCAL_TRACK",
53
- INVALID_TRACK = "INVALID_TRACK",
54
- SENDER_NOT_FOUND = "SENDER_NOT_FOUND",
55
- CREATE_OFFER_FAILED = "CREATE_OFFER_FAILED",
56
- SET_ANSWER_FAILED = "SET_ANSWER_FAILED",
57
- ICE_FAILED = "ICE_FAILED",
58
- PC_CLOSED = "PC_CLOSED",
59
- SENDER_REPLACE_FAILED = "SENDER_REPLACE_FAILED",
60
- GET_LOCAL_CAPABILITIES_FAILED = "GET_LOCAL_CAPABILITIES_FAILED",
61
- GET_LOCAL_CONNECTION_PARAMS_FAILED = "GET_LOCAL_CONNECTION_PARAMS_FAILED",
62
- SUBSCRIBE_FAILED = "SUBSCRIBE_FAILED",
63
- UNSUBSCRIBE_FAILED = "UNSUBSCRIBE_FAILED",
64
- GATEWAY_P2P_LOST = "GATEWAY_P2P_LOST",
65
- NO_ICE_CANDIDATE = "NO_ICE_CANDIDATE",
66
- CAN_NOT_PUBLISH_MULTIPLE_VIDEO_TRACKS = "CAN_NOT_PUBLISH_MULTIPLE_VIDEO_TRACKS",
67
- EXIST_DISABLED_VIDEO_TRACK = "EXIST_DISABLED_VIDEO_TRACK",
68
- INVALID_REMOTE_USER = "INVALID_REMOTE_USER",
69
- REMOTE_USER_IS_NOT_PUBLISHED = "REMOTE_USER_IS_NOT_PUBLISHED",
70
- CUSTOM_REPORT_SEND_FAILED = "CUSTOM_REPORT_SEND_FAILED",
71
- CUSTOM_REPORT_FREQUENCY_TOO_HIGH = "CUSTOM_REPORT_FREQUENCY_TOO_HIGH",
72
- FETCH_AUDIO_FILE_FAILED = "FETCH_AUDIO_FILE_FAILED",
73
- READ_LOCAL_AUDIO_FILE_ERROR = "READ_LOCAL_AUDIO_FILE_ERROR",
74
- DECODE_AUDIO_FILE_FAILED = "DECODE_AUDIO_FILE_FAILED",
75
- WS_ABORT = "WS_ABORT",
76
- WS_DISCONNECT = "WS_DISCONNECT",
77
- WS_ERR = "WS_ERR",
78
- LIVE_STREAMING_TASK_CONFLICT = "LIVE_STREAMING_TASK_CONFLICT",
79
- LIVE_STREAMING_INVALID_ARGUMENT = "LIVE_STREAMING_INVALID_ARGUMENT",
80
- LIVE_STREAMING_INTERNAL_SERVER_ERROR = "LIVE_STREAMING_INTERNAL_SERVER_ERROR",
81
- LIVE_STREAMING_PUBLISH_STREAM_NOT_AUTHORIZED = "LIVE_STREAMING_PUBLISH_STREAM_NOT_AUTHORIZED",
82
- LIVE_STREAMING_TRANSCODING_NOT_SUPPORTED = "LIVE_STREAMING_TRANSCODING_NOT_SUPPORTED",
83
- LIVE_STREAMING_CDN_ERROR = "LIVE_STREAMING_CDN_ERROR",
84
- LIVE_STREAMING_INVALID_RAW_STREAM = "LIVE_STREAMING_INVALID_RAW_STREAM",
85
- LIVE_STREAMING_WARN_STREAM_NUM_REACH_LIMIT = "LIVE_STREAMING_WARN_STREAM_NUM_REACH_LIMIT",
86
- LIVE_STREAMING_WARN_FAILED_LOAD_IMAGE = "LIVE_STREAMING_WARN_FAILED_LOAD_IMAGE",
87
- LIVE_STREAMING_WARN_FREQUENT_REQUEST = "LIVE_STREAMING_WARN_FREQUENT_REQUEST",
88
- WEBGL_INTERNAL_ERROR = "WEBGL_INTERNAL_ERROR",
89
- BEAUTY_PROCESSOR_INTERNAL_ERROR = "BEAUTY_PROCESSOR_INTERNAL_ERROR",
90
- CROSS_CHANNEL_WAIT_STATUS_ERROR = "CROSS_CHANNEL_WAIT_STATUS_ERROR",
91
- CROSS_CHANNEL_FAILED_JOIN_SRC = "CROSS_CHANNEL_FAILED_JOIN_SEC",
92
- CROSS_CHANNEL_FAILED_JOIN_DEST = "CROSS_CHANNEL_FAILED_JOIN_DEST",
93
- CROSS_CHANNEL_FAILED_PACKET_SENT_TO_DEST = "CROSS_CHANNEL_FAILED_PACKET_SENT_TO_DEST",
94
- CROSS_CHANNEL_SERVER_ERROR_RESPONSE = "CROSS_CHANNEL_SERVER_ERROR_RESPONSE",
95
- METADATA_OUT_OF_RANGE = "METADATA_OUT_OF_RANGE",
96
- LOCAL_AEC_ERROR = "LOCAL_AEC_ERROR",
97
- INVALID_PLUGIN = "INVALID_PLUGIN",
98
- DISCONNECT_P2P = "DISCONNECT_P2P",
99
- INIT_WEBSOCKET_TIMEOUT = "INIT_WEBSOCKET_TIMEOUT"
100
- }
101
-
102
- export declare interface OmniRTCStats {
103
- Duration: number;
104
- RecvBitrate: number;
105
- RecvBytes: number;
106
- SendBitrate: number;
107
- SendBytes: number;
108
- UserCount: number;
109
- RTT: number;
110
- OutgoingAvailableBandwidth: number;
111
- }
112
-
113
- export declare enum AREAS {
114
- CHINA = "CHINA",
115
- ASIA = "ASIA",
116
- NORTH_AMERICA = "NORTH_AMERICA",
117
- EUROPE = "EUROPE",
118
- JAPAN = "JAPAN",
119
- INDIA = "INDIA",
120
- KOREA = "KOREA",
121
- HKMC = "HKMC",
122
- US = "US",
123
- OCEANIA = "OCEANIA",
124
- SOUTH_AMERICA = "SOUTH_AMERICA",
125
- AFRICA = "AFRICA",
126
- OVERSEA = "OVERSEA",
127
- GLOBAL = "GLOBAL"
128
- }
129
-
130
-
131
- export declare enum AudienceLatencyLevelType {
132
-
133
- AUDIENCE_LEVEL_LOW_LATENCY = 1,
134
-
135
- AUDIENCE_LEVEL_ULTRA_LOW_LATENCY = 2,
136
-
137
- AUDIENCE_LEVEL_SYNC_LATENCY = 3
138
- }
139
-
140
-
141
- declare const AUDIO_ENCODER_CONFIG_SETTINGS: {
142
- speech_low_quality: AudioEncoderConfiguration;
143
- speech_standard: AudioEncoderConfiguration;
144
- music_standard: AudioEncoderConfiguration;
145
- standard_stereo: AudioEncoderConfiguration;
146
- high_quality: AudioEncoderConfiguration;
147
- high_quality_stereo: AudioEncoderConfiguration;
148
- };
149
-
150
-
151
- export declare interface AudioEncoderConfiguration {
152
-
153
- sampleRate?: number;
154
-
155
- sampleSize?: number;
156
-
157
- stereo?: boolean;
158
-
159
- bitrate?: number;
160
- }
161
-
162
-
163
- export declare type AudioEncoderConfigurationPreset = keyof typeof AUDIO_ENCODER_CONFIG_SETTINGS;
164
-
165
-
166
- export declare interface AudioSourceOptions {
167
-
168
- cycle?: number;
169
-
170
- loop?: boolean;
171
-
172
- startPlayTime?: number;
173
- }
174
-
175
-
176
- export declare type AudioSourceState = "stopped" | "playing" | "paused";
177
-
178
-
179
- export declare interface BeautyEffectOptions {
180
-
181
- smoothnessLevel?: number;
182
-
183
- lighteningLevel?: number;
184
-
185
- rednessLevel?: number;
186
-
187
- lighteningContrastLevel?: 0 | 1 | 2;
188
- }
189
-
190
-
191
- export declare interface BufferSourceAudioTrackInitConfig {
192
-
193
- source: File | string | AudioBuffer;
194
-
195
- cacheOnlineFile?: boolean;
196
-
197
- encoderConfig?: AudioEncoderConfiguration | AudioEncoderConfigurationPreset;
198
- }
199
-
200
-
201
- export declare interface CameraVideoTrackInitConfig {
202
-
203
- encoderConfig?: VideoEncoderConfiguration | VideoEncoderConfigurationPreset;
204
-
205
- facingMode?: "user" | "environment";
206
-
207
- cameraId?: string;
208
-
209
- optimizationMode?: "motion" | "detail";
210
-
211
- scalabiltyMode?: SVCConfiguration | SVCConfigurationPreset;
212
- }
213
-
214
-
215
- export declare enum ChannelMediaRelayError {
216
-
217
- RELAY_OK = "RELAY_OK",
218
-
219
- SERVER_CONNECTION_LOST = "SERVER_CONNECTION_LOST",
220
-
221
- SRC_TOKEN_EXPIRED = "SRC_TOKEN_EXPIRED",
222
-
223
- DEST_TOKEN_EXPIRED = "DEST_TOKEN_EXPIRED"
224
- }
225
-
226
-
227
- export declare enum ChannelMediaRelayEvent {
228
-
229
- NETWORK_DISCONNECTED = "NETWORK_DISCONNECTED",
230
-
231
- NETWORK_CONNECTED = "NETWORK_CONNECTED",
232
-
233
- PACKET_JOINED_SRC_CHANNEL = "PACKET_JOINED_SRC_CHANNEL",
234
-
235
- PACKET_JOINED_DEST_CHANNEL = "PACKET_JOINED_DEST_CHANNEL",
236
-
237
- PACKET_SENT_TO_DEST_CHANNEL = "PACKET_SENT_TO_DEST_CHANNEL",
238
-
239
- PACKET_RECEIVED_VIDEO_FROM_SRC = "PACKET_RECEIVED_VIDEO_FROM_SRC",
240
-
241
- PACKET_RECEIVED_AUDIO_FROM_SRC = "PACKET_RECEIVED_AUDIO_FROM_SRC",
242
-
243
- PACKET_UPDATE_DEST_CHANNEL = "PACKET_UPDATE_DEST_CHANNEL",
244
-
245
- PACKET_UPDATE_DEST_CHANNEL_REFUSED = "PACKET_UPDATE_DEST_CHANNEL_REFUSED",
246
-
247
- PACKET_UPDATE_DEST_CHANNEL_NOT_CHANGE = "PACKET_UPDATE_DEST_CHANNEL_NOT_CHANGE"
248
- }
249
-
250
-
251
- export declare interface ChannelMediaRelayInfo {
252
-
253
- channelName: string;
254
-
255
- token?: string;
256
-
257
- uid: number;
258
- }
259
-
260
-
261
- export declare enum ChannelMediaRelayState {
262
-
263
- RELAY_STATE_IDLE = "RELAY_STATE_IDLE",
264
-
265
- RELAY_STATE_CONNECTING = "RELAY_STATE_CONNECTING",
266
-
267
- RELAY_STATE_RUNNING = "RELAY_STATE_RUNNING",
268
-
269
- RELAY_STATE_FAILURE = "RELAY_STATE_FAILURE"
270
- }
271
-
272
-
273
- declare type CheckVideoVisibleResult = CheckVisibleResult;
274
-
275
-
276
- declare type CheckVisibleResult = VisibleResultInner | VisibleHiddenResult;
277
-
278
-
279
- export declare interface ClientConfig {
280
-
281
- codec: SDK_CODEC;
282
-
283
- audioCodec?: SDK_AUDIO_CODEC;
284
-
285
- mode: SDK_MODE;
286
-
287
- role?: ClientRole;
288
-
289
- clientRoleOptions?: ClientRoleOptions;
290
-
291
- proxyServer?: string;
292
-
293
- turnServer?: TurnServerConfig;
294
-
295
- httpRetryConfig?: RetryConfiguration;
296
-
297
- websocketRetryConfig?: RetryConfiguration;
298
- }
299
-
300
-
301
- export declare type ClientRole = "audience" | "host";
302
-
303
-
304
- export declare interface ClientRoleOptions {
305
-
306
- level: AudienceLatencyLevelType;
307
- }
308
-
309
-
310
- export declare enum ConnectionDisconnectedReason {
311
-
312
- LEAVE = "LEAVE",
313
-
314
- NETWORK_ERROR = "NETWORK_ERROR",
315
-
316
- SERVER_ERROR = "SERVER_ERROR",
317
-
318
- UID_BANNED = "UID_BANNED",
319
-
320
- IP_BANNED = "IP_BANNED",
321
-
322
- CHANNEL_BANNED = "CHANNEL_BANNED",
323
- FALLBACK = "FALLBACK"
324
- }
325
-
326
-
327
- export declare type ConnectionState = "DISCONNECTED" | "CONNECTING" | "RECONNECTING" | "CONNECTED" | "DISCONNECTING";
328
-
329
-
330
- export declare interface ConstrainLong {
331
-
332
- min?: number;
333
-
334
- max?: number;
335
-
336
- ideal?: number;
337
-
338
- exact?: number;
339
- }
340
-
341
-
342
- export declare interface CustomAudioTrackInitConfig {
343
-
344
- mediaStreamTrack: MediaStreamTrack;
345
-
346
- encoderConfig?: AudioEncoderConfiguration | AudioEncoderConfigurationPreset;
347
- }
348
-
349
-
350
- export declare interface CustomVideoTrackInitConfig {
351
-
352
- mediaStreamTrack: MediaStreamTrack;
353
-
354
- bitrateMin?: number;
355
-
356
- bitrateMax?: number;
357
-
358
- optimizationMode?: "motion" | "detail";
359
-
360
- scalabiltyMode?: SVCConfiguration | SVCConfigurationPreset;
361
- }
362
-
363
-
364
- export declare interface DeviceInfo {
365
-
366
- updateAt: number;
367
-
368
- initAt: number;
369
-
370
- state: DeviceState;
371
-
372
- device: MediaDeviceInfo;
373
- }
374
-
375
-
376
- export declare type DeviceState = "ACTIVE" | "INACTIVE";
377
-
378
-
379
- export declare interface ElectronDesktopCapturerSource {
380
-
381
- id: string;
382
-
383
- name: string;
384
-
385
- thumbnail: IElectronNativeImage;
386
- }
387
-
388
-
389
- export declare type EncryptionMode = "aes-128-xts" | "aes-256-xts" | "aes-128-ecb" | "sm4-128-ecb" | "aes-128-gcm" | "aes-256-gcm" | "aes-128-gcm2" | "aes-256-gcm2" | "none";
390
-
391
-
392
- export declare function event_beauty_effect_overload(): void;
393
-
394
-
395
- export declare function event_channel_media_relay_event(event: ChannelMediaRelayEvent): void;
396
-
397
-
398
- export declare function event_channel_media_relay_state(state: ChannelMediaRelayState, code: ChannelMediaRelayError): void;
399
-
400
-
401
- export declare function event_connection_state_change(curState: ConnectionState, revState: ConnectionState, reason?: ConnectionDisconnectedReason): void;
402
-
403
-
404
- export declare function event_crypt_error(): void;
405
-
406
-
407
- export declare function event_exception(event: {
408
-
409
- code: number;
410
-
411
- msg: string;
412
-
413
- uid: UID;
414
- }): void;
415
-
416
-
417
- export declare function event_first_frame_decoded(): void;
418
-
419
-
420
- export declare function event_is_using_cloud_proxy(isUsingProxy: boolean): void;
421
-
422
-
423
- export declare function event_join_fallback_to_proxy(proxyServer: string): void;
424
-
425
-
426
- export declare function event_live_streaming_error(url: string, err: OmniRTCError): void;
427
-
428
-
429
- export declare function event_live_streaming_warning(url: string, warning: OmniRTCError): void;
430
-
431
-
432
- export declare function event_media_reconnect_end(uid: UID): void;
433
-
434
-
435
- export declare function event_media_reconnect_start(uid: UID): void;
436
-
437
-
438
- export declare function event_network_quality(stats: NetworkQuality): void;
439
-
440
-
441
- export declare function event_source_state_change(currentState: AudioSourceState): void;
442
-
443
-
444
- export declare function event_stream_fallback(uid: UID, isFallbackOrRecover: "fallback" | "recover"): void;
445
-
446
-
447
- export declare function event_stream_inject_status(status: InjectStreamEventStatus, uid: UID, url: string): void;
448
-
449
-
450
- export declare function event_stream_type_changed(uid: UID, streamType: RemoteStreamType): void;
451
-
452
-
453
- export declare function event_token_privilege_did_expire(): void;
454
-
455
-
456
- export declare function event_token_privilege_will_expire(): void;
457
-
458
-
459
- export declare function event_track_ended(): void;
460
-
461
-
462
- export declare function event_user_info_updated(uid: UID, msg: "mute-audio" | "mute-video" | "enable-local-video" | "unmute-audio" | "unmute-video" | "disable-local-video"): void;
463
-
464
-
465
- export declare function event_user_joined(user: IOmniRTCRemoteUser): void;
466
-
467
-
468
- export declare function event_user_left(user: IOmniRTCRemoteUser, reason: string): void;
469
-
470
-
471
- export declare function event_user_published(user: IOmniRTCRemoteUser, mediaType: "audio" | "video"): void;
472
-
473
-
474
- export declare function event_user_unpublished(user: IOmniRTCRemoteUser, mediaType: "audio" | "video"): void;
475
-
476
-
477
- export declare function event_video_element_visible_status(data?: CheckVideoVisibleResult): void;
478
-
479
-
480
- export declare function event_video_element_visible_status_2(data?: CheckVideoVisibleResult): void;
481
-
482
-
483
- export declare function event_volume_indicator(result: {
484
-
485
- level: number;
486
-
487
- uid: UID;
488
- }[]): void;
489
-
490
-
491
- export declare interface EventCustomReportParams {
492
-
493
- reportId: string;
494
-
495
- category: string;
496
-
497
- event: string;
498
-
499
- label: string;
500
-
501
- value: number;
502
- }
503
-
504
-
505
- declare class EventEmitter {
506
- // private _events;
507
-
508
- getListeners(event: string): Function[];
509
-
510
- on(event: string, listener: Function): void;
511
-
512
- once(event: string, listener: Function): void;
513
-
514
- off(event: string, listener: Function): void;
515
-
516
- removeAllListeners(event?: string): void;
517
- // private _indexOfListener;
518
- }
519
-
520
-
521
- export declare interface IOmniRTC {
522
-
523
- VERSION: string;
524
-
525
- getSupportedCodec(): Promise<{
526
- video: string[];
527
- audio: string[];
528
- }>;
529
-
530
- checkSystemRequirements(): boolean;
531
-
532
- createClient(config: ClientConfig): IOmniRTCClient;
533
-
534
- createCustomAudioTrack(config: CustomAudioTrackInitConfig): ILocalAudioTrack;
535
-
536
- createMicrophoneAudioTrack(config?: MicrophoneAudioTrackInitConfig): Promise<IMicrophoneAudioTrack>;
537
-
538
- createBufferSourceAudioTrack(config: BufferSourceAudioTrackInitConfig): Promise<IBufferSourceAudioTrack>;
539
-
540
- createCustomVideoTrack(config: CustomVideoTrackInitConfig): ILocalVideoTrack;
541
-
542
- createCameraVideoTrack(config?: CameraVideoTrackInitConfig): Promise<ICameraVideoTrack>;
543
-
544
- createMicrophoneAndCameraTracks(audioConfig?: MicrophoneAudioTrackInitConfig, videoConfig?: CameraVideoTrackInitConfig): Promise<[IMicrophoneAudioTrack, ICameraVideoTrack]>;
545
-
546
- createScreenVideoTrack(config: ScreenVideoTrackInitConfig, withAudio: "enable"): Promise<[ILocalVideoTrack, ILocalAudioTrack]>;
547
- createScreenVideoTrack(config: ScreenVideoTrackInitConfig, withAudio: "disable"): Promise<ILocalVideoTrack>;
548
- createScreenVideoTrack(config: ScreenVideoTrackInitConfig, withAudio?: "enable" | "disable" | "auto"): Promise<[ILocalVideoTrack, ILocalAudioTrack] | ILocalVideoTrack>;
549
-
550
- getDevices(skipPermissionCheck?: boolean): Promise<MediaDeviceInfo[]>;
551
-
552
- getMicrophones(skipPermissionCheck?: boolean): Promise<MediaDeviceInfo[]>;
553
-
554
- getCameras(skipPermissionCheck?: boolean): Promise<MediaDeviceInfo[]>;
555
-
556
- getPlaybackDevices(skipPermissionCheck?: boolean): Promise<MediaDeviceInfo[]>;
557
-
558
- // getElectronScreenSources(type?: ScreenSourceType): Promise<ElectronDesktopCapturerSource[]>;
559
-
560
- setLogLevel(level: number): void;
561
-
562
- enableLogUpload(): void;
563
-
564
- disableLogUpload(): void;
565
-
566
- checkVideoTrackIsActive(track: ILocalVideoTrack | IRemoteVideoTrack, timeout?: number): Promise<boolean>;
567
-
568
- checkAudioTrackIsActive(track: ILocalAudioTrack | IRemoteAudioTrack, timeout?: number): Promise<boolean>;
569
-
570
- onCameraChanged?: (deviceInfo: DeviceInfo) => void;
571
-
572
- onMicrophoneChanged?: (deviceInfo: DeviceInfo) => void;
573
-
574
- onPlaybackDeviceChanged?: (deviceInfo: DeviceInfo) => void;
575
-
576
- onAudioAutoplayFailed?: () => void;
577
-
578
- onAutoplayFailed?: () => void;
579
-
580
- setArea(area: AREAS[] | {
581
- areaCode: AREAS[];
582
- excludedArea?: AREAS;
583
- }): void;
584
-
585
- processExternalMediaAEC(element: HTMLMediaElement): void;
586
- }
587
-
588
-
589
- export declare interface IOmniRTCClient extends EventEmitter {
590
-
591
- readonly connectionState: ConnectionState;
592
-
593
- readonly remoteUsers: IOmniRTCRemoteUser[];
594
-
595
- readonly localTracks: ILocalTrack[];
596
-
597
- readonly uid?: UID;
598
-
599
- readonly channelName?: string;
600
- on(event: "connection-state-change", listener: typeof event_connection_state_change): void;
601
- on(event: "user-joined", listener: typeof event_user_joined): void;
602
- on(event: "user-left", listener: typeof event_user_left): void;
603
- on(event: "user-published", listener: typeof event_user_published): void;
604
- on(event: "user-unpublished", listener: typeof event_user_unpublished): void;
605
- on(event: "user-info-updated", listener: typeof event_user_info_updated): void;
606
- on(event: "media-reconnect-start", listener: typeof event_media_reconnect_start): void;
607
- on(event: "media-reconnect-end", listener: typeof event_media_reconnect_end): void;
608
- // on(event: "stream-type-changed", listener: typeof event_stream_type_changed): void;
609
- // on(event: "stream-fallback", listener: typeof event_stream_fallback): void;
610
- // on(event: "channel-media-relay-state", listener: typeof event_channel_media_relay_state): void;
611
- // on(event: "channel-media-relay-event", listener: typeof event_channel_media_relay_event): void;
612
- on(event: "volume-indicator", listener: typeof event_volume_indicator): void;
613
- // on(event: "crypt-error", listener: typeof event_crypt_error): void;
614
- on(event: "token-privilege-will-expire", listener: typeof event_token_privilege_will_expire): void;
615
- on(event: "token-privilege-did-expire", listener: typeof event_token_privilege_did_expire): void;
616
- // on(event: "network-quality", listener: typeof event_network_quality): void;
617
- // on(event: "live-streaming-error", listener: typeof event_live_streaming_error): void;
618
- // on(event: "live-streaming-warning", listener: typeof event_live_streaming_warning): void;
619
- // on(event: "stream-inject-status", listener: typeof event_stream_inject_status): void;
620
- on(event: "exception", listener: typeof event_exception): void;
621
- // on(event: "is-using-cloud-proxy", listener: typeof event_is_using_cloud_proxy): void;
622
- // on(event: "join-fallback-to-proxy", listener: typeof event_join_fallback_to_proxy): void;
623
- on(event: string, listener: Function): void;
624
-
625
- join(): Promise<UID>;
626
-
627
- leave(): Promise<void>;
628
-
629
- publish(tracks: ILocalTrack | ILocalTrack[]): Promise<void>;
630
-
631
- unpublish(tracks?: ILocalTrack | ILocalTrack[]): Promise<void>;
632
-
633
- subscribe(user: IOmniRTCRemoteUser, mediaType: "video"): Promise<IRemoteVideoTrack>;
634
-
635
- subscribe(user: IOmniRTCRemoteUser, mediaType: "audio"): Promise<IRemoteAudioTrack>;
636
-
637
- subscribe(user: IOmniRTCRemoteUser, mediaType: "video" | "audio"): Promise<IRemoteTrack>;
638
- // massSubscribe(subscribeList: {
639
- // user: IOmniRTCRemoteUser;
640
- // mediaType: "audio" | "video";
641
- // }[]): Promise<{
642
- // user: IOmniRTCRemoteUser;
643
- // mediaType: "audio" | "video";
644
- // track?: IRemoteTrack;
645
- // error?: OmniRTCError;
646
- // }[]>;
647
-
648
- unsubscribe(user: IOmniRTCRemoteUser, mediaType?: "video" | "audio"): Promise<void>;
649
- // massUnsubscribe(unsubscribeList: {
650
- // user: IOmniRTCRemoteUser;
651
- // mediaType?: "audio" | "video";
652
- // }[]): Promise<void>;
653
-
654
- // setLowStreamParameter(streamParameter: LowStreamParameter): void;
655
-
656
- // enableDualStream(): Promise<void>;
657
-
658
- // disableDualStream(): Promise<void>;
659
-
660
- setClientRole(role: ClientRole, options?: ClientRoleOptions): Promise<void>;
661
-
662
- // setProxyServer(proxyServer: string): void;
663
-
664
- // setTurnServer(turnServer: TurnServerConfig): void;
665
-
666
- // startProxyServer(mode?: number): void;
667
-
668
- // stopProxyServer(): void;
669
-
670
- // setRemoteVideoStreamType(uid: UID, streamType: RemoteStreamType): Promise<void>;
671
-
672
- // setRemoteDefaultVideoStreamType(streamType: RemoteStreamType): Promise<void>;
673
-
674
- // pickSVCLayer(uid: UID, layerOptions: {
675
- // spatialLayer: 0 | 1 | 2 | 3;
676
- // temporalLayer: 0 | 1 | 2 | 3;
677
- // }): Promise<void>;
678
-
679
- // setStreamFallbackOption(uid: UID, fallbackType: RemoteStreamFallbackType): Promise<void>;
680
-
681
- // setEncryptionConfig(encryptionMode: EncryptionMode, secret: string, salt?: Uint8Array): void;
682
-
683
- renewToken(token: string): Promise<void>;
684
-
685
- enableAudioVolumeIndicator(): void;
686
-
687
- getRTCStats(): OmniRTCStats;
688
-
689
- // setLiveTranscoding(config: LiveStreamingTranscodingConfig): Promise<void>;
690
-
691
- // startLiveStreaming(url: string, transcodingEnabled?: boolean): Promise<void>;
692
-
693
- // stopLiveStreaming(url: string): Promise<void>;
694
-
695
- // addInjectStreamUrl(url: string, config: InjectStreamConfig): Promise<void>;
696
-
697
- // removeInjectStreamUrl(): Promise<void>;
698
-
699
- // startChannelMediaRelay(config: IChannelMediaRelayConfiguration): Promise<void>;
700
-
701
- // updateChannelMediaRelay(config: IChannelMediaRelayConfiguration): Promise<void>;
702
-
703
- // stopChannelMediaRelay(): Promise<void>;
704
-
705
- // sendCustomReportMessage(reports: EventCustomReportParams[] | EventCustomReportParams): Promise<void>;
706
-
707
- getLocalAudioStats(): LocalAudioTrackStats;
708
-
709
- getRemoteAudioStats(): {
710
- [uid: string]: RemoteAudioTrackStats;
711
- };
712
-
713
- getRemoteNetworkQuality(): {
714
- [uid: string]: NetworkQuality;
715
- };
716
-
717
- getLocalVideoStats(): LocalVideoTrackStats;
718
-
719
- getRemoteVideoStats(): {
720
- [uid: string]: RemoteVideoTrackStats;
721
- };
722
- }
723
-
724
-
725
- export declare interface IOmniRTCRemoteUser {
726
-
727
- uid: UID;
728
-
729
- audioTrack?: IRemoteAudioTrack;
730
-
731
- videoTrack?: IRemoteVideoTrack;
732
-
733
- hasAudio: boolean;
734
-
735
- hasVideo: boolean;
736
- }
737
-
738
-
739
- export declare interface IBufferSourceAudioTrack extends ILocalAudioTrack {
740
-
741
- source: string | File | AudioBuffer;
742
-
743
- currentState: AudioSourceState;
744
-
745
- duration: number;
746
- on(event: "source-state-change", listener: typeof event_source_state_change): void;
747
- on(event: string, listener: Function): void;
748
-
749
- getCurrentTime(): number;
750
-
751
- startProcessAudioBuffer(options?: AudioSourceOptions): void;
752
-
753
- pauseProcessAudioBuffer(): void;
754
-
755
- seekAudioBuffer(time: number): void;
756
-
757
- resumeProcessAudioBuffer(): void;
758
-
759
- stopProcessAudioBuffer(): void;
760
- }
761
-
762
-
763
- export declare interface ICameraVideoTrack extends ILocalVideoTrack {
764
-
765
- setDevice(deviceId: string): Promise<void>;
766
-
767
- setEnabled(enabled: boolean): Promise<void>;
768
-
769
- setEncoderConfiguration(config: VideoEncoderConfiguration | VideoEncoderConfigurationPreset): Promise<void>;
770
- }
771
-
772
-
773
- export declare interface IChannelMediaRelayConfiguration {
774
-
775
- setSrcChannelInfo(info: ChannelMediaRelayInfo): void;
776
-
777
- addDestChannelInfo(info: ChannelMediaRelayInfo): void;
778
-
779
- removeDestChannelInfo(channelName: string): void;
780
- }
781
-
782
-
783
- declare interface IElectronNativeImage {
784
- toDataURL(): string;
785
- getSize(): {
786
- width: number;
787
- height: number;
788
- };
789
- resize(options: {
790
- width: number;
791
- }): IElectronNativeImage;
792
- }
793
-
794
-
795
- export declare interface ILocalAudioTrack extends ILocalTrack {
796
-
797
- setVolume(volume: number): void;
798
-
799
- getVolumeLevel(): number;
800
-
801
- // setAudioFrameCallback(audioFrameCallback: null | ((buffer: AudioBuffer) => void), frameSize?: number): void;
802
-
803
- play(): void;
804
-
805
- setPlaybackDevice(deviceId: string): Promise<void>;
806
-
807
- // getStats(): LocalAudioTrackStats;
808
- }
809
-
810
-
811
- export declare interface ILocalTrack extends ITrack {
812
- on(event: "track-ended", listener: typeof event_track_ended): void;
813
-
814
- setEnabled(enabled: boolean): Promise<void>;
815
-
816
- // getStats(): LocalVideoTrackStats | LocalAudioTrackStats;
817
-
818
- getTrackLabel(): string;
819
-
820
- setMuted(muted: boolean): Promise<void>;
821
-
822
- close(): void;
823
- muted: boolean;
824
- enabled: boolean;
825
- }
826
-
827
-
828
- export declare interface ILocalVideoTrack extends ILocalTrack {
829
- // on(event: "beauty-effect-overload", listener: typeof event_beauty_effect_overload): void;
830
- on(event: "track-ended", listener: typeof event_track_ended): void;
831
- // on(event: "video-element-visible-status", listener: typeof event_video_element_visible_status_2): void;
832
-
833
- play(element: string | HTMLElement, config?: VideoPlayerConfig): void;
834
-
835
- // getStats(): LocalVideoTrackStats;
836
-
837
- // setBeautyEffect(enabled: boolean, options?: BeautyEffectOptions): Promise<void>;
838
-
839
- getCurrentFrameData(): ImageData;
840
-
841
- // setOptimizationMode(mode: "balanced" | "motion" | "detail"): Promise<void>;
842
-
843
- // getVideoElementVisibleStatus(): CheckVideoVisibleResult | undefined;
844
- }
845
-
846
-
847
- export declare interface IMicrophoneAudioTrack extends ILocalAudioTrack {
848
-
849
- setDevice(deviceId: string): Promise<void>;
850
-
851
- setEnabled(enabled: boolean): Promise<void>;
852
- }
853
-
854
-
855
- export declare interface InjectStreamConfig {
856
- audioVolume?: number;
857
-
858
- audioBitrate?: number;
859
-
860
- audioChannels?: number;
861
-
862
- audioSampleRate?: number;
863
-
864
- height?: number;
865
-
866
- width?: number;
867
-
868
- videoBitrate?: number;
869
-
870
- videoFramerate?: number;
871
- videoGop?: number;
872
- }
873
-
874
-
875
- declare enum InjectStreamEventStatus {
876
-
877
- INJECT_STREAM_STATUS_START_SUCCESS = 0,
878
-
879
- INJECT_STREAM_STATUS_START_ALREADY_EXISTS = 1,
880
-
881
- INJECT_STREAM_STATUS_START_UNAUTHORIZED = 2,
882
-
883
- INJECT_STREAM_STATUS_START_TIMEOUT = 3,
884
-
885
- INJECT_STREAM_STATUS_START_FAILED = 4,
886
-
887
- INJECT_STREAM_STATUS_STOP_SUCCESS = 5,
888
-
889
- INJECT_STREAM_STATUS_STOP_NOT_FOUND = 6,
890
-
891
- INJECT_STREAM_STATUS_STOP_UNAUTHORIZED = 7,
892
-
893
- INJECT_STREAM_STATUS_STOP_TIMEOUT = 8,
894
- INJECT_STREAM_STATUS_STOP_FAILED = 9,
895
-
896
- INJECT_STREAM_STATUS_BROKEN = 10
897
- }
898
-
899
-
900
- export declare interface IRemoteAudioTrack extends IRemoteTrack {
901
-
902
- // getStats(): RemoteAudioTrackStats;
903
- /**
904
- * @ignore
905
- */
906
- consumer?: any;
907
-
908
- /**
909
- * @ignore
910
- */
911
- volume?: any;
912
-
913
- play(): void;
914
-
915
- setPlaybackDevice(deviceId: string): Promise<void>;
916
-
917
- // setAudioFrameCallback(audioFrameCallback: null | ((buffer: AudioBuffer) => void), frameSize?: number): void;
918
-
919
- setVolume(volume: number): void;
920
-
921
- getVolumeLevel(): number;
922
- }
923
-
924
-
925
- export declare interface IRemoteTrack extends ITrack {
926
- on(event: "first-frame-decoded", listener: typeof event_first_frame_decoded): void;
927
-
928
- getUserId(): UID;
929
-
930
- // getStats(): RemoteAudioTrackStats | RemoteVideoTrackStats;
931
- }
932
-
933
-
934
- export declare interface IRemoteVideoTrack extends IRemoteTrack {
935
- on(event: "first-frame-decoded", listener: typeof event_first_frame_decoded): void;
936
- // on(event: "video-element-visible-status", listener: typeof event_video_element_visible_status): void;
937
-
938
- // getStats(): RemoteVideoTrackStats;
939
-
940
- play(element: string | HTMLElement, config?: VideoPlayerConfig): void;
941
-
942
- getCurrentFrameData(): ImageData;
943
-
944
- // getVideoElementVisibleStatus(): CheckVideoVisibleResult | undefined;
945
- }
946
-
947
- export declare interface ITrack extends EventEmitter {
948
-
949
- trackMediaType: "audio" | "video";
950
-
951
- track?: MediaStreamTrack;
952
-
953
- isPlaying: boolean;
954
-
955
- getTrackId(): string;
956
-
957
- getMediaStreamTrack(): MediaStreamTrack;
958
-
959
- play(element?: string | HTMLElement): void;
960
-
961
- stop(): void;
962
- }
963
-
964
-
965
- export declare interface LiveStreamingTranscodingConfig {
966
-
967
- audioBitrate?: number;
968
-
969
- audioChannels?: 1 | 2 | 3 | 4 | 5;
970
-
971
- audioSampleRate?: 32000 | 44100 | 48000;
972
-
973
- backgroundColor?: number;
974
-
975
- height?: number;
976
-
977
- width?: number;
978
-
979
- lowLatency?: boolean;
980
-
981
- videoBitrate?: number;
982
-
983
- videoCodecProfile?: 66 | 77 | 100;
984
-
985
- videoFrameRate?: number;
986
-
987
- videoGop?: number;
988
-
989
- images?: LiveStreamingTranscodingImage[];
990
-
991
- watermark?: LiveStreamingTranscodingImage;
992
-
993
- backgroundImage?: LiveStreamingTranscodingImage;
994
-
995
- transcodingUsers?: LiveStreamingTranscodingUser[];
996
- userConfigExtraInfo?: string;
997
- }
998
-
999
-
1000
- export declare interface LiveStreamingTranscodingImage {
1001
-
1002
- url: string;
1003
-
1004
- x?: number;
1005
-
1006
- y?: number;
1007
-
1008
- width?: number;
1009
-
1010
- height?: number;
1011
-
1012
- alpha?: number;
1013
- }
1014
-
1015
-
1016
- export declare interface LiveStreamingTranscodingUser {
1017
-
1018
- alpha?: number;
1019
-
1020
- height?: number;
1021
-
1022
- uid: UID;
1023
-
1024
- width?: number;
1025
-
1026
- x?: number;
1027
-
1028
- y?: number;
1029
-
1030
- zOrder?: number;
1031
-
1032
- audioChannel?: number;
1033
- }
1034
-
1035
-
1036
- export declare interface LocalAudioTrackStats {
1037
-
1038
- codecType?: "opus" | "aac" | "PCMU" | "PCMA" | "G722";
1039
-
1040
- sendVolumeLevel: number;
1041
-
1042
- sendBitrate: number;
1043
-
1044
- sendBytes: number;
1045
-
1046
- sendPackets: number;
1047
-
1048
- sendPacketsLost: number;
1049
-
1050
- currentPacketLossRate: number;
1051
- }
1052
-
1053
-
1054
- export declare interface LocalVideoTrackStats {
1055
-
1056
- codecType?: "H264" | "VP8" | "VP9" | "AV1X" | "AV1";
1057
-
1058
- sendBytes: number;
1059
-
1060
- sendFrameRate?: number;
1061
-
1062
- captureFrameRate?: number;
1063
-
1064
- sendPackets: number;
1065
-
1066
- sendPacketsLost: number;
1067
-
1068
- sendResolutionHeight: number;
1069
-
1070
- sendResolutionWidth: number;
1071
-
1072
- captureResolutionHeight: number;
1073
-
1074
- captureResolutionWidth: number;
1075
-
1076
- encodeDelay?: number;
1077
-
1078
- sendBitrate: number;
1079
-
1080
- targetSendBitrate: number;
1081
-
1082
- totalDuration: number;
1083
-
1084
- totalFreezeTime: number;
1085
-
1086
- currentPacketLossRate: number;
1087
- }
1088
-
1089
-
1090
- export declare interface LowStreamParameter {
1091
-
1092
- width: ConstrainULong;
1093
-
1094
- height: ConstrainULong;
1095
-
1096
- framerate?: ConstrainULong;
1097
-
1098
- bitrate?: number;
1099
- }
1100
-
1101
-
1102
- export declare interface MicrophoneAudioTrackInitConfig {
1103
-
1104
- encoderConfig?: AudioEncoderConfiguration | AudioEncoderConfigurationPreset;
1105
-
1106
- AEC?: boolean;
1107
-
1108
- AGC?: boolean;
1109
-
1110
- ANS?: boolean;
1111
-
1112
- DTX?: boolean;
1113
-
1114
- microphoneId?: string;
1115
-
1116
- bypassWebAudio?: boolean;
1117
- }
1118
-
1119
-
1120
- export declare interface NetworkQuality {
1121
-
1122
- uplinkNetworkQuality: 0 | 1 | 2 | 3 | 4 | 5 | 6;
1123
-
1124
- downlinkNetworkQuality: 0 | 1 | 2 | 3 | 4 | 5 | 6;
1125
- }
1126
-
1127
-
1128
- export declare interface RemoteAudioTrackStats {
1129
-
1130
- transportDelay: number;
1131
-
1132
- codecType?: "opus" | "aac" | "PCMU" | "PCMA" | "G722";
1133
-
1134
- end2EndDelay: number;
1135
-
1136
- receiveBitrate: number;
1137
-
1138
- receiveLevel: number;
1139
-
1140
- receiveBytes: number;
1141
-
1142
- receiveDelay: number;
1143
-
1144
- receivePackets: number;
1145
-
1146
- receivePacketsLost: number;
1147
-
1148
- packetLossRate: number;
1149
-
1150
- currentPacketLossRate: number;
1151
-
1152
- totalDuration: number;
1153
-
1154
- totalFreezeTime: number;
1155
-
1156
- freezeRate: number;
1157
- publishDuration: number;
1158
- }
1159
-
1160
-
1161
- export declare enum RemoteStreamFallbackType {
1162
-
1163
- DISABLE = 0,
1164
-
1165
- LOW_STREAM = 1,
1166
-
1167
- AUDIO_ONLY = 2
1168
- }
1169
-
1170
-
1171
- export declare enum RemoteStreamType {
1172
-
1173
- HIGH_STREAM = 0,
1174
-
1175
- LOW_STREAM = 1
1176
- }
1177
-
1178
-
1179
- export declare interface RemoteVideoTrackStats {
1180
-
1181
- transportDelay: number;
1182
-
1183
- codecType?: "H264" | "VP8" | "VP9" | "AV1X" | "AV1";
1184
-
1185
- end2EndDelay: number;
1186
-
1187
- receiveBitrate: number;
1188
-
1189
- receiveDelay: number;
1190
-
1191
- receiveBytes: number;
1192
-
1193
- decodeFrameRate?: number;
1194
-
1195
- receiveFrameRate?: number;
1196
-
1197
- renderFrameRate?: number;
1198
-
1199
- receivePackets: number;
1200
-
1201
- receivePacketsLost: number;
1202
-
1203
- packetLossRate: number;
1204
-
1205
- currentPacketLossRate: number;
1206
-
1207
- receiveResolutionHeight: number;
1208
-
1209
- receiveResolutionWidth: number;
1210
-
1211
- totalDuration: number;
1212
-
1213
- totalFreezeTime: number;
1214
-
1215
- freezeRate: number;
1216
- publishDuration: number;
1217
- }
1218
-
1219
-
1220
- declare interface RetryConfiguration {
1221
- timeout: number;
1222
- timeoutFactor: number;
1223
- maxRetryCount: number;
1224
- maxRetryTimeout: number;
1225
- }
1226
-
1227
-
1228
- export declare type ScreenEncoderConfigurationPreset = keyof typeof SUPPORT_SCREEN_ENCODER_CONFIG_LIST;
1229
-
1230
-
1231
- export declare type ScreenSourceType = "screen" | "window" | "application";
1232
-
1233
-
1234
- export declare interface ScreenVideoTrackInitConfig {
1235
-
1236
- encoderConfig?: VideoEncoderConfiguration | ScreenEncoderConfigurationPreset;
1237
-
1238
- electronScreenSourceId?: string;
1239
-
1240
- extensionId?: string;
1241
-
1242
- screenSourceType?: ScreenSourceType;
1243
-
1244
- optimizationMode?: "motion" | "detail";
1245
-
1246
- scalabiltyMode?: SVCConfiguration | SVCConfigurationPreset;
1247
- }
1248
-
1249
-
1250
- export declare type SDK_AUDIO_CODEC = "opus" | "pcma" | "pcmu" | "g722";
1251
-
1252
-
1253
- export declare type SDK_CODEC = "h264" | "vp8" | "vp9" | "av1";
1254
-
1255
-
1256
- export declare type SDK_MODE = "live" | "rtc";
1257
-
1258
-
1259
- declare const SUPPORT_SCREEN_ENCODER_CONFIG_LIST: {
1260
- "480p": VideoEncoderConfiguration;
1261
- "480p_1": VideoEncoderConfiguration;
1262
- "480p_2": VideoEncoderConfiguration;
1263
- "480p_3": VideoEncoderConfiguration;
1264
- "720p": VideoEncoderConfiguration;
1265
- "720p_1": VideoEncoderConfiguration;
1266
- "720p_2": VideoEncoderConfiguration;
1267
- "720p_3": VideoEncoderConfiguration;
1268
- "1080p": VideoEncoderConfiguration;
1269
- "1080p_1": VideoEncoderConfiguration;
1270
- "1080p_2": VideoEncoderConfiguration;
1271
- "1080p_3": VideoEncoderConfiguration;
1272
- };
1273
-
1274
-
1275
- declare const SUPPORT_SVC_CONFIG_LIST: {
1276
- "1SL1TL": SVCConfiguration;
1277
- "3SL3TL": SVCConfiguration;
1278
- "2SL3TL": SVCConfiguration;
1279
- };
1280
-
1281
-
1282
- declare const SUPPORT_VIDEO_ENCODER_CONFIG_LIST: {
1283
- "90p": VideoEncoderConfiguration;
1284
- "90p_1": VideoEncoderConfiguration;
1285
- "120p": VideoEncoderConfiguration;
1286
- "120p_1": VideoEncoderConfiguration;
1287
- "120p_3": VideoEncoderConfiguration;
1288
- "120p_4": VideoEncoderConfiguration;
1289
- "180p": VideoEncoderConfiguration;
1290
- "180p_1": VideoEncoderConfiguration;
1291
- "180p_3": VideoEncoderConfiguration;
1292
- "180p_4": VideoEncoderConfiguration;
1293
- "240p": VideoEncoderConfiguration;
1294
- "240p_1": VideoEncoderConfiguration;
1295
- "240p_3": VideoEncoderConfiguration;
1296
- "240p_4": VideoEncoderConfiguration;
1297
- "360p": VideoEncoderConfiguration;
1298
- "360p_1": VideoEncoderConfiguration;
1299
- "360p_3": VideoEncoderConfiguration;
1300
- "360p_4": VideoEncoderConfiguration;
1301
- "360p_6": VideoEncoderConfiguration;
1302
- "360p_7": VideoEncoderConfiguration;
1303
- "360p_8": VideoEncoderConfiguration;
1304
- "360p_9": VideoEncoderConfiguration;
1305
- "360p_10": VideoEncoderConfiguration;
1306
- "360p_11": VideoEncoderConfiguration;
1307
- "480p": VideoEncoderConfiguration;
1308
- "480p_1": VideoEncoderConfiguration;
1309
- "480p_2": VideoEncoderConfiguration;
1310
- "480p_3": VideoEncoderConfiguration;
1311
- "480p_4": VideoEncoderConfiguration;
1312
- "480p_6": VideoEncoderConfiguration;
1313
- "480p_8": VideoEncoderConfiguration;
1314
- "480p_9": VideoEncoderConfiguration;
1315
- "480p_10": VideoEncoderConfiguration;
1316
- "720p": VideoEncoderConfiguration;
1317
- "720p_1": VideoEncoderConfiguration;
1318
- "720p_2": VideoEncoderConfiguration;
1319
- "720p_3": VideoEncoderConfiguration;
1320
- "720p_5": VideoEncoderConfiguration;
1321
- "720p_6": VideoEncoderConfiguration;
1322
- "1080p": VideoEncoderConfiguration;
1323
- "1080p_1": VideoEncoderConfiguration;
1324
- "1080p_2": VideoEncoderConfiguration;
1325
- "1080p_3": VideoEncoderConfiguration;
1326
- "1080p_5": VideoEncoderConfiguration;
1327
- "1440p": VideoEncoderConfiguration;
1328
- "1440p_1": VideoEncoderConfiguration;
1329
- "1440p_2": VideoEncoderConfiguration;
1330
- "4k": VideoEncoderConfiguration;
1331
- "4k_1": VideoEncoderConfiguration;
1332
- "4k_3": VideoEncoderConfiguration;
1333
- };
1334
-
1335
-
1336
- export declare interface SVCConfiguration {
1337
-
1338
- numSpatialLayers: 1 | 2 | 3;
1339
-
1340
- numTemporalLayers: 1 | 3;
1341
- }
1342
-
1343
-
1344
- export declare type SVCConfigurationPreset = keyof typeof SUPPORT_SVC_CONFIG_LIST;
1345
-
1346
-
1347
- export declare interface TurnServerConfig {
1348
-
1349
- turnServerURL: string;
1350
-
1351
- password: string;
1352
-
1353
- udpport?: number;
1354
-
1355
- username: string;
1356
-
1357
- forceturn?: boolean;
1358
-
1359
- tcpport?: number;
1360
- security?: boolean;
1361
- }
1362
-
1363
-
1364
- export declare type UID = number | string;
1365
-
1366
-
1367
- export declare interface VideoEncoderConfiguration {
1368
-
1369
- width?: number | ConstrainLong;
1370
-
1371
- height?: number | ConstrainLong;
1372
-
1373
- frameRate?: number | ConstrainLong;
1374
-
1375
- bitrateMin?: number;
1376
-
1377
- bitrateMax?: number;
1378
-
1379
- scaleResolutionDownBy?: number;
1380
- }
1381
-
1382
-
1383
- export declare type VideoEncoderConfigurationPreset = keyof typeof SUPPORT_VIDEO_ENCODER_CONFIG_LIST;
1384
-
1385
-
1386
- export declare interface VideoPlayerConfig {
1387
-
1388
- mirror?: boolean;
1389
-
1390
- fit?: "cover" | "contain" | "fill";
1391
- }
1392
-
1393
-
1394
- declare enum VisibleHiddenReason {
1395
- COVERED = "COVERED",
1396
- POSITION = "POSITION",
1397
- SIZE = "SIZE",
1398
- STYLE = "STYLE"
1399
- }
1400
-
1401
- declare interface VisibleHiddenResult {
1402
- visible: false;
1403
- reason: keyof typeof VisibleHiddenReason;
1404
- }
1405
-
1406
-
1407
- declare interface VisibleResultInner {
1408
- visible: true;
1409
- }