trtc-sdk-v5 5.8.2-beta.6 → 5.8.2-beta.8

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/index.d.ts CHANGED
@@ -5,7 +5,7 @@ import { Watermark, WatermarkOptions } from './plugins/video-effect/watermark';
5
5
  import { Beauty, BeautyOptions, UpdateBeautyOptions } from './plugins/video-effect/beauty';
6
6
  import { BasicBeauty, BasicBeautyOptions } from './plugins/video-effect/basic-beauty';
7
7
  import { CrossRoom, StartCrossRoomOption, UpdateCrossRoomOption, StopCrossRoomOption } from './plugins/cross-room';
8
- import { Debug, DebugOptions } from './plugins/debug';
8
+ import { Debug, DebugOptions } from './plugins/debug'
9
9
 
10
10
  export { CDNStreamingOptions, DeviceDetectorOptions, VirtualBackgroundOptions, UpdateVirtualBackgroundOptions, WatermarkOptions, BeautyOptions, UpdateBeautyOptions, BasicBeautyOptions, StartCrossRoomOption, UpdateCrossRoomOption, StopCrossRoomOption, DebugOptions };
11
11
  type TRTCPlugin = typeof CrossRoom | typeof CDNStreaming | typeof DeviceDetector | typeof VirtualBackground | typeof Watermark | typeof Beauty | typeof BasicBeauty | typeof Debug;
@@ -45,38 +45,38 @@ export declare type PluginStopOptionsMap = {
45
45
  };
46
46
 
47
47
  export declare class RtcError extends Error implements RTCErrorInterface {
48
- name: string;
49
- /**
48
+ name: string;
49
+ /**
50
50
  *
51
51
  * Error code
52
52
  * @see Detailed error code list: {@link module:ERROR_CODE ErrorCode}
53
53
  * @readonly
54
54
  * @memberof RtcError
55
55
  */
56
- code: number;
57
- /**
56
+ code: number;
57
+ /**
58
58
  *
59
59
  * Extended error code
60
60
  * @see Detailed error code list: {@link module:ERROR_CODE ErrorCode}
61
61
  * @readonly
62
62
  * @memberof RtcError
63
63
  */
64
- extraCode?: number;
65
- /**
64
+ extraCode?: number;
65
+ /**
66
66
  *
67
67
  * The name of the function that throws the error
68
68
  * @readonly
69
69
  * @memberof RtcError
70
70
  */
71
- functionName: string;
72
- /**
71
+ functionName: string;
72
+ /**
73
73
  *
74
74
  * Error message
75
75
  * @readonly
76
76
  * @memberof RtcError
77
77
  */
78
- message: string;
79
- /**
78
+ message: string;
79
+ /**
80
80
  * Error handler. For the following errors, you can call error.handler() for recovering.
81
81
  *
82
82
  * - {@link module:ERROR_CODE.DEVICE_ERROR ErrorCode.DEVICE_ERROR} extraCode: 5302
@@ -93,10 +93,10 @@ export declare class RtcError extends Error implements RTCErrorInterface {
93
93
  * @readonly
94
94
  * @memberof RtcError
95
95
  */
96
- handler?: () => void;
97
- originError?: Error | DOMException | RtcError;
98
- constructor({ code, extraCode, message, messageParams, fnName, originError }: RTCErrorParams);
99
- static convertFrom(originError: Error, fnName?: string, fnParams?: any): RtcError;
96
+ handler?: () => void;
97
+ originError?: Error | DOMException | RtcError;
98
+ constructor({ code, extraCode, message, messageParams, fnName, originError }: RTCErrorParams);
99
+ static convertFrom(originError: Error, fnName?: string, fnParams?: any): RtcError;
100
100
  }
101
101
 
102
102
  export declare enum LOG_LEVEL {
@@ -242,8 +242,8 @@ export declare const screenProfileMap: {
242
242
  };
243
243
  };
244
244
  export declare const enum Scene {
245
- LIVE = 'live',
246
- RTC = 'rtc'
245
+ LIVE = "live",
246
+ RTC = "rtc"
247
247
  }
248
248
 
249
249
  export declare const enum NetworkQualityValue {
@@ -257,20 +257,20 @@ export declare const enum NetworkQualityValue {
257
257
  }
258
258
 
259
259
  export declare const enum PlayerState {
260
- PAUSED = 'PAUSED',
261
- PLAYING = 'PLAYING',
262
- STOPPED = 'STOPPED'
260
+ PAUSED = "PAUSED",
261
+ PLAYING = "PLAYING",
262
+ STOPPED = "STOPPED"
263
263
  }
264
264
  export declare const enum UserRole {
265
- ANCHOR = 'anchor',
266
- AUDIENCE = 'audience'
265
+ ANCHOR = "anchor",
266
+ AUDIENCE = "audience"
267
267
  }
268
268
  export declare const enum ConnectionState {
269
- CONNECTED = 'CONNECTED',
270
- DISCONNECTED = 'DISCONNECTED',
271
- CONNECTING = 'CONNECTING',
272
- RECONNECTED = 'RECONNECTED',
273
- RECONNECTING = 'RECONNECTING'
269
+ CONNECTED = "CONNECTED",
270
+ DISCONNECTED = "DISCONNECTED",
271
+ CONNECTING = "CONNECTING",
272
+ RECONNECTED = "RECONNECTED",
273
+ RECONNECTING = "RECONNECTING"
274
274
  }
275
275
  export declare interface NetworkQuality {
276
276
  uplinkNetworkQuality: NetworkQualityValue;
@@ -281,10 +281,10 @@ export declare interface NetworkQuality {
281
281
  downlinkLoss: number;
282
282
  }
283
283
  export declare const enum BannedReason {
284
- BANNED = 'banned',
285
- KICK = 'kick',
286
- USER_TIME_OUT = 'user_time_out',
287
- ROOM_DISBAND = 'room_disband'
284
+ BANNED = "banned",
285
+ KICK = "kick",
286
+ USER_TIME_OUT = "user_time_out",
287
+ ROOM_DISBAND = "room_disband"
288
288
  }
289
289
 
290
290
  export declare type PluginWithAssets = {
@@ -421,18 +421,18 @@ export declare interface StopRemoteAudioConfig {
421
421
  userId: string;
422
422
  }
423
423
  export declare const enum TRTCStreamType {
424
- Main = 'main',
425
- Sub = 'sub'
424
+ Main = "main",
425
+ Sub = "sub"
426
426
  }
427
427
  export declare enum TRTCDeviceType {
428
- Camera = 'camera',
429
- Microphone = 'microphone',
430
- Speaker = 'speaker'
428
+ Camera = "camera",
429
+ Microphone = "microphone",
430
+ Speaker = "speaker"
431
431
  }
432
432
  export declare enum TRTCDeviceAction {
433
- Remove = 'remove',
434
- Add = 'add',
435
- Active = 'active'
433
+ Remove = "remove",
434
+ Add = "add",
435
+ Active = "active"
436
436
  }
437
437
  export declare interface RTCErrorParams {
438
438
  code: number;
@@ -510,7 +510,7 @@ export declare const TRTCType: {
510
510
  * @default 'standard'
511
511
  * @memberof module:TYPE
512
512
  */
513
- readonly AUDIO_PROFILE_STANDARD: 'standard';
513
+ readonly AUDIO_PROFILE_STANDARD: "standard";
514
514
  /**
515
515
  * Standard stereo audio quality
516
516
  * | Audio Profile | Sampling Rate | Channel | Bitrate (kbps) |
@@ -522,7 +522,7 @@ export declare const TRTCType: {
522
522
  * @default 'standard-stereo'
523
523
  * @memberof module:TYPE
524
524
  */
525
- readonly AUDIO_PROFILE_STANDARD_STEREO: 'standard-stereo';
525
+ readonly AUDIO_PROFILE_STANDARD_STEREO: "standard-stereo";
526
526
  /**
527
527
  * High audio quality
528
528
  * | Audio Profile | Sampling Rate | Channel | Bitrate (kbps) |
@@ -534,7 +534,7 @@ export declare const TRTCType: {
534
534
  * @default 'high'
535
535
  * @memberof module:TYPE
536
536
  */
537
- readonly AUDIO_PROFILE_HIGH: 'high';
537
+ readonly AUDIO_PROFILE_HIGH: "high";
538
538
  /**
539
539
  * High-quality stereo audio
540
540
  * | Audio Profile | Sampling Rate | Channel | Bitrate (kbps) |
@@ -544,10 +544,10 @@ export declare const TRTCType: {
544
544
  * | TRTC.TYPE.AUDIO_PROFILE_STANDARD_STEREO | 48000 | Stereo| 64 |
545
545
  * | TRTC.TYPE.AUDIO_PROFILE_HIGH_STEREO | 48000 | Stereo| 192 |
546
546
  * @default 'high-stereo'
547
-
547
+
548
548
  * @memberof module:TYPE
549
549
  */
550
- readonly AUDIO_PROFILE_HIGH_STEREO: 'high-stereo';
550
+ readonly AUDIO_PROFILE_HIGH_STEREO: "high-stereo";
551
551
  /**
552
552
  * When the network is weak, the video encoding strategy takes 'smooth' first, i.e., the priority is to preserve frame rate.
553
553
  * <br>
@@ -555,7 +555,7 @@ export declare const TRTCType: {
555
555
  * @default 'smooth'
556
556
  * @memberof module:TYPE
557
557
  */
558
- readonly QOS_PREFERENCE_SMOOTH: 'smooth';
558
+ readonly QOS_PREFERENCE_SMOOTH: "smooth";
559
559
  /**
560
560
  * When the network is weak, the video encoding strategy takes 'clear' first, i.e., the priority is to preserve resolution.
561
561
  * <br>
@@ -563,7 +563,7 @@ export declare const TRTCType: {
563
563
  * @default 'clear'
564
564
  * @memberof module:TYPE
565
565
  */
566
- readonly QOS_PREFERENCE_CLEAR: 'clear';
566
+ readonly QOS_PREFERENCE_CLEAR: "clear";
567
567
  };
568
568
  export declare interface AudioMixerOptions {
569
569
  id: string;
@@ -611,9 +611,9 @@ export declare interface LocalStatistic {
611
611
  }[];
612
612
  }
613
613
  export declare enum TRTCVideoType {
614
- Big = 'big',
615
- Small = 'small',
616
- Sub = 'sub'
614
+ Big = "big",
615
+ Small = "small",
616
+ Sub = "sub"
617
617
  }
618
618
  export declare interface RemoteStatistic {
619
619
  audio: {
@@ -634,7 +634,7 @@ export declare interface VideoFrameConfig {
634
634
  streamType?: TRTCStreamType;
635
635
  }
636
636
  export declare enum AutoStartPluginName {
637
- Debug = 'Debug'
637
+ Debug = "Debug"
638
638
  }
639
639
 
640
640
  /**
@@ -703,7 +703,7 @@ export declare const TRTCEvent: {
703
703
  * const extraCode = error.extraCode;
704
704
  * });
705
705
  */
706
- readonly ERROR: 'error';
706
+ readonly ERROR: "error";
707
707
  /**
708
708
  * @description Automatic playback failed, refer to {@tutorial 21-advanced-auto-play-policy}
709
709
  * @default 'autoplay-failed'
@@ -715,7 +715,7 @@ export declare const TRTCEvent: {
715
715
  * console.log(event.userId);
716
716
  * });
717
717
  */
718
- readonly AUTOPLAY_FAILED: 'autoplay-failed';
718
+ readonly AUTOPLAY_FAILED: "autoplay-failed";
719
719
  /**
720
720
  * @description Kicked out of the room for some reason, including:<br>
721
721
  * - kick: The same user with same userId enters same room. The user who enters the room first will be kicked out of the room by the user who enters later.
@@ -731,7 +731,7 @@ export declare const TRTCEvent: {
731
731
  * console.log(event.reason)
732
732
  * });
733
733
  */
734
- readonly KICKED_OUT: 'kicked-out';
734
+ readonly KICKED_OUT: "kicked-out";
735
735
  /**
736
736
  * Remote user enters the room event.
737
737
  *
@@ -745,7 +745,7 @@ export declare const TRTCEvent: {
745
745
  * const userId = event.userId;
746
746
  * });
747
747
  */
748
- readonly REMOTE_USER_ENTER: 'remote-user-enter';
748
+ readonly REMOTE_USER_ENTER: "remote-user-enter";
749
749
  /**
750
750
  * Remote user exits the room event.
751
751
  *
@@ -759,7 +759,7 @@ export declare const TRTCEvent: {
759
759
  * const userId = event.userId;
760
760
  * });
761
761
  */
762
- readonly REMOTE_USER_EXIT: 'remote-user-exit';
762
+ readonly REMOTE_USER_EXIT: "remote-user-exit";
763
763
  /**
764
764
  * Remote user publishes audio. You will receive this notification when the remote user turns on the microphone. Refer to: [Turn on/off camera and microphone](./tutorial-15-basic-dynamic-add-video.html)
765
765
  *
@@ -775,7 +775,7 @@ export declare const TRTCEvent: {
775
775
  * const userId = event.userId;
776
776
  * });
777
777
  */
778
- readonly REMOTE_AUDIO_AVAILABLE: 'remote-audio-available';
778
+ readonly REMOTE_AUDIO_AVAILABLE: "remote-audio-available";
779
779
  /**
780
780
  * Remote user stops publishing audio. You will receive this notification when the remote user turns off the microphone.
781
781
  *
@@ -788,7 +788,7 @@ export declare const TRTCEvent: {
788
788
  *
789
789
  * });
790
790
  */
791
- readonly REMOTE_AUDIO_UNAVAILABLE: 'remote-audio-unavailable';
791
+ readonly REMOTE_AUDIO_UNAVAILABLE: "remote-audio-unavailable";
792
792
  /**
793
793
  * Remote user publishes video. You will receive this notification when the remote user turns on the camera. Refer to: [Turn on/off camera and microphone](./tutorial-15-basic-dynamic-add-video.html)
794
794
  *
@@ -805,7 +805,7 @@ export declare const TRTCEvent: {
805
805
  * trtc.startRemoteVideo({userId, streamType, view});
806
806
  * });
807
807
  */
808
- readonly REMOTE_VIDEO_AVAILABLE: 'remote-video-available';
808
+ readonly REMOTE_VIDEO_AVAILABLE: "remote-video-available";
809
809
  /**
810
810
  * Remote user stops publishing video. You will receive this notification when the remote user turns off the camera.
811
811
  * @default 'remote-video-unavailable'
@@ -818,7 +818,7 @@ export declare const TRTCEvent: {
818
818
  * // At this point, the SDK will automatically stop playing, and there is no need to call stopRemoteVideo.
819
819
  * });
820
820
  */
821
- readonly REMOTE_VIDEO_UNAVAILABLE: 'remote-video-unavailable';
821
+ readonly REMOTE_VIDEO_UNAVAILABLE: "remote-video-unavailable";
822
822
  /**
823
823
  * @description Volume event<br>
824
824
  * After calling the {@link TRTC#enableAudioVolumeEvaluation enableAudioVolumeEvaluation} interface to enable the volume callback, the SDK will throw this event regularly to notify the volume of each userId.<br>
@@ -844,7 +844,7 @@ export declare const TRTCEvent: {
844
844
  * // Enable volume callback and trigger the event every 1000ms
845
845
  * trtc.enableAudioVolumeEvaluation(1000);
846
846
  */
847
- readonly AUDIO_VOLUME: 'audio-volume';
847
+ readonly AUDIO_VOLUME: "audio-volume";
848
848
  /**
849
849
  * @description Network quality statistics data event, which starts to be counted after entering the room and triggers every two seconds. This data reflects the network quality of your local uplink and downlink.
850
850
  * - The uplink network quality (uplinkNetworkQuality) refers to the network situation of uploading local streams (uplink connection network quality from SDK to Tencent Cloud)
@@ -875,7 +875,7 @@ export declare const TRTCEvent: {
875
875
  * console.log(`downlink rtt:${event.downlinkRTT} loss:${event.downlinkLoss}`)
876
876
  * })
877
877
  */
878
- readonly NETWORK_QUALITY: 'network-quality';
878
+ readonly NETWORK_QUALITY: "network-quality";
879
879
  /**
880
880
  * @description SDK and Tencent Cloud connection state change event, you can use this event to listen to the overall connection state of the SDK and Tencent Cloud.<br>
881
881
  * - 'DISCONNECTED': Connection disconnected
@@ -899,7 +899,7 @@ export declare const TRTCEvent: {
899
899
  * const curState = event.state;
900
900
  * });
901
901
  */
902
- readonly CONNECTION_STATE_CHANGED: 'connection-state-changed';
902
+ readonly CONNECTION_STATE_CHANGED: "connection-state-changed";
903
903
  /**
904
904
  * @description Audio playback state change event
905
905
  *
@@ -930,7 +930,7 @@ export declare const TRTCEvent: {
930
930
  * console.log(`${event.userId} player is ${event.state} because of ${event.reason}`);
931
931
  * });
932
932
  */
933
- readonly AUDIO_PLAY_STATE_CHANGED: 'audio-play-state-changed';
933
+ readonly AUDIO_PLAY_STATE_CHANGED: "audio-play-state-changed";
934
934
  /**
935
935
  * @description Video playback state change event
936
936
  *
@@ -964,7 +964,7 @@ export declare const TRTCEvent: {
964
964
  * console.log(`${event.userId} ${event.streamType} video player is ${event.state} because of ${event.reason}`);
965
965
  * });
966
966
  */
967
- readonly VIDEO_PLAY_STATE_CHANGED: 'video-play-state-changed';
967
+ readonly VIDEO_PLAY_STATE_CHANGED: "video-play-state-changed";
968
968
  /**
969
969
  * @description Notification event for local screen sharing stop, only valid for local screen sharing streams.
970
970
  * @default 'screen-share-stopped'
@@ -974,7 +974,7 @@ export declare const TRTCEvent: {
974
974
  * console.log('screen sharing was stopped');
975
975
  * });
976
976
  */
977
- readonly SCREEN_SHARE_STOPPED: 'screen-share-stopped';
977
+ readonly SCREEN_SHARE_STOPPED: "screen-share-stopped";
978
978
  /**
979
979
  * @description Notification event for device changes such as camera and microphone.
980
980
  * - event.device is a [MediaDeviceInfo](https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo) object with properties:
@@ -993,7 +993,7 @@ export declare const TRTCEvent: {
993
993
  * console.log(`${event.type}(${event.device.label}) ${event.action}`);
994
994
  * });
995
995
  */
996
- readonly DEVICE_CHANGED: 'device-changed';
996
+ readonly DEVICE_CHANGED: "device-changed";
997
997
  /**
998
998
  * @description Publish state change event.
999
999
  * - event.mediaType media type, value: `'audio'|'video'|'screen'`.
@@ -1014,7 +1014,7 @@ export declare const TRTCEvent: {
1014
1014
  * console.log(`${event.mediaType} ${event.state} ${event.reason}`);
1015
1015
  * });
1016
1016
  */
1017
- readonly PUBLISH_STATE_CHANGED: 'publish-state-changed';
1017
+ readonly PUBLISH_STATE_CHANGED: "publish-state-changed";
1018
1018
  /**
1019
1019
  * @since v5.3.0
1020
1020
  * @description a new MediaStreamTrack object received.
@@ -1030,7 +1030,7 @@ export declare const TRTCEvent: {
1030
1030
  * const kind = event.track.kind; // audio or video
1031
1031
  * })
1032
1032
  */
1033
- readonly TRACK: 'track';
1033
+ readonly TRACK: "track";
1034
1034
  /**
1035
1035
  * @description TRTC statistics.<br>
1036
1036
  *
@@ -1044,7 +1044,7 @@ export declare const TRTCEvent: {
1044
1044
  * console.warn(statistics.rtt, statistics.upLoss, statistics.downLoss);
1045
1045
  * })
1046
1046
  */
1047
- readonly STATISTICS: 'statistics';
1047
+ readonly STATISTICS: "statistics";
1048
1048
  /**
1049
1049
  * @since v5.3.0
1050
1050
  * @description SEI message received<br>
@@ -1055,7 +1055,7 @@ export declare const TRTCEvent: {
1055
1055
  * console.log(`received sei message from ${event.userId}, data: ${event.data}, streamType: ${event.streamType}`)
1056
1056
  * })
1057
1057
  */
1058
- readonly SEI_MESSAGE: 'sei-message';
1058
+ readonly SEI_MESSAGE: "sei-message";
1059
1059
  /**
1060
1060
  * @since v5.6.0
1061
1061
  * @description received a new custom message.
@@ -1069,7 +1069,7 @@ export declare const TRTCEvent: {
1069
1069
  * // event.data: custom message data, type is ArrayBuffer.
1070
1070
  * })
1071
1071
  */
1072
- readonly CUSTOM_MESSAGE: 'custom-message';
1072
+ readonly CUSTOM_MESSAGE: "custom-message";
1073
1073
  };
1074
1074
  export declare interface TRTCEventTypes {
1075
1075
  [TRTCEvent.ERROR]: [RtcError];
@@ -1160,7 +1160,7 @@ export declare interface CustomMessage extends CustomMessageData {
1160
1160
  seq: number;
1161
1161
  }
1162
1162
  export declare class TRTC {
1163
- /**
1163
+ /**
1164
1164
  * Create a TRTC object for implementing functions such as entering a room, previewing, publishing, and subscribing streams.<br>
1165
1165
  *
1166
1166
  * **Note:**
@@ -1171,8 +1171,8 @@ export declare class TRTC {
1171
1171
  *
1172
1172
  * @returns {TRTC} TRTC object
1173
1173
  */
1174
- static create(options?: TRTCOptions): TRTC;
1175
- /**
1174
+ static create(options?: TRTCOptions): TRTC;
1175
+ /**
1176
1176
  * @private
1177
1177
  * regi <br>
1178
1178
  *
@@ -1189,15 +1189,15 @@ export declare class TRTC {
1189
1189
  * import { VirtualBackground } from 'trtc-sdk-v5/plugins/video-effect/virtual-background';
1190
1190
  * trtc.use(VirtualBackground);
1191
1191
  */
1192
- use(pluginObject: PluginWithAssets | TRTCPlugin): void;
1193
- /**
1192
+ use(pluginObject: PluginWithAssets | TRTCPlugin): void;
1193
+ /**
1194
1194
  * @typedef TurnServer
1195
1195
  * @property {string} url TURN server url
1196
1196
  * @property {string=} username TURN server auth user name
1197
1197
  * @property {string=} credential TURN server password
1198
1198
  * @property {string=} [credentialType=password] TURN server verify password type
1199
1199
  */
1200
- /**
1200
+ /**
1201
1201
  * @typedef ProxyServer
1202
1202
  * @property {string} [websocketProxy] websocket service proxy
1203
1203
  * @property {string} [loggerProxy] log service agent
@@ -1205,7 +1205,7 @@ export declare class TRTC {
1205
1205
  * @property {'all'|'relay'} [iceTransportPolicy='all'] 'all' gives priority to directly connecting to TRTC, and tries to go to the turn server if the connection fails.<br>
1206
1206
  * 'relay' forces the connection through the TURN server.
1207
1207
  */
1208
- /**
1208
+ /**
1209
1209
  * Enter a video call room.<br>
1210
1210
  * - Entering a room means starting a video call session. Only after entering the room successfully can you make audio and video calls with other users in the room.
1211
1211
  * - You can publish local audio and video streams through {@link TRTC#startLocalVideo startLocalVideo()} and {@link TRTC#startLocalAudio startLocalAudio()} respectively. After successful publishing, other users in the room will receive the {@link module:EVENT.REMOTE_AUDIO_AVAILABLE REMOTE_AUDIO_AVAILABLE} and {@link module:EVENT.REMOTE_VIDEO_AVAILABLE REMOTE_VIDEO_AVAILABLE} event notifications.
@@ -1252,8 +1252,8 @@ export declare class TRTC {
1252
1252
  * const trtc = TRTC.create();
1253
1253
  * await trtc.enterRoom({ roomId: 8888, sdkAppId, userId, userSig });
1254
1254
  */
1255
- enterRoom(params: EnterRoomConfig): Promise<void>;
1256
- /**
1255
+ enterRoom(params: EnterRoomConfig): Promise<void>;
1256
+ /**
1257
1257
  * Exit the current audio and video call room.
1258
1258
  * - After exiting the room, the connection with remote users will be closed, and remote audio and video will no longer be received and played, and the publishing of local audio and video will be stopped.
1259
1259
  * - The capture and preview of the local camera and microphone will not stop. You can call {@link TRTC#stopLocalVideo stopLocalVideo()} and {@link TRTC#stopLocalAudio stopLocalAudio()} to stop capturing local microphone and camera.
@@ -1262,8 +1262,8 @@ export declare class TRTC {
1262
1262
  * @example
1263
1263
  * await trtc.exitRoom();
1264
1264
  */
1265
- exitRoom(): Promise<void>;
1266
- /**
1265
+ exitRoom(): Promise<void>;
1266
+ /**
1267
1267
  * Switches the user role, only effective in TRTC.TYPE.SCENE_LIVE interactive live streaming mode.
1268
1268
  *
1269
1269
  * In interactive live streaming mode, a user may need to switch between "audience" and "anchor".
@@ -1299,7 +1299,7 @@ export declare class TRTC {
1299
1299
  * // Since v5.3.0+
1300
1300
  * await trtc.switchRole(TRTC.TYPE.ROLE_ANCHOR, { privateMapKey: 'your new privateMapKey' });
1301
1301
  */
1302
- switchRole(role: UserRole, option?: {
1302
+ switchRole(role: UserRole, option?: {
1303
1303
  privateMapKey?: string;
1304
1304
  latencyLevel?: number;
1305
1305
  }): Promise<void>;
@@ -1321,8 +1321,8 @@ export declare class TRTC {
1321
1321
  * @throws {@link module:ERROR_CODE.OPERATION_FAILED OPERATION_FAILED}
1322
1322
  * @memberof TRTC
1323
1323
  */
1324
- destroy(): void;
1325
- /**
1324
+ destroy(): void;
1325
+ /**
1326
1326
  * Start collecting audio from the local microphone and publish it to the current room.
1327
1327
  * - When to call: can be called before or after entering the room, cannot be called repeatedly.
1328
1328
  * - Only one microphone can be opened for a trtc instance. If you need to open another microphone for testing in the case of already opening one microphone, you can create multiple trtc instances to achieve it.
@@ -1356,8 +1356,8 @@ export declare class TRTC {
1356
1356
  * await trtc.stopLocalAudio();
1357
1357
  * @memberof TRTC
1358
1358
  */
1359
- startLocalAudio(config?: LocalAudioConfig): Promise<void>;
1360
- /**
1359
+ startLocalAudio(config?: LocalAudioConfig): Promise<void>;
1360
+ /**
1361
1361
  * Update the configuration of the local microphone.
1362
1362
  * - When to call: This interface needs to be called after {@link TRTC#startLocalAudio startLocalAudio()} is successful and can be called multiple times.
1363
1363
  * - This method uses incremental update: only update the passed parameters, and keep the parameters that are not passed unchanged.
@@ -1382,16 +1382,16 @@ export declare class TRTC {
1382
1382
  * }
1383
1383
  * @memberof TRTC
1384
1384
  */
1385
- updateLocalAudio(config: UpdateLocalAudioConfig): Promise<void>;
1386
- /**
1385
+ updateLocalAudio(config: UpdateLocalAudioConfig): Promise<void>;
1386
+ /**
1387
1387
  * Stop collecting and publishing the local microphone.
1388
1388
  * - If you just want to mute the microphone, please use updateLocalAudio({ mute: true }). Refer to: {@tutorial 15-basic-dynamic-add-video}.
1389
1389
  * @throws {@link module:ERROR_CODE.OPERATION_ABORT OPERATION_ABORT}
1390
1390
  * @example
1391
1391
  * await trtc.stopLocalAudio();
1392
1392
  */
1393
- stopLocalAudio(): Promise<void>;
1394
- /**
1393
+ stopLocalAudio(): Promise<void>;
1394
+ /**
1395
1395
  * @typedef {object|string} VideoProfile - Configuration for local video stream
1396
1396
  *
1397
1397
  * Video configuration parameters, can use preset values in string format or custom resolution and other parameters
@@ -1430,11 +1430,11 @@ export declare class TRTC {
1430
1430
  * }
1431
1431
  * await trtc.startLocalVideo(config);
1432
1432
  */
1433
- /**
1433
+ /**
1434
1434
  * Start collecting video from the local camera, play the camera's video on the specified HTMLElement tag, and publish the camera's video to the current room.
1435
1435
  * - When to call: can be called before or after entering the room, but cannot be called repeatedly.
1436
1436
  * - Only one camera can be started per trtc instance. If you need to start another camera for testing while one camera is already started, you can create multiple trtc instances to achieve this.
1437
-
1437
+
1438
1438
  * @param {object} [config]
1439
1439
  * @param {string | HTMLElement | HTMLElement[] | null} [config.view] - The HTMLElement instance or ID for local video preview. If not passed or passed as null, the video will not be played.
1440
1440
  * @param {boolean} [config.publish] - Whether to publish the local video to the room. If you call this interface before entering the room and publish = true, the SDK will automatically publish after entering the room. You can get the publish state by listening this event {@link module:EVENT.PUBLISH_STATE_CHANGED PUBLISH_STATE_CHANGED}.
@@ -1493,8 +1493,8 @@ export declare class TRTC {
1493
1493
  * await trtc.startLocalVideo({ view, option: { useFrontCamera: false }});
1494
1494
  * @memberof TRTC
1495
1495
  */
1496
- startLocalVideo(config?: LocalVideoConfig): Promise<void>;
1497
- /**
1496
+ startLocalVideo(config?: LocalVideoConfig): Promise<void>;
1497
+ /**
1498
1498
  * Update the local camera configuration.
1499
1499
  * - This interface needs to be called after {@link TRTC#startLocalVideo startLocalVideo()} is successful.
1500
1500
  * - This interface can be called multiple times.
@@ -1532,16 +1532,16 @@ export declare class TRTC {
1532
1532
  * await trtc.updateLocalVideo({ publish:false });
1533
1533
  * @memberof TRTC
1534
1534
  */
1535
- updateLocalVideo(config: LocalVideoConfig): Promise<void>;
1536
- /**
1535
+ updateLocalVideo(config: LocalVideoConfig): Promise<void>;
1536
+ /**
1537
1537
  * Stop capturing, previewing, and publishing the local camera.
1538
1538
  * - If you only want to stop publishing video but keep the local camera preview, you can use the {@link TRTC#updateLocalVideo updateLocalVideo({ publish:false })} method.<br>
1539
1539
  * @throws {@link module:ERROR_CODE.OPERATION_ABORT OPERATION_ABORT}
1540
1540
  * @example
1541
1541
  * await trtc.stopLocalVideo();
1542
1542
  */
1543
- stopLocalVideo(): Promise<void>;
1544
- /**
1543
+ stopLocalVideo(): Promise<void>;
1544
+ /**
1545
1545
  * @typedef {object|string} ScreenShareProfile - Screen sharing resolution, bit rate, and frame rate configuration
1546
1546
  * Screen sharing configuration parameters, can use preset values or custom resolution and other parameters
1547
1547
  * | Screen Profile | Resolution (width x height) | Frame Rate (fps) | Bitrate (kbps) |
@@ -1554,7 +1554,7 @@ export declare class TRTC {
1554
1554
  * | 1080p_2 | 1920 x 1080 | 30 | 4000 |
1555
1555
  * - The default resolution for screen sharing is `1080p`.
1556
1556
  * - If the above profiles do not meet your business needs, you can also specify custom resolution, frame rate, and bitrate.
1557
-
1557
+
1558
1558
  * @property {number} width - Screen sharing width
1559
1559
  * @property {number} height - Screen sharing height
1560
1560
  * @property {number} frameRate - Screen sharing frame rate
@@ -1567,7 +1567,7 @@ export declare class TRTC {
1567
1567
  * }
1568
1568
  * await trtc.startScreenShare(config);
1569
1569
  */
1570
- /**
1570
+ /**
1571
1571
  * Start screen sharing.
1572
1572
  *
1573
1573
  * - After starting screen sharing, other users in the room will receive the {@link module:EVENT.REMOTE_VIDEO_AVAILABLE REMOTE_VIDEO_AVAILABLE} event, with streamType as {@link module:TYPE.STREAM_TYPE_SUB STREAM_TYPE_SUB}, and other users can play screen sharing through {@link TRTC#startRemoteVideo startRemoteVideo}.
@@ -1595,8 +1595,8 @@ export declare class TRTC {
1595
1595
  * await trtc.startScreenShare();
1596
1596
  * @memberof TRTC
1597
1597
  */
1598
- startScreenShare(config?: ScreenShareConfig): Promise<void>;
1599
- /**
1598
+ startScreenShare(config?: ScreenShareConfig): Promise<void>;
1599
+ /**
1600
1600
  * Update screen sharing configuration
1601
1601
  * - This interface needs to be called after {@link TRTC#startScreenShare startScreenShare()} is successful.
1602
1602
  * - This interface can be called multiple times.
@@ -1618,16 +1618,16 @@ export declare class TRTC {
1618
1618
  * await trtc.updateScreenShare({ publish:false });
1619
1619
  * @memberof TRTC
1620
1620
  */
1621
- updateScreenShare(config: UpdateScreenShareConfig): Promise<void>;
1622
- /**
1621
+ updateScreenShare(config: UpdateScreenShareConfig): Promise<void>;
1622
+ /**
1623
1623
  * Stop screen sharing.
1624
-
1624
+
1625
1625
  * @throws {@link module:ERROR_CODE.OPERATION_ABORT OPERATION_ABORT}
1626
1626
  * @example
1627
1627
  * await trtc.stopScreenShare();
1628
1628
  */
1629
- stopScreenShare(): Promise<void>;
1630
- /**
1629
+ stopScreenShare(): Promise<void>;
1630
+ /**
1631
1631
  * Play remote video
1632
1632
  *
1633
1633
  * - When to call: Call after receiving the {@link module:EVENT.REMOTE_VIDEO_AVAILABLE TRTC.on(TRTC.EVENT.REMOTE_VIDEO_AVAILABLE)} event.
@@ -1656,8 +1656,8 @@ export declare class TRTC {
1656
1656
  * })
1657
1657
  * @memberof TRTC
1658
1658
  */
1659
- startRemoteVideo(config: RemoteVideoConfig): Promise<void>;
1660
- /**
1659
+ startRemoteVideo(config: RemoteVideoConfig): Promise<void>;
1660
+ /**
1661
1661
  * Update remote video playback configuration<br>
1662
1662
  * - This method should be called after {@link TRTC#startRemoteVideo startRemoteVideo} is successful.
1663
1663
  * - This method can be called multiple times.
@@ -1688,8 +1688,8 @@ export declare class TRTC {
1688
1688
  * await trtc.updateRemoteVideo(config);
1689
1689
  * @memberof TRTC
1690
1690
  */
1691
- updateRemoteVideo(config: RemoteVideoConfig): Promise<void>;
1692
- /**
1691
+ updateRemoteVideo(config: RemoteVideoConfig): Promise<void>;
1692
+ /**
1693
1693
  * Used to stop remote video playback.<br>
1694
1694
  * @param {object} config - Remote video configuration
1695
1695
  * @param {string} config.userId - Remote user ID, '*' represents all users.
@@ -1701,8 +1701,8 @@ export declare class TRTC {
1701
1701
  * // Stop playing all remote users
1702
1702
  * await trtc.stopRemoteVideo({ userId: '*' });
1703
1703
  */
1704
- stopRemoteVideo(config: StopRemoteVideoConfig): Promise<void>;
1705
- /**
1704
+ stopRemoteVideo(config: StopRemoteVideoConfig): Promise<void>;
1705
+ /**
1706
1706
  * Mute a remote user and stop subscribing audio data from that user. Only effective for the current user, other users in the room can still hear the muted user's voice.<br>
1707
1707
  *
1708
1708
  * Note:
@@ -1721,8 +1721,8 @@ export declare class TRTC {
1721
1721
  * // Mute all remote users
1722
1722
  * await trtc.muteRemoteAudio('*', true);
1723
1723
  */
1724
- muteRemoteAudio(userId: string, mute: boolean): Promise<void>;
1725
- /**
1724
+ muteRemoteAudio(userId: string, mute: boolean): Promise<void>;
1725
+ /**
1726
1726
  * Used to control the playback volume of remote audio.<br>
1727
1727
  *
1728
1728
  * - Not supported by iOS Safari
@@ -1732,14 +1732,14 @@ export declare class TRTC {
1732
1732
  * @example
1733
1733
  * await trtc.setRemoteAudioVolume('123', 90);
1734
1734
  */
1735
- setRemoteAudioVolume(userId: string, volume: number): void;
1736
- startPlugin<T extends keyof PluginStartOptionsMap, O extends PluginStartOptionsMap[T]>(plugin: O extends undefined ? never : T, options: O): Promise<any>;
1737
- startPlugin<T extends keyof PluginStartOptionsMap, O extends PluginStartOptionsMap[T]>(plugin: O extends undefined ? T : never): Promise<any>;
1738
- updatePlugin<T extends keyof PluginUpdateOptionsMap, O extends PluginUpdateOptionsMap[T]>(plugin: O extends undefined ? never : T, options: O): Promise<any>;
1739
- updatePlugin<T extends keyof PluginUpdateOptionsMap, O extends PluginUpdateOptionsMap[T]>(plugin: O extends undefined ? T : never): Promise<any>;
1740
- stopPlugin<T extends keyof PluginStopOptionsMap, O extends PluginStopOptionsMap[T]>(plugin: O extends undefined ? never : T, options: O): Promise<any>;
1741
- stopPlugin<T extends keyof PluginStopOptionsMap, O extends PluginStopOptionsMap[T]>(plugin: O extends undefined ? T : never): Promise<any>;
1742
- /**
1735
+ setRemoteAudioVolume(userId: string, volume: number): void;
1736
+ startPlugin<T extends keyof PluginStartOptionsMap, O extends PluginStartOptionsMap[T]>(plugin: O extends undefined ? never : T, options: O): Promise<any>;
1737
+ startPlugin<T extends keyof PluginStartOptionsMap, O extends PluginStartOptionsMap[T]>(plugin: O extends undefined ? T : never): Promise<any>;
1738
+ updatePlugin<T extends keyof PluginUpdateOptionsMap, O extends PluginUpdateOptionsMap[T]>(plugin: O extends undefined ? never : T, options: O): Promise<any>;
1739
+ updatePlugin<T extends keyof PluginUpdateOptionsMap, O extends PluginUpdateOptionsMap[T]>(plugin: O extends undefined ? T : never): Promise<any>;
1740
+ stopPlugin<T extends keyof PluginStopOptionsMap, O extends PluginStopOptionsMap[T]>(plugin: O extends undefined ? never : T, options: O): Promise<any>;
1741
+ stopPlugin<T extends keyof PluginStopOptionsMap, O extends PluginStopOptionsMap[T]>(plugin: O extends undefined ? T : never): Promise<any>;
1742
+ /**
1743
1743
  * Enables or disables the volume callback.<br>
1744
1744
  *
1745
1745
  * - After enabling this function, whether someone is speaking in the room or not, the SDK will regularly throw the {@link module:EVENT.AUDIO_VOLUME TRTC.on(TRTC.EVENT.AUDIO_VOLUME)} event, which feedbacks the volume evaluation value of each user.<br>
@@ -1765,8 +1765,8 @@ export declare class TRTC {
1765
1765
  * // To turn off the volume callback, pass in an interval value less than or equal to 0
1766
1766
  * trtc.enableAudioVolumeEvaluation(-1);
1767
1767
  */
1768
- enableAudioVolumeEvaluation(interval?: number, enableInBackground?: boolean): void;
1769
- /**
1768
+ enableAudioVolumeEvaluation(interval?: number, enableInBackground?: boolean): void;
1769
+ /**
1770
1770
  * Listen to TRTC events<br><br>
1771
1771
  * For a detailed list of events, please refer to: {@link module:EVENT TRTC.EVENT}
1772
1772
  *
@@ -1779,8 +1779,8 @@ export declare class TRTC {
1779
1779
  * // REMOTE_VIDEO_AVAILABLE event handler
1780
1780
  * });
1781
1781
  */
1782
- on<T extends keyof TRTCEventTypes>(event: T, handler: (...args: TRTCEventTypes[T]) => void, context?: any): this;
1783
- /**
1782
+ on<T extends keyof TRTCEventTypes>(event: T, handler: (...args: TRTCEventTypes[T]) => void, context?: any): this;
1783
+ /**
1784
1784
  * Remove event listener<br>
1785
1785
  *
1786
1786
  * @param {string} eventName Event name. Passing in the wildcard '*' will remove all event listeners.
@@ -1798,8 +1798,8 @@ export declare class TRTC {
1798
1798
  * // Remove all event listeners
1799
1799
  * trtc.off('*');
1800
1800
  */
1801
- off<T extends keyof TRTCEventTypes>(event: T | '*', handler: T extends '*' ? never : (...args: TRTCEventTypes[T]) => void, context?: any): this;
1802
- /**
1801
+ off<T extends keyof TRTCEventTypes>(event: T | '*', handler: T extends '*' ? never : (...args: TRTCEventTypes[T]) => void, context?: any): this;
1802
+ /**
1803
1803
  * Get audio track
1804
1804
  *
1805
1805
  * @returns {MediaStreamTrack?} Audio track
@@ -1808,7 +1808,6 @@ export declare class TRTC {
1808
1808
  * @param {STREAM_TYPE_MAIN|STREAM_TYPE_SUB} [config.streamType] - stream type:
1809
1809
  * - {@link module:TYPE.STREAM_TYPE_MAIN TRTC.TYPE.STREAM_TYPE_MAIN}: Main stream (user's microphone)(default)
1810
1810
  * - {@link module:TYPE.STREAM_TYPE_SUB TRTC.TYPE.STREAM_TYPE_SUB}: Sub stream (user's screen sharing audio). Only works for local screen sharing audio because there is only one remote audioTrack, and there is no distinction between Main and Sub for remote audioTrack.
1811
- * @param {boolean} [config.processed=false] - Whether to get the processed audioTrack. The processed audioTrack is the audioTrack after the SDK processes the audio frame, such as ai-denose, gain, mix. The default value is false.
1812
1811
  * @memberof TRTC
1813
1812
  * @example
1814
1813
  * // Version before v5.4.3
@@ -1817,14 +1816,10 @@ export declare class TRTC {
1817
1816
  *
1818
1817
  * // Since v5.4.3+, you can get local screen audioTrack by passing the streamType = TRTC.STREAM_TYPE_SUB
1819
1818
  * trtc.getAudioTrack({ streamType: TRTC.STREAM_TYPE_SUB });
1820
- *
1821
- * // Since v5.8.2+, you can get the processed audioTrack by passing processed = true
1822
- * trtc.getAudioTrack({ processed: true });
1823
1819
  */
1824
- getAudioTrack(configOrUserId?: {
1820
+ getAudioTrack(configOrUserId?: {
1825
1821
  userId?: string;
1826
1822
  streamType?: TRTCStreamType;
1827
- processed?: boolean;
1828
1823
  } | string): MediaStreamTrack | null;
1829
1824
  /**
1830
1825
  * Get video track
@@ -1834,7 +1829,6 @@ export declare class TRTC {
1834
1829
  * @param {STREAM_TYPE_MAIN|STREAM_TYPE_SUB} [config.streamType] - stream type:
1835
1830
  * - {@link module:TYPE.STREAM_TYPE_MAIN TRTC.TYPE.STREAM_TYPE_MAIN}: Main stream (user's camera)(default)
1836
1831
  * - {@link module:TYPE.STREAM_TYPE_SUB TRTC.TYPE.STREAM_TYPE_SUB}: Sub stream (user's screen sharing)
1837
- * @param {boolean} [config.processed=false] - Whether to get the processed videoTrack. The processed videoTrack is the videoTrack after the SDK processes the video frame, such as visualbackground, mirror, watermark. The default value is false.
1838
1832
  * @returns {MediaStreamTrack|null} Video track
1839
1833
  * @memberof TRTC
1840
1834
  * @example
@@ -1846,13 +1840,10 @@ export declare class TRTC {
1846
1840
  * const remoteMainVideoTrack = trtc.getVideoTrack({ userId: 'test', streamType: TRTC.TYPE.STREAM_TYPE_MAIN });
1847
1841
  * // Get remote user's sub stream videoTrack
1848
1842
  * const remoteSubVideoTrack = trtc.getVideoTrack({ userId: 'test', streamType: TRTC.TYPE.STREAM_TYPE_SUB });
1849
- * // Since v5.8.2+, you can get the processed videoTrack by passing processed = true
1850
- * const processedVideoTrack = trtc.getVideoTrack({ processed: true });
1851
1843
  */
1852
- getVideoTrack(config?: {
1844
+ getVideoTrack(config?: {
1853
1845
  userId?: string;
1854
1846
  streamType?: TRTCStreamType;
1855
- processed?: boolean;
1856
1847
  }): MediaStreamTrack | null;
1857
1848
  /**
1858
1849
  * Get video snapshot <br>
@@ -1871,9 +1862,9 @@ export declare class TRTC {
1871
1862
  * trtc.getVideoSnapshot({userId: 'remote userId', streamType:TRTC.TYPE.STREAM_TYPE_MAIN})
1872
1863
  * @memberof TRTC
1873
1864
  */
1874
- getVideoSnapshot(config?: VideoFrameConfig): string;
1875
- setCurrentSpeaker(speakerId: string): void;
1876
- /**
1865
+ getVideoSnapshot(config?: VideoFrameConfig): string;
1866
+ setCurrentSpeaker(speakerId: string): void;
1867
+ /**
1877
1868
  * Send SEI Message <br>
1878
1869
  *
1879
1870
  * > The header of a video frame has a header block called SEI.
@@ -1921,7 +1912,7 @@ export declare class TRTC {
1921
1912
  * console.warn(`sei ${event.data} from ${event.userId}`);
1922
1913
  * })
1923
1914
  */
1924
- sendSEIMessage(buffer: ArrayBuffer, options?: {
1915
+ sendSEIMessage(buffer: ArrayBuffer, options?: {
1925
1916
  seiPayloadType?: number;
1926
1917
  toSubStream?: boolean;
1927
1918
  }): void;
@@ -1957,31 +1948,31 @@ export declare class TRTC {
1957
1948
  * console.log(`received custom msg from ${event.userId}, message: ${new TextDecoder().decode(event.data)}`)
1958
1949
  * })
1959
1950
  */
1960
- sendCustomMessage(message: CustomMessageData): void;
1961
- static EVENT: {
1962
- readonly ERROR: 'error';
1963
- readonly AUTOPLAY_FAILED: 'autoplay-failed';
1964
- readonly KICKED_OUT: 'kicked-out';
1965
- readonly REMOTE_USER_ENTER: 'remote-user-enter';
1966
- readonly REMOTE_USER_EXIT: 'remote-user-exit';
1967
- readonly REMOTE_AUDIO_AVAILABLE: 'remote-audio-available';
1968
- readonly REMOTE_AUDIO_UNAVAILABLE: 'remote-audio-unavailable';
1969
- readonly REMOTE_VIDEO_AVAILABLE: 'remote-video-available';
1970
- readonly REMOTE_VIDEO_UNAVAILABLE: 'remote-video-unavailable';
1971
- readonly AUDIO_VOLUME: 'audio-volume';
1972
- readonly NETWORK_QUALITY: 'network-quality';
1973
- readonly CONNECTION_STATE_CHANGED: 'connection-state-changed';
1974
- readonly AUDIO_PLAY_STATE_CHANGED: 'audio-play-state-changed';
1975
- readonly VIDEO_PLAY_STATE_CHANGED: 'video-play-state-changed';
1976
- readonly SCREEN_SHARE_STOPPED: 'screen-share-stopped';
1977
- readonly DEVICE_CHANGED: 'device-changed';
1978
- readonly PUBLISH_STATE_CHANGED: 'publish-state-changed';
1979
- readonly TRACK: 'track';
1980
- readonly STATISTICS: 'statistics';
1981
- readonly SEI_MESSAGE: 'sei-message';
1982
- readonly CUSTOM_MESSAGE: 'custom-message';
1951
+ sendCustomMessage(message: CustomMessageData): void;
1952
+ static EVENT: {
1953
+ readonly ERROR: "error";
1954
+ readonly AUTOPLAY_FAILED: "autoplay-failed";
1955
+ readonly KICKED_OUT: "kicked-out";
1956
+ readonly REMOTE_USER_ENTER: "remote-user-enter";
1957
+ readonly REMOTE_USER_EXIT: "remote-user-exit";
1958
+ readonly REMOTE_AUDIO_AVAILABLE: "remote-audio-available";
1959
+ readonly REMOTE_AUDIO_UNAVAILABLE: "remote-audio-unavailable";
1960
+ readonly REMOTE_VIDEO_AVAILABLE: "remote-video-available";
1961
+ readonly REMOTE_VIDEO_UNAVAILABLE: "remote-video-unavailable";
1962
+ readonly AUDIO_VOLUME: "audio-volume";
1963
+ readonly NETWORK_QUALITY: "network-quality";
1964
+ readonly CONNECTION_STATE_CHANGED: "connection-state-changed";
1965
+ readonly AUDIO_PLAY_STATE_CHANGED: "audio-play-state-changed";
1966
+ readonly VIDEO_PLAY_STATE_CHANGED: "video-play-state-changed";
1967
+ readonly SCREEN_SHARE_STOPPED: "screen-share-stopped";
1968
+ readonly DEVICE_CHANGED: "device-changed";
1969
+ readonly PUBLISH_STATE_CHANGED: "publish-state-changed";
1970
+ readonly TRACK: "track";
1971
+ readonly STATISTICS: "statistics";
1972
+ readonly SEI_MESSAGE: "sei-message";
1973
+ readonly CUSTOM_MESSAGE: "custom-message";
1983
1974
  };
1984
- static ERROR_CODE: {
1975
+ static ERROR_CODE: {
1985
1976
  INVALID_PARAMETER: number;
1986
1977
  INVALID_OPERATION: number;
1987
1978
  ENV_NOT_SUPPORTED: number;
@@ -1991,22 +1982,22 @@ export declare class TRTC {
1991
1982
  OPERATION_ABORT: number;
1992
1983
  UNKNOWN_ERROR: number;
1993
1984
  };
1994
- static TYPE: {
1985
+ static TYPE: {
1995
1986
  readonly SCENE_LIVE: Scene.LIVE;
1996
1987
  readonly SCENE_RTC: Scene.RTC;
1997
1988
  readonly ROLE_ANCHOR: UserRole.ANCHOR;
1998
1989
  readonly ROLE_AUDIENCE: UserRole.AUDIENCE;
1999
1990
  readonly STREAM_TYPE_MAIN: TRTCStreamType.Main;
2000
1991
  readonly STREAM_TYPE_SUB: TRTCStreamType.Sub;
2001
- readonly AUDIO_PROFILE_STANDARD: 'standard';
2002
- readonly AUDIO_PROFILE_STANDARD_STEREO: 'standard-stereo';
2003
- readonly AUDIO_PROFILE_HIGH: 'high';
2004
- readonly AUDIO_PROFILE_HIGH_STEREO: 'high-stereo';
2005
- readonly QOS_PREFERENCE_SMOOTH: 'smooth';
2006
- readonly QOS_PREFERENCE_CLEAR: 'clear';
1992
+ readonly AUDIO_PROFILE_STANDARD: "standard";
1993
+ readonly AUDIO_PROFILE_STANDARD_STEREO: "standard-stereo";
1994
+ readonly AUDIO_PROFILE_HIGH: "high";
1995
+ readonly AUDIO_PROFILE_HIGH_STEREO: "high-stereo";
1996
+ readonly QOS_PREFERENCE_SMOOTH: "smooth";
1997
+ readonly QOS_PREFERENCE_CLEAR: "clear";
2007
1998
  };
2008
- static frameWorkType: number;
2009
- /**
1999
+ static frameWorkType: number;
2000
+ /**
2010
2001
  * Set the log output level
2011
2002
  * <br>
2012
2003
  * It is recommended to set the DEBUG level during development and testing, which includes detailed prompt information.
@@ -2018,8 +2009,8 @@ export declare class TRTC {
2018
2009
  * // Output log levels above DEBUG
2019
2010
  * TRTC.setLogLevel(1);
2020
2011
  */
2021
- static setLogLevel(level: LOG_LEVEL, enableUploadLog?: boolean): void;
2022
- /**
2012
+ static setLogLevel(level: LOG_LEVEL, enableUploadLog?: boolean): void;
2013
+ /**
2023
2014
  * Check if the TRTC Web SDK is supported by the current browser
2024
2015
  *
2025
2016
  * - Reference: {@tutorial 05-info-browser}.
@@ -2046,8 +2037,8 @@ export declare class TRTC {
2046
2037
  * | checkResult.detail.isVp8EncodeSupported | boolean | Whether the current browser supports VP8 encoding for uplink |
2047
2038
  * | checkResult.detail.isVp8DecodeSupported | boolean | Whether the current browser supports VP8 decoding for downlink |
2048
2039
  */
2049
- static isSupported(): Promise<any>;
2050
- /**
2040
+ static isSupported(): Promise<any>;
2041
+ /**
2051
2042
  * Returns the list of camera devices
2052
2043
  * <br>
2053
2044
  * **Note**
@@ -2069,8 +2060,8 @@ export declare class TRTC {
2069
2060
  * }
2070
2061
  * @returns {Promise.<MediaDeviceInfo[]>} Promise returns an array of {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo|MediaDeviceInfo}
2071
2062
  */
2072
- static getCameraList(requestPermission?: boolean): Promise<MediaDeviceInfo[]>;
2073
- /**
2063
+ static getCameraList(requestPermission?: boolean): Promise<MediaDeviceInfo[]>;
2064
+ /**
2074
2065
  * Returns the list of microphone devices
2075
2066
  * <br>
2076
2067
  * **Note**
@@ -2085,19 +2076,19 @@ export declare class TRTC {
2085
2076
  * }
2086
2077
  * @returns {Promise.<MediaDeviceInfo[]>} Promise returns an array of {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo|MediaDeviceInfo}
2087
2078
  */
2088
- static getMicrophoneList(requestPermission?: boolean): Promise<MediaDeviceInfo[]>;
2089
- /**
2079
+ static getMicrophoneList(requestPermission?: boolean): Promise<MediaDeviceInfo[]>;
2080
+ /**
2090
2081
  * Returns the list of speaker devices. Only support PC browser, not support mobile browser.
2091
2082
  * <br>
2092
2083
  * @param {boolean} [requestPermission=true] `Since v5.6.3`. Whether to request permission to use the microphone. If requestPermission is true, calling this method may temporarily open the microphone to ensure that the microphone list can be normally obtained, and the SDK will automatically stop the microphone capture later.
2093
2084
  * @returns {Promise.<MediaDeviceInfo[]>} Promise returns an array of {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo|MediaDeviceInfo}
2094
2085
  */
2095
- static getSpeakerList(requestPermission?: boolean): Promise<MediaDeviceInfo[]>;
2096
- /**
2086
+ static getSpeakerList(requestPermission?: boolean): Promise<MediaDeviceInfo[]>;
2087
+ /**
2097
2088
  * Set the current speaker for audio playback
2098
2089
  *
2099
2090
  * @param {string} speakerId Speaker ID
2100
2091
  */
2101
- static setCurrentSpeaker(speakerId: string): Promise<void>;
2092
+ static setCurrentSpeaker(speakerId: string): Promise<void>;
2102
2093
  }
2103
- export default TRTC;
2094
+ export default TRTC