@byteplus/rtc 4.66.19 → 4.67.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/index.d.ts CHANGED
@@ -40,6 +40,78 @@ declare class VERTC implements IVERTC {
40
40
  }) => void;
41
41
  }
42
42
  declare const Config: SetParamInterface;
43
+ declare const RTCExceptionCodeMap: {
44
+
45
+ /**
46
+ * @brief Input video frame rate is too low
47
+ */
48
+ FRAMERATE_INPUT_TOO_LOW: number;
49
+
50
+ /**
51
+ * @brief Sent video frame rate is too low
52
+ */
53
+ FRAMERATE_SENT_TOO_LOW: number;
54
+
55
+ /**
56
+ * @brief Sent video bitrate is too low
57
+ */
58
+ SEND_VIDEO_BITRATE_TOO_LOW: number;
59
+
60
+ /**
61
+ * @brief Received video bitrate is too low
62
+ */
63
+ RECV_VIDEO_DECODE_FAILED: number;
64
+
65
+ /**
66
+ * @brief Input audio volume is too low
67
+ */
68
+ AUDIO_INPUT_LEVEL_TOO_LOW: number;
69
+
70
+ /**
71
+ * @brief Output audio volume is too low
72
+ */
73
+ AUDIO_OUTPUT_LEVEL_TOO_LOW: number;
74
+
75
+ /**
76
+ * @brief Send audio bitrate is too low
77
+ */
78
+ SEND_AUDIO_BITRATE_TOO_LOW: number;
79
+
80
+ /**
81
+ * @brief Input video frame rate is too low recovery
82
+ */
83
+ FRAMERATE_INPUT_TOO_LOW_RECOVER: number;
84
+
85
+ /**
86
+ * @brief Sent video frame rate is too low recovery
87
+ */
88
+ FRAMERATE_SENT_TOO_LOW_RECOVER: number;
89
+
90
+ /**
91
+ * @brief Send video bitrate is too low recovery
92
+ */
93
+ SEND_VIDEO_BITRATE_TOO_LOW_RECOVER: number;
94
+
95
+ /**
96
+ * @brief Received video bitrate is too low recovery
97
+ */
98
+ RECV_VIDEO_DECODE_FAILED_RECOVER: number;
99
+
100
+ /**
101
+ * @brief Input audio volume is too low recovery
102
+ */
103
+ AUDIO_INPUT_LEVEL_TOO_LOW_RECOVER: number;
104
+
105
+ /**
106
+ * @brief Output audio volume is too low recovery
107
+ */
108
+ AUDIO_OUTPUT_LEVEL_TOO_LOW_RECOVER: number;
109
+
110
+ /**
111
+ * @brief Send audio bitrate is too low recovery
112
+ */
113
+ SEND_AUDIO_BITRATE_TOO_LOW_RECOVER: number;
114
+ };
43
115
  declare const _default: VERTC;
44
116
  declare enum AudioMixingError {
45
117
 
@@ -261,6 +333,21 @@ declare enum EngineEventsTypes {
261
333
  */
262
334
  onLocalStreamStats = "onLocalStreamStats",
263
335
 
336
+ /**
337
+ * @brief Callback including the state of the local media stream
338
+ */
339
+ onLocalStatsException = "onLocalStatsException",
340
+
341
+ /**
342
+ * @brief Callback including the state of the local media stream
343
+ */
344
+ onRemoteStatsException = "onRemoteStatsException",
345
+
346
+ /**
347
+ * @brief Callback including the state of the local media stream
348
+ */
349
+ onPublicStatsException = "onPublicStatsException",
350
+
264
351
  /**
265
352
  * @brief Indication of audio volume
266
353
  */
@@ -333,7 +420,8 @@ declare enum EngineEventsTypes {
333
420
  onSubscribeRetry = "onSubscribeRetry",
334
421
  onPublishResult = "onPublishResult",
335
422
  onSubscribeResult = "onSubscribeResult",
336
- onSEIStreamUpdate = "onSEIStreamUpdate"
423
+ onSEIStreamUpdate = "onSEIStreamUpdate",
424
+ onPlayerVisibility = "onPlayerVisibility"
337
425
  }
338
426
  declare enum ErrorCode {
339
427
 
@@ -768,7 +856,7 @@ declare enum ErrorCode {
768
856
 
769
857
  /**
770
858
  * @hidden
771
- * @brief Failed to connect to the thrid-party service. Please contact the technical support.
859
+ * @brief Failed to connect to the third-party service. Please contact the technical support.
772
860
  */
773
861
  SUBTITLE_ERR_CONNECTION_ERROR = "SUBTITLE_ERR_CONNECTION_ERROR",
774
862
 
@@ -831,7 +919,15 @@ declare enum ErrorCode {
831
919
  * @brief Failed to subscribe to the WTN stream via [`startPlayWTN`](docs-104478#wtnstream-startplaywtn).
832
920
  */
833
921
  WTN_PLAY_FAILED = "WTN_PLAY_FAILED",
922
+
923
+ /**
924
+ * @brief The `RoomMode` is `ROOM_MODE_RTS_ONLY` (indicating that only RTS can be used in the room). Calling the room-external API is not allowed.
925
+ */
834
926
  NOT_ALLOWED_IN_RTS_ROOM = "NOT_ALLOWED_IN_RTS_ROOM",
927
+
928
+ /**
929
+ * @brief Calling the room-external message class API is not allowed in the RTS restricted mode.
930
+ */
835
931
  NOT_ALLOWED_IN_RESTRICTED_MODE = "NOT_ALLOWED_IN_RESTRICTED_MODE"
836
932
  }
837
933
  declare enum ExtendMediaType {
@@ -1083,7 +1179,7 @@ export declare enum AudioSelectionPriority {
1083
1179
  DEFAULT = 0,
1084
1180
 
1085
1181
  /**
1086
- * @brief Hight priority with which the stream can skip the audio selection and always be subscribable.
1182
+ * @brief High priority with which the stream can skip the audio selection and always be subscribable.
1087
1183
  */
1088
1184
  HIGH = 1
1089
1185
  }
@@ -1390,7 +1486,7 @@ export declare enum PublicInterpolationMode {
1390
1486
  }
1391
1487
 
1392
1488
  /**
1393
- * @brief Whether to inlcude audio or video in the WTN stream.
1489
+ * @brief Whether to include audio or video in the WTN stream.
1394
1490
  */
1395
1491
  export declare enum PublicStreamType {
1396
1492
 
@@ -1484,14 +1580,12 @@ export declare enum RemoteUserPriority {
1484
1580
  export declare enum RoomMode {
1485
1581
 
1486
1582
  /**
1487
- * @brief Create both the RTC room and the RTS room.
1488
- * Under this mode, [audio/video call](docs-69871) charges will still be applied even if a user enters the room and only utilizes RTS functionality, without using any audio or video functions. This is because billing starts as soon as a user enters the RTC room (at a minimum, pure audio charges will apply). For detailed billing rules, please refer to [Billing of Audio and Video Calls](docs-69871).
1583
+ * @brief Default setting. Both RTC and RTS features can be used in the room.
1489
1584
  */
1490
1585
  ROOM_MODE_RTC = 0,
1491
1586
 
1492
1587
  /**
1493
- * @brief Create only the RTS room.
1494
- * In this mode, the following interfaces cannot be called: `setUserVisibility`、`setAudioSelectionConfig`、`publishStream`、`unpublishStream`、`subscribeStream`、`unsubscribeStream`、`pauseAllSubscribedStream`、`resumeAllSubscribedStream`、`startForwardStreamToRooms`、`updateForwardStreamToRooms`、`stopForwardStreamToRooms`、`pauseForwardStreamToAllRooms`、`resumeForwardStreamToAllRooms`、`publishScreen`、`unpublishScreen`、`subscribeScreen`、`unsubscribeScreen`、`startLiveTranscoding`、`updateLiveTranscoding`、`stopLiveTranscoding`、`sendSEIMessage`、`startSubtitle`、`stopSubtitle`、`updateSubtitleConfig`.
1588
+ * @brief Only RTS features can be used in the room. In this mode, RTC-related interfaces cannot be called.
1495
1589
  */
1496
1590
  ROOM_MODE_RTS_ONLY = 1
1497
1591
  }
@@ -1624,7 +1718,7 @@ export declare enum StreamRemoveReason {
1624
1718
  STREAM_REMOVE_REASON_OTHER = 5,
1625
1719
 
1626
1720
  /**
1627
- * @brief token lose publish priviledge.
1721
+ * @brief token lose publish privilege.
1628
1722
  */
1629
1723
  STREAM_REMOVE_REASON_TOKEN_PRIVILEGE_EXPIRED = 6
1630
1724
  }
@@ -1862,6 +1956,42 @@ export declare enum VideoSourceType {
1862
1956
  VIDEO_SOURCE_TYPE_INTERNAL = 1
1863
1957
  }
1864
1958
 
1959
+ /**
1960
+ * @brief Player visibility status and reasons for invisibility.
1961
+ */
1962
+ export declare enum VisibilityStatus {
1963
+
1964
+ /**
1965
+ * @brief Player is visible.
1966
+ */
1967
+ PLAYER_VISIBLE = "visible",
1968
+
1969
+ /**
1970
+ * @brief Player is invisible due to unmounting from the DOM.
1971
+ */
1972
+ PLAYER_INVISIBLE_BY_UNMOUNT = "unmount",
1973
+
1974
+ /**
1975
+ * @brief Player is invisible due to size issues (for example, if the size is too small).
1976
+ */
1977
+ PLAYER_INVISIBLE_BY_SIZE = "size",
1978
+
1979
+ /**
1980
+ * @brief Player is invisible due to style issues. For example: `display: none`, `opacity: 0`.
1981
+ */
1982
+ PLAYER_INVISIBLE_BY_STYLE = "style",
1983
+
1984
+ /**
1985
+ * @brief Player is invisible due to position issues (for example, if the position is outside the visible area).
1986
+ */
1987
+ PLAYER_INVISIBLE_BY_POSITION = "position",
1988
+
1989
+ /**
1990
+ * @brief Player is invisible due to being covered.
1991
+ */
1992
+ PLAYER_INVISIBLE_BY_COVERED = "covered"
1993
+ }
1994
+
1865
1995
  /**
1866
1996
  * @brief Events related to playing WTN streams.
1867
1997
  */
@@ -2196,7 +2326,9 @@ export declare enum WTNStreamEventsTypes {
2196
2326
  onWTNRemoteVideoStats = "onWTNRemoteVideoStats",
2197
2327
  onWTNRemoteAudioStats = "onWTNRemoteAudioStats",
2198
2328
  onWTNFirstRemoteVideoFrameDecoded = "onWTNFirstRemoteVideoFrameDecoded",
2199
- onWTNSEIMessageReceived = "onWTNSEIMessageReceived"
2329
+ onWTNSEIMessageReceived = "onWTNSEIMessageReceived",
2330
+ onWTNRemoteStatsException = "onWTNRemoteStatsException",
2331
+ onWTNLocalStatsException = "onWTNLocalStatsException"
2200
2332
  }
2201
2333
 
2202
2334
  /**
@@ -2317,7 +2449,7 @@ export interface AudioPropertiesInfo {
2317
2449
 
2318
2450
  /**
2319
2451
  * @brief linear volume. The value is in linear relation to the original volume. The higher the value, the higher the volume. The range is [0,255]. <br>
2320
- * - [0, 25]: Nearly silent <br>
2452
+ * - [0, 25]: Silence <br>
2321
2453
  * - [26, 75]: Low volume <br>
2322
2454
  * - [76, 204]: Medium volume <br>
2323
2455
  * - [205, 255]: High volume <br>
@@ -2326,7 +2458,7 @@ export interface AudioPropertiesInfo {
2326
2458
 
2327
2459
  /**
2328
2460
  * @brief non-linear volume in dB. The value is in proportion to the log value of the original volume. You can use the value to recognize the Active Speaker in the room. The range is [-127, 0]. <br>
2329
- * - [-127, -60]: Nearly silent
2461
+ * - [-127, -60]: Silence <br>
2330
2462
  * - [-59, -40]: Low volume <br>
2331
2463
  * - [-39, -20]: Medium volume <br>
2332
2464
  * - [-19, 0]: High volume <br>
@@ -2461,19 +2593,17 @@ export interface CoreConfigType {
2461
2593
  }
2462
2594
 
2463
2595
  /**
2464
- * @brief Information of an audio or video media device (such as camera, microphone, speaker) and its connection state.
2596
+ * @brief Information and state of a media device.
2465
2597
  */
2466
2598
  export interface DeviceInfo {
2467
2599
 
2468
2600
  /**
2469
- * @brief Device information, including device ID, type, etc. For details, see [MediaDeviceInfo](https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo).
2601
+ * @brief Information of a media device. See [MediaDeviceInfo](https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo).
2470
2602
  */
2471
2603
  mediaDeviceInfo: MediaDeviceInfo;
2472
2604
 
2473
2605
  /**
2474
- * @brief Device state:
2475
- * - active: The device is connected.
2476
- * - inactive: The device is disconnected.
2606
+ * @brief Device state.
2477
2607
  */
2478
2608
  deviceState: "active" | "inactive";
2479
2609
  }
@@ -2914,18 +3044,16 @@ export interface IEngineEvents {
2914
3044
  [EngineEventsTypes.onRemoteAudioFirstFrame]: (event: onAudioFirstFrameDecodedEvent) => void;
2915
3045
 
2916
3046
  /**
2917
- * @brief Triggered when the connection state of a video device (i.e., camera) changes, such as when a device is disconnected/connected due to plugging or unplugging.<br/>
2918
- * > You need to obtain device permissions first (which can be acquired through [enableDevices](104478#enabledevices)) to receive this callback.
2919
- * @param event Information (such as device ID and type) and connection state of the device.
3047
+ * @brief Event of video device state changing.
3048
+ * @param event Information and state of a media device.
2920
3049
  * @group Device Management
2921
3050
  * @order 60
2922
3051
  */
2923
3052
  [EngineEventsTypes.onVideoDeviceStateChanged]: (event: DeviceInfo) => void;
2924
3053
 
2925
3054
  /**
2926
- * @brief Triggered when the connection state of an audio media device (i.e., microphone, speaker) changes, such as when a device is disconnected/connected due to plugging or unplugging.<br/>
2927
- * > You need to obtain device permissions first (which can be acquired through [enableDevices](104478#enabledevices)) to receive this callback.
2928
- * @param event Information (such as device ID and type) and connection state of the device.
3055
+ * @brief Event of audio device state changing.
3056
+ * @param event Information and state of a media device.
2929
3057
  * @group Device Management
2930
3058
  * @order 50
2931
3059
  */
@@ -3059,6 +3187,18 @@ export interface IEngineEvents {
3059
3187
  */
3060
3188
  [EngineEventsTypes.onPublicStreamStats]: (stats: PublicStreamStats) => void;
3061
3189
 
3190
+ /**
3191
+ * @brief SDK detects an abnormal event, which is usually caused by external factors such as network or capture/playback devices. The abnormal event is not an error, but it usually causes a problem with the call quality. If the problem is resolved, you will also receive this callback.
3192
+ * @param exception
3193
+ */
3194
+ [EngineEventsTypes.onLocalStatsException]: (exception: LocalStatsException) => void;
3195
+
3196
+ /**
3197
+ * @brief SDK detects an abnormal event, which is usually caused by external factors such as network or capture/playback devices. The abnormal event is not an error, but it usually causes a problem with the call quality. If the problem is resolved, you will also receive this callback.
3198
+ * @param exception
3199
+ */
3200
+ [EngineEventsTypes.onRemoteStatsException]: (exception: RemoteStatsException) => void;
3201
+
3062
3202
  /**
3063
3203
  * @hidden
3064
3204
  * @deprecated since 4.42, use onLocalAudioPropertiesReport and onRemoteAudioPropertiesReport instead.
@@ -3196,7 +3336,7 @@ export interface IEngineEvents {
3196
3336
  userId: string;
3197
3337
 
3198
3338
  /**
3199
- * @brief Wether it is a screen-sharing stream
3339
+ * @brief Whether it is a screen-sharing stream
3200
3340
  */
3201
3341
  isScreen: boolean;
3202
3342
 
@@ -3215,7 +3355,7 @@ export interface IEngineEvents {
3215
3355
  [EngineEventsTypes.onAutoPublishResult]: (event: {
3216
3356
 
3217
3357
  /**
3218
- * @brief Wether it is a screen-sharing stream
3358
+ * @brief Whether it is a screen-sharing stream
3219
3359
  */
3220
3360
  isScreen: boolean;
3221
3361
 
@@ -3612,6 +3752,14 @@ export interface IEngineEvents {
3612
3752
  isAutoSubscribe: boolean;
3613
3753
  errorCode?: ErrorCode;
3614
3754
  }) => void;
3755
+
3756
+ /**
3757
+ * @brief Event of player visibility change, triggered every 30 seconds to notify users of changes in the visibility status of the player.
3758
+ * @param e Array of player visibility information, including player ID, user ID, and visibility status.
3759
+ * @group Video Management
3760
+ * @order 80
3761
+ */
3762
+ [EngineEventsTypes.onPlayerVisibility]: (e: PlayerVisibility[]) => void;
3615
3763
  }
3616
3764
  export interface IJoinRoomConfig {
3617
3765
  useTcpAfterJoinTimeout: boolean;
@@ -3626,7 +3774,6 @@ export interface IPCKillSwitch {
3626
3774
  sld_fmtp_sps_add: boolean;
3627
3775
  sld_fmtp_bitrate_add: boolean;
3628
3776
  sld_fmtp_opus_add: boolean;
3629
- sld_iceoption_renomination: boolean;
3630
3777
  }
3631
3778
 
3632
3779
  /**
@@ -4038,12 +4185,12 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
4038
4185
  * @param userId The user ID. The empty value indicates the local stream.
4039
4186
  * @return If the specified stream does not exist, the volume values are `0`.
4040
4187
  * + linear volume. The value is in linear relation to the original volume. The higher the value, the higher the volume. The range is [0,255]. <br>
4041
- * &ensp; - \[0, 25]: Nearly silent
4188
+ * &ensp; - \[0, 25]: Silence
4042
4189
  * &ensp; - \[26, 75]: Low volume
4043
4190
  * &ensp; - \[76, 204]: Medium volume
4044
4191
  * &ensp; - \[205, 255]: High volume
4045
4192
  * + non-linear volume in dB. The value is in proportion to the log value of the original volume. You can use the value to recognize the Active Speaker in the room. The range is [-127, 0].
4046
- * &ensp; - \[-127, -60]: Nearly silent
4193
+ * &ensp; - \[-127, -60]: Silence
4047
4194
  * &ensp; - \[-59, -40]: Low volume
4048
4195
  * &ensp; - \[-39, -20]: Medium volume
4049
4196
  * &ensp; - \[-19, 0]: High volume
@@ -4161,7 +4308,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
4161
4308
  * &ensp; - SEI messages are only supported with H.264 encoding and are available only in browsers with Chromium 86+, Firefox 117+, or Safari 15.4+.
4162
4309
  * &ensp; - Android devices do not support sending SEI data in voice call scenarios.
4163
4310
  * &ensp; - SEI messages cannot be used on iOS devices.
4164
- * + In voice call scenarios, you still need to publish and subscribe to video streams, instead of audio streams. The subsciber can enable automatic subscribing to video streams when entering the room, or call [subscribeStream](#subscribestream) with the media stream type `AUDIO_AND_VIDEO`.
4311
+ * + In voice call scenarios, you still need to publish and subscribe to video streams, instead of audio streams. The subscriber can enable automatic subscribing to video streams when entering the room, or call [subscribeStream](#subscribestream) with the media stream type `AUDIO_AND_VIDEO`.
4165
4312
  * + In voice call scenarios, if no SEI data is sent within 1 minute after calling this interface, the SDK will automatically cancel the publication of the black frame video stream.
4166
4313
  * + After the message is sent successfully, the remote end will receive [onSEIMessageReceived](docs-104479#onseimessagereceived).
4167
4314
  * + In voice call scenarios, the sending status of the black frame video stream will be notified to remote users through the [onSEIStreamUpdate](docs-104479#onseistreamupdate) event.
@@ -4402,7 +4549,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
4402
4549
  getWTNStreamManager: () => IWTNStream;
4403
4550
 
4404
4551
  /**
4405
- * @brief > Available since v4.66.<br>
4552
+ * @brief > Available since v4.66.
4406
4553
  * Get the call ID. Call this method after joining a room.
4407
4554
  * After creating a room, a `callId` is generated to identify the call for this room.
4408
4555
  * @return The call ID (`callId`) of the room.
@@ -4651,7 +4798,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
4651
4798
  /**
4652
4799
  * @brief Set the placeholder image during local video capture pause
4653
4800
  * @param index
4654
- * @param filePath Image path in Http protocal; or Blob object.
4801
+ * @param filePath Image path in HTTP protocol; or Blob object.
4655
4802
  * The format of the image can be: JPG, PNG, or BMP.
4656
4803
  * When the ratio of the image is not the same as the video encoder configuration, the image will be resized with fixed ratio until the width and the height are no more than that of the encoder configuration.
4657
4804
  * @notes + Only available to Chrome browser on Mac
@@ -4859,7 +5006,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
4859
5006
  * @brief Turns on subtitles.
4860
5007
  * After calling this method, you can choose between the recognition and translation modes based on your needs. In the recognition mode, the speech of the speaker in the room will be recognized and converted into captions. In the translation mode, the transcribed text will be translated.You will receive the [onSubtitleMessageReceived](docs-104479#onsubtitlemessagereceived) callback to informs you of related information about subtitles.
4861
5008
  * After calling this method, you will receive the [onSubtitleStateChanged](docs-104479#onsubtitlestatechanged) to inform you of whether subtitles are on.
4862
- * @param config Subtitle configrations.
5009
+ * @param config Subtitle configurations.
4863
5010
  * @return `SUBTITLE_ALREADY_ON`: Subtitle is already turned on.
4864
5011
  * @notes + You must call this method after joining the room.
4865
5012
  * + You can set your source language to Chinese by calling `joinRoom` and importing a json formatted string `"source_language": "zh"` through the parameter of extraInfo, to English by importing `"source_language": "en"` , and to Japanese by importing `"source_language": "ja"`. The language of your browser will be automatically set as the source language if you don't set it. If the language of your browser is not Chinese, English or Japanese, SDK will set Chinese as the source language.
@@ -4984,7 +5131,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
4984
5131
  * `UNEXPECTED_INVOKE_FORWARD_STREAM`: Unexpected operation. Triggered if the timing of API calls related to forwarding media streams across rooms is incorrect. Please refer to the documentation of each API to confirm the correct order of API calls.
4985
5132
  * @notes + Users in the former target rooms will receive [onUserUnpublishStream]({{callback}}#EngineEvents.onUserUnpublishStream)/[onUserUnpublishScreen]({{callback}}#EngineEvents.onUserUnpublishScreen) and [onUserLeave]({{callback}}#EngineEvents.onUserLeave).
4986
5133
  * + Call [updateForwardStreamToRooms]({{api}}#RTCEngine.updateForwardStreamToRooms) to stop forwarding media stream to specific rooms.
4987
- * + Call [pauseForwardStreamToAllRooms]({{api}}#RTCEngine.pauseForwardStreamToAllRooms) and [resumeForwardStreamToAllRooms]({{api}}#RTCEngine.resumeForwardStreamToAllRooms) to pause and resume fowarding media stream to all rooms.
5134
+ * + Call [pauseForwardStreamToAllRooms]({{api}}#RTCEngine.pauseForwardStreamToAllRooms) and [resumeForwardStreamToAllRooms]({{api}}#RTCEngine.resumeForwardStreamToAllRooms) to pause and resume forwarding media stream to all rooms.
4988
5135
  * @group Audio & Video Transport
4989
5136
  * @order 42
4990
5137
  */
@@ -5101,6 +5248,29 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
5101
5248
  * @order 80
5102
5249
  */
5103
5250
  setEarMonitorVolume: (streamIndex: StreamIndex, volume: number) => void;
5251
+
5252
+ /**
5253
+ * @brief > Available since V4.67 <br>
5254
+ * Get the visibility state of local video player and reasons for invisibility.
5255
+ * @param streamIndex Stream index
5256
+ * @param playerId Optional parameter, player ID.
5257
+ * @return Player visibility state.
5258
+ * If the corresponding player does not exist, return `undefined`.
5259
+ * @group Video Management
5260
+ */
5261
+ getLocalVideoPlayerVisibility: (streamIndex: StreamIndex, playerId?: string) => PlayerVisibility | undefined;
5262
+
5263
+ /**
5264
+ * @brief > Available since V4.67. <br>
5265
+ * Gets the visibility state of remote video player and reasons for invisibility.
5266
+ * @param userId User ID.
5267
+ * @param streamIndex Stream index.
5268
+ * @param playerId Optional parameter, player ID.
5269
+ * @return Player visibility state.
5270
+ * If the corresponding player does not exist, return `undefined`.
5271
+ * @group Video Management
5272
+ */
5273
+ getRemotePlayerVisibility: (userId: string, streamIndex: StreamIndex, playerId?: string) => PlayerVisibility | undefined;
5104
5274
  }
5105
5275
 
5106
5276
  /**
@@ -5328,7 +5498,7 @@ export interface IWTNStream extends EnhancedEventEmitter<IWTNStreamEvents> {
5328
5498
  * @return You will also receive the [onWTNPushStateChanged](docs-104479#wtnstreamevents-onwtnpushstatechanged) callback.
5329
5499
  * @group WTN stream
5330
5500
  * @order 14
5331
- */
5501
+ */
5332
5502
  muteWTNLocalAudio: (streamId: string, mute: boolean) => Promise<void>;
5333
5503
 
5334
5504
  /**
@@ -5341,24 +5511,24 @@ export interface IWTNStream extends EnhancedEventEmitter<IWTNStreamEvents> {
5341
5511
  * @return You will also receive the [onWTNPushStateChanged](docs-104479#wtnstreamevents-onwtnpushstatechanged) callback.
5342
5512
  * @group WTN stream
5343
5513
  * @order 13
5344
- */
5514
+ */
5345
5515
  muteWTNLocalVideo: (streamId: string, mute: boolean) => Promise<void>;
5346
5516
 
5347
5517
  /**
5348
- * @valid since 4.65
5349
- * @brief Sends SEI via a WTN stream.
5350
- * @param streamId The WTN stream's ID. The local user has published the WTN stream via [startPushWTN](docs-104478#wtnstream-startpushwtn).
5351
- * @param sei SEI message.
5352
- * @param repeatCount The number of times the SEI message is sent. The value range is [0, max{29, %{video frame rate}-1}]. The recommended range is [2,4]. <br>
5353
- * After calling this interface, the SEI data will be added to the consecutive `repeat_count+1` video frames starting from the current video frame.
5354
- * @note
5355
- * - The number of SEI messages sent per second should not exceed the current video frame rate.
5356
- * - The video frame only carries SEI data received within the previous 2s.
5357
- * - After the message is successfully sent, the remote will receive the [onWTNSEIMessageReceived](docs-104479#wtnstreamevents-onwtnseimessagereceived) callback.
5358
- * - If the call fails, neither the local nor the remote will receive the callback.
5359
- * @group WTN stream
5360
- * @order 37
5361
- */
5518
+ * @valid since 4.65
5519
+ * @brief Sends SEI via a WTN stream.
5520
+ * @param streamId The WTN stream's ID. The local user has published the WTN stream via [startPushWTN](docs-104478#wtnstream-startpushwtn).
5521
+ * @param sei SEI message.
5522
+ * @param repeatCount The number of times the SEI message is sent. The value range is [0, max{29, %{video frame rate}-1}]. The recommended range is [2,4]. <br>
5523
+ * After calling this interface, the SEI data will be added to the consecutive `repeat_count+1` video frames starting from the current video frame.
5524
+ * @note
5525
+ * - The number of SEI messages sent per second should not exceed the current video frame rate.
5526
+ * - The video frame only carries SEI data received within the previous 2s.
5527
+ * - After the message is successfully sent, the remote will receive the [onWTNSEIMessageReceived](docs-104479#wtnstreamevents-onwtnseimessagereceived) callback.
5528
+ * - If the call fails, neither the local nor the remote will receive the callback.
5529
+ * @group WTN stream
5530
+ * @order 37
5531
+ */
5362
5532
  sendWTNSEIMessage: (streamId: string, sei: Uint8Array, repeatCount: number) => void;
5363
5533
 
5364
5534
  /**
@@ -5444,6 +5614,16 @@ export interface IWTNStream extends EnhancedEventEmitter<IWTNStreamEvents> {
5444
5614
  * @order 26
5445
5615
  */
5446
5616
  setWTNRemoteAudioPlaybackVolume: (streamId: string, volume: number) => void;
5617
+
5618
+ /**
5619
+ * @brief Available since v4.67.<br>
5620
+ * Gets the visibility status of the specified WTN stream's video player.
5621
+ * @param streamId The WTN stream's ID.
5622
+ * @return Returns the visibility status of the video player, or `undefined` if the player does not exist.
5623
+ * @group WTN stream
5624
+ * @order 27
5625
+ */
5626
+ getWTNVideoPlayerVisibility: (streamId: string) => PlayerVisibility | undefined;
5447
5627
  }
5448
5628
 
5449
5629
  /**
@@ -5527,6 +5707,22 @@ export interface IWTNStreamEvents {
5527
5707
  * @order 40
5528
5708
  */
5529
5709
  [WTNStreamEventsTypes.onWTNSEIMessageReceived]: (event: onWTNSEIMessageReceivedEvent) => void;
5710
+
5711
+ /**
5712
+ * @brief Exception event callback of local WTN media stream.
5713
+ * @param event
5714
+ * @group WTN stream
5715
+ * @order 41
5716
+ */
5717
+ [WTNStreamEventsTypes.onWTNLocalStatsException]: (event: onWTNLocalStatsExceptionEvent) => void;
5718
+
5719
+ /**
5720
+ * @brief Exception event callback of remote WTN media stream.
5721
+ * @param event
5722
+ * @group WTN stream
5723
+ * @order 42
5724
+ */
5725
+ [WTNStreamEventsTypes.onWTNRemoteStatsException]: (event: onWTNRemoteStatsExceptionEvent) => void;
5530
5726
  }
5531
5727
 
5532
5728
  /**
@@ -5738,11 +5934,6 @@ export interface LiveTranscodeVideoConfig {
5738
5934
  */
5739
5935
  gop: number;
5740
5936
 
5741
- /**
5742
- * @hidden
5743
- * @brief Whether to push streams with low latency. The default value is `true`.
5744
- */
5745
-
5746
5937
  /**
5747
5938
  * @brief The bitrate (Kbps) in range of [1, 10000]. The default value is self-adaptive.
5748
5939
  */
@@ -5824,6 +6015,27 @@ export interface LocalAudioStats {
5824
6015
  sentSampleRate?: number;
5825
6016
  }
5826
6017
 
6018
+ /**
6019
+ * @brief Exception of local media stream information
6020
+ */
6021
+ export interface LocalStatsException {
6022
+
6023
+ /**
6024
+ * @brief Exception of local media stream information
6025
+ */
6026
+ exception: keyof typeof RTCExceptionCodeMap;
6027
+
6028
+ /**
6029
+ * @brief Exception code of local media stream
6030
+ */
6031
+ code: typeof RTCExceptionCodeMap[keyof typeof RTCExceptionCodeMap];
6032
+
6033
+ /**
6034
+ * @brief Whether it is a screen-sharing stream: true-screen stream, false-main stream
6035
+ */
6036
+ isScreen: boolean;
6037
+ }
6038
+
5827
6039
  /**
5828
6040
  * State of the local media stream
5829
6041
  */
@@ -6051,6 +6263,48 @@ export interface PlayerEvent {
6051
6263
  playerId?: string;
6052
6264
  }
6053
6265
 
6266
+ /**
6267
+ * @brief Player visibility status and related information (e.g., user ID, media type, stream index, etc.).
6268
+ */
6269
+ export interface PlayerVisibility {
6270
+
6271
+ /**
6272
+ * @brief Player descriptor information, which contains identification information like user ID, media type, stream index.
6273
+ */
6274
+ descriptor: {
6275
+
6276
+ /**
6277
+ * @brief User ID that identifies the publisher of the stream.
6278
+ */
6279
+ userId?: string;
6280
+
6281
+ /**
6282
+ * @brief Media type, currently only supports video type.
6283
+ */
6284
+ mediaType: MediaType.VIDEO;
6285
+
6286
+ /**
6287
+ * @brief Stream index, used to distinguish between main stream and screen sharing stream.
6288
+ */
6289
+ streamIndex?: StreamIndex;
6290
+
6291
+ /**
6292
+ * @brief Stream ID that uniquely identifies a media stream.
6293
+ */
6294
+ streamId?: string;
6295
+
6296
+ /**
6297
+ * @brief Player ID that uniquely identifies a player instance.
6298
+ */
6299
+ playerId?: string;
6300
+ };
6301
+
6302
+ /**
6303
+ * @brief Array of player visibility statuses, which contains all current visibility statuses of the player.
6304
+ */
6305
+ status: VisibilityStatus[];
6306
+ }
6307
+
6054
6308
  /**
6055
6309
  * @brief Event related to decoding or rendering the first video frame of the public stream.
6056
6310
  */
@@ -6160,10 +6414,6 @@ export interface PublicStreamSEIMessageEvent {
6160
6414
  sei: Uint8Array;
6161
6415
  }
6162
6416
 
6163
- /**
6164
- * @brief Subscription configuration of video streams
6165
- */
6166
-
6167
6417
  /**
6168
6418
  * @brief Stream property.
6169
6419
  */
@@ -6198,7 +6448,7 @@ export interface RTCStream {
6198
6448
 
6199
6449
  /**
6200
6450
  * @hidden
6201
- * @brief Subtitle configrations.
6451
+ * @brief Subtitle configurations.
6202
6452
  */
6203
6453
  export interface RTCSubtitleConfig {
6204
6454
 
@@ -6332,6 +6582,32 @@ export interface RemoteAudioStats {
6332
6582
  decDuration?: number;
6333
6583
  }
6334
6584
 
6585
+ /**
6586
+ * @brief Exception of remote media stream information
6587
+ */
6588
+ export interface RemoteStatsException {
6589
+
6590
+ /**
6591
+ * @brief The ID of the remote user that occurred an exception
6592
+ */
6593
+ userId: string;
6594
+
6595
+ /**
6596
+ * @brief Exception of remote media stream information
6597
+ */
6598
+ exception: keyof typeof RTCExceptionCodeMap;
6599
+
6600
+ /**
6601
+ * @brief Exception code of remote media stream
6602
+ */
6603
+ code: typeof RTCExceptionCodeMap[keyof typeof RTCExceptionCodeMap];
6604
+
6605
+ /**
6606
+ * @brief Whether it is a screen-sharing stream: true-screen stream, false-main stream
6607
+ */
6608
+ isScreen: boolean;
6609
+ }
6610
+
6335
6611
  /**
6336
6612
  * @brief Information of the remote stream
6337
6613
  */
@@ -6622,7 +6898,7 @@ export interface RoomConfig {
6622
6898
  remoteVideoConfig?: RemoteVideoConfig;
6623
6899
 
6624
6900
  /**
6625
- * @brief Room creation mode. Supports creating both RTC and RTS rooms (default) or only RTS rooms.
6901
+ * @brief Room creation mode. You can create a room that supports both RTC and RTS functions, or a room that only supports RTS functions.
6626
6902
  */
6627
6903
  roomMode?: RoomMode;
6628
6904
  }
@@ -6772,7 +7048,6 @@ export interface SetParamInterface {
6772
7048
  ENABLE_STANDARD_HANDLER: boolean;
6773
7049
  ENABLE_PLAY_AFTER_CLICK: boolean;
6774
7050
  PC_KILLSWITCH: Partial<IPCKillSwitch>;
6775
- AUTOPLAY_WORKAROUND: boolean;
6776
7051
  }
6777
7052
 
6778
7053
  /**
@@ -7043,6 +7318,7 @@ export interface VideoEncoderConfig {
7043
7318
  contentHint?: "text" | "motion" | "detail";
7044
7319
 
7045
7320
  /**
7321
+ * @hidden for internal use only
7046
7322
  * @brief The preferred codec for the video stream. The default value is `'auto'`, no preference. By default, the SDK will automatically match the best codec based on the current video resolution and device performance.
7047
7323
  */
7048
7324
  preferCodecName?: VideoCodecType;
@@ -7349,6 +7625,27 @@ export interface onWTNFirstRemoteVideoFrameDecodedEvent {
7349
7625
  streamId: string;
7350
7626
  }
7351
7627
 
7628
+ /**
7629
+ * @brief Exception event callback of local WTN media stream.
7630
+ */
7631
+ export interface onWTNLocalStatsExceptionEvent {
7632
+
7633
+ /**
7634
+ * @brief Exception of local WTN media stream information.
7635
+ */
7636
+ exception: keyof typeof RTCExceptionCodeMap;
7637
+
7638
+ /**
7639
+ * @brief Exception code of local WTN media stream.
7640
+ */
7641
+ code: typeof RTCExceptionCodeMap[keyof typeof RTCExceptionCodeMap];
7642
+
7643
+ /**
7644
+ * @brief ID of the local WTN media stream.
7645
+ */
7646
+ streamId: string;
7647
+ }
7648
+
7352
7649
  /**
7353
7650
  * @brief The state of the WTN stream playing.
7354
7651
  */
@@ -7448,6 +7745,27 @@ export interface onWTNRemoteAudioStatsEvent {
7448
7745
  audioStats: RemoteAudioStats;
7449
7746
  }
7450
7747
 
7748
+ /**
7749
+ * @brief Exception event callback of remote WTN media stream.
7750
+ */
7751
+ export interface onWTNRemoteStatsExceptionEvent {
7752
+
7753
+ /**
7754
+ * @brief Exception of remote WTN media stream information.
7755
+ */
7756
+ exception: keyof typeof RTCExceptionCodeMap;
7757
+
7758
+ /**
7759
+ * @brief Exception code of remote WTN media stream.
7760
+ */
7761
+ code: typeof RTCExceptionCodeMap[keyof typeof RTCExceptionCodeMap];
7762
+
7763
+ /**
7764
+ * @brief ID of the remote WTN media stream.
7765
+ */
7766
+ streamId: string;
7767
+ }
7768
+
7451
7769
  /**
7452
7770
  * @brief The state of the WTN stream video changed.
7453
7771
  */