@byteplus/rtc 4.66.22 → 4.67.1
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/extension-ainr/index.js +3 -3
- package/extension-ainr/index.umd.js +2 -2
- package/extension-beauty/index.js +2 -2
- package/extension-beauty/index.umd.js +2 -2
- package/index.d.ts +382 -62
- package/index.esm.min.js +2 -2
- package/index.min.js +2 -2
- package/package.json +1 -1
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
1721
|
+
* @brief token lose publish privilege.
|
|
1628
1722
|
*/
|
|
1629
1723
|
STREAM_REMOVE_REASON_TOKEN_PRIVILEGE_EXPIRED = 6
|
|
1630
1724
|
}
|
|
@@ -1795,10 +1889,11 @@ export declare enum VideoCodecType {
|
|
|
1795
1889
|
* @brief VP8
|
|
1796
1890
|
*/
|
|
1797
1891
|
VP8 = "vp8",
|
|
1798
|
-
|
|
1799
|
-
|
|
1892
|
+
|
|
1893
|
+
/**
|
|
1894
|
+
* @brief H265
|
|
1800
1895
|
*/
|
|
1801
|
-
|
|
1896
|
+
H265 = "h265"
|
|
1802
1897
|
}
|
|
1803
1898
|
|
|
1804
1899
|
/**
|
|
@@ -1862,6 +1957,42 @@ export declare enum VideoSourceType {
|
|
|
1862
1957
|
VIDEO_SOURCE_TYPE_INTERNAL = 1
|
|
1863
1958
|
}
|
|
1864
1959
|
|
|
1960
|
+
/**
|
|
1961
|
+
* @brief Player visibility status and reasons for invisibility.
|
|
1962
|
+
*/
|
|
1963
|
+
export declare enum VisibilityStatus {
|
|
1964
|
+
|
|
1965
|
+
/**
|
|
1966
|
+
* @brief Player is visible.
|
|
1967
|
+
*/
|
|
1968
|
+
PLAYER_VISIBLE = "visible",
|
|
1969
|
+
|
|
1970
|
+
/**
|
|
1971
|
+
* @brief Player is invisible due to unmounting from the DOM.
|
|
1972
|
+
*/
|
|
1973
|
+
PLAYER_INVISIBLE_BY_UNMOUNT = "unmount",
|
|
1974
|
+
|
|
1975
|
+
/**
|
|
1976
|
+
* @brief Player is invisible due to size issues (for example, if the size is too small).
|
|
1977
|
+
*/
|
|
1978
|
+
PLAYER_INVISIBLE_BY_SIZE = "size",
|
|
1979
|
+
|
|
1980
|
+
/**
|
|
1981
|
+
* @brief Player is invisible due to style issues. For example: `display: none`, `opacity: 0`.
|
|
1982
|
+
*/
|
|
1983
|
+
PLAYER_INVISIBLE_BY_STYLE = "style",
|
|
1984
|
+
|
|
1985
|
+
/**
|
|
1986
|
+
* @brief Player is invisible due to position issues (for example, if the position is outside the visible area).
|
|
1987
|
+
*/
|
|
1988
|
+
PLAYER_INVISIBLE_BY_POSITION = "position",
|
|
1989
|
+
|
|
1990
|
+
/**
|
|
1991
|
+
* @brief Player is invisible due to being covered.
|
|
1992
|
+
*/
|
|
1993
|
+
PLAYER_INVISIBLE_BY_COVERED = "covered"
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1865
1996
|
/**
|
|
1866
1997
|
* @brief Events related to playing WTN streams.
|
|
1867
1998
|
*/
|
|
@@ -2196,7 +2327,9 @@ export declare enum WTNStreamEventsTypes {
|
|
|
2196
2327
|
onWTNRemoteVideoStats = "onWTNRemoteVideoStats",
|
|
2197
2328
|
onWTNRemoteAudioStats = "onWTNRemoteAudioStats",
|
|
2198
2329
|
onWTNFirstRemoteVideoFrameDecoded = "onWTNFirstRemoteVideoFrameDecoded",
|
|
2199
|
-
onWTNSEIMessageReceived = "onWTNSEIMessageReceived"
|
|
2330
|
+
onWTNSEIMessageReceived = "onWTNSEIMessageReceived",
|
|
2331
|
+
onWTNRemoteStatsException = "onWTNRemoteStatsException",
|
|
2332
|
+
onWTNLocalStatsException = "onWTNLocalStatsException"
|
|
2200
2333
|
}
|
|
2201
2334
|
|
|
2202
2335
|
/**
|
|
@@ -2317,7 +2450,7 @@ export interface AudioPropertiesInfo {
|
|
|
2317
2450
|
|
|
2318
2451
|
/**
|
|
2319
2452
|
* @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]:
|
|
2453
|
+
* - [0, 25]: Silence <br>
|
|
2321
2454
|
* - [26, 75]: Low volume <br>
|
|
2322
2455
|
* - [76, 204]: Medium volume <br>
|
|
2323
2456
|
* - [205, 255]: High volume <br>
|
|
@@ -2326,7 +2459,7 @@ export interface AudioPropertiesInfo {
|
|
|
2326
2459
|
|
|
2327
2460
|
/**
|
|
2328
2461
|
* @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]:
|
|
2462
|
+
* - [-127, -60]: Silence <br>
|
|
2330
2463
|
* - [-59, -40]: Low volume <br>
|
|
2331
2464
|
* - [-39, -20]: Medium volume <br>
|
|
2332
2465
|
* - [-19, 0]: High volume <br>
|
|
@@ -2461,19 +2594,17 @@ export interface CoreConfigType {
|
|
|
2461
2594
|
}
|
|
2462
2595
|
|
|
2463
2596
|
/**
|
|
2464
|
-
* @brief Information
|
|
2597
|
+
* @brief Information and state of a media device.
|
|
2465
2598
|
*/
|
|
2466
2599
|
export interface DeviceInfo {
|
|
2467
2600
|
|
|
2468
2601
|
/**
|
|
2469
|
-
* @brief
|
|
2602
|
+
* @brief Information of a media device. See [MediaDeviceInfo](https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo).
|
|
2470
2603
|
*/
|
|
2471
2604
|
mediaDeviceInfo: MediaDeviceInfo;
|
|
2472
2605
|
|
|
2473
2606
|
/**
|
|
2474
|
-
* @brief Device state
|
|
2475
|
-
* - active: The device is connected.
|
|
2476
|
-
* - inactive: The device is disconnected.
|
|
2607
|
+
* @brief Device state.
|
|
2477
2608
|
*/
|
|
2478
2609
|
deviceState: "active" | "inactive";
|
|
2479
2610
|
}
|
|
@@ -2914,18 +3045,16 @@ export interface IEngineEvents {
|
|
|
2914
3045
|
[EngineEventsTypes.onRemoteAudioFirstFrame]: (event: onAudioFirstFrameDecodedEvent) => void;
|
|
2915
3046
|
|
|
2916
3047
|
/**
|
|
2917
|
-
* @brief
|
|
2918
|
-
*
|
|
2919
|
-
* @param event Information (such as device ID and type) and connection state of the device.
|
|
3048
|
+
* @brief Event of video device state changing.
|
|
3049
|
+
* @param event Information and state of a media device.
|
|
2920
3050
|
* @group Device Management
|
|
2921
3051
|
* @order 60
|
|
2922
3052
|
*/
|
|
2923
3053
|
[EngineEventsTypes.onVideoDeviceStateChanged]: (event: DeviceInfo) => void;
|
|
2924
3054
|
|
|
2925
3055
|
/**
|
|
2926
|
-
* @brief
|
|
2927
|
-
*
|
|
2928
|
-
* @param event Information (such as device ID and type) and connection state of the device.
|
|
3056
|
+
* @brief Event of audio device state changing.
|
|
3057
|
+
* @param event Information and state of a media device.
|
|
2929
3058
|
* @group Device Management
|
|
2930
3059
|
* @order 50
|
|
2931
3060
|
*/
|
|
@@ -3059,6 +3188,18 @@ export interface IEngineEvents {
|
|
|
3059
3188
|
*/
|
|
3060
3189
|
[EngineEventsTypes.onPublicStreamStats]: (stats: PublicStreamStats) => void;
|
|
3061
3190
|
|
|
3191
|
+
/**
|
|
3192
|
+
* @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.
|
|
3193
|
+
* @param exception
|
|
3194
|
+
*/
|
|
3195
|
+
[EngineEventsTypes.onLocalStatsException]: (exception: LocalStatsException) => void;
|
|
3196
|
+
|
|
3197
|
+
/**
|
|
3198
|
+
* @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.
|
|
3199
|
+
* @param exception
|
|
3200
|
+
*/
|
|
3201
|
+
[EngineEventsTypes.onRemoteStatsException]: (exception: RemoteStatsException) => void;
|
|
3202
|
+
|
|
3062
3203
|
/**
|
|
3063
3204
|
* @hidden
|
|
3064
3205
|
* @deprecated since 4.42, use onLocalAudioPropertiesReport and onRemoteAudioPropertiesReport instead.
|
|
@@ -3196,7 +3337,7 @@ export interface IEngineEvents {
|
|
|
3196
3337
|
userId: string;
|
|
3197
3338
|
|
|
3198
3339
|
/**
|
|
3199
|
-
* @brief
|
|
3340
|
+
* @brief Whether it is a screen-sharing stream
|
|
3200
3341
|
*/
|
|
3201
3342
|
isScreen: boolean;
|
|
3202
3343
|
|
|
@@ -3215,7 +3356,7 @@ export interface IEngineEvents {
|
|
|
3215
3356
|
[EngineEventsTypes.onAutoPublishResult]: (event: {
|
|
3216
3357
|
|
|
3217
3358
|
/**
|
|
3218
|
-
* @brief
|
|
3359
|
+
* @brief Whether it is a screen-sharing stream
|
|
3219
3360
|
*/
|
|
3220
3361
|
isScreen: boolean;
|
|
3221
3362
|
|
|
@@ -3612,6 +3753,14 @@ export interface IEngineEvents {
|
|
|
3612
3753
|
isAutoSubscribe: boolean;
|
|
3613
3754
|
errorCode?: ErrorCode;
|
|
3614
3755
|
}) => void;
|
|
3756
|
+
|
|
3757
|
+
/**
|
|
3758
|
+
* @brief Event of player visibility change, triggered every 30 seconds to notify users of changes in the visibility status of the player.
|
|
3759
|
+
* @param e Array of player visibility information, including player ID, user ID, and visibility status.
|
|
3760
|
+
* @group Video Management
|
|
3761
|
+
* @order 80
|
|
3762
|
+
*/
|
|
3763
|
+
[EngineEventsTypes.onPlayerVisibility]: (e: PlayerVisibility[]) => void;
|
|
3615
3764
|
}
|
|
3616
3765
|
export interface IJoinRoomConfig {
|
|
3617
3766
|
useTcpAfterJoinTimeout: boolean;
|
|
@@ -4038,12 +4187,12 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4038
4187
|
* @param userId The user ID. The empty value indicates the local stream.
|
|
4039
4188
|
* @return If the specified stream does not exist, the volume values are `0`.
|
|
4040
4189
|
* + 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
|
-
*   - \[0, 25]:
|
|
4190
|
+
*   - \[0, 25]: Silence
|
|
4042
4191
|
*   - \[26, 75]: Low volume
|
|
4043
4192
|
*   - \[76, 204]: Medium volume
|
|
4044
4193
|
*   - \[205, 255]: High volume
|
|
4045
4194
|
* + 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
|
-
*   - \[-127, -60]:
|
|
4195
|
+
*   - \[-127, -60]: Silence
|
|
4047
4196
|
*   - \[-59, -40]: Low volume
|
|
4048
4197
|
*   - \[-39, -20]: Medium volume
|
|
4049
4198
|
*   - \[-19, 0]: High volume
|
|
@@ -4161,7 +4310,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4161
4310
|
*   - 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
4311
|
*   - Android devices do not support sending SEI data in voice call scenarios.
|
|
4163
4312
|
*   - 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
|
|
4313
|
+
* + 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
4314
|
* + 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
4315
|
* + After the message is sent successfully, the remote end will receive [onSEIMessageReceived](docs-104479#onseimessagereceived).
|
|
4167
4316
|
* + 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 +4551,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4402
4551
|
getWTNStreamManager: () => IWTNStream;
|
|
4403
4552
|
|
|
4404
4553
|
/**
|
|
4405
|
-
* @brief > Available since v4.66
|
|
4554
|
+
* @brief > Available since v4.66.
|
|
4406
4555
|
* Get the call ID. Call this method after joining a room.
|
|
4407
4556
|
* After creating a room, a `callId` is generated to identify the call for this room.
|
|
4408
4557
|
* @return The call ID (`callId`) of the room.
|
|
@@ -4651,7 +4800,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4651
4800
|
/**
|
|
4652
4801
|
* @brief Set the placeholder image during local video capture pause
|
|
4653
4802
|
* @param index
|
|
4654
|
-
* @param filePath Image path in
|
|
4803
|
+
* @param filePath Image path in HTTP protocol; or Blob object.
|
|
4655
4804
|
* The format of the image can be: JPG, PNG, or BMP.
|
|
4656
4805
|
* 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
4806
|
* @notes + Only available to Chrome browser on Mac
|
|
@@ -4859,7 +5008,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4859
5008
|
* @brief Turns on subtitles.
|
|
4860
5009
|
* 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
5010
|
* After calling this method, you will receive the [onSubtitleStateChanged](docs-104479#onsubtitlestatechanged) to inform you of whether subtitles are on.
|
|
4862
|
-
* @param config Subtitle
|
|
5011
|
+
* @param config Subtitle configurations.
|
|
4863
5012
|
* @return `SUBTITLE_ALREADY_ON`: Subtitle is already turned on.
|
|
4864
5013
|
* @notes + You must call this method after joining the room.
|
|
4865
5014
|
* + 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 +5133,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4984
5133
|
* `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
5134
|
* @notes + Users in the former target rooms will receive [onUserUnpublishStream]({{callback}}#EngineEvents.onUserUnpublishStream)/[onUserUnpublishScreen]({{callback}}#EngineEvents.onUserUnpublishScreen) and [onUserLeave]({{callback}}#EngineEvents.onUserLeave).
|
|
4986
5135
|
* + 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
|
|
5136
|
+
* + Call [pauseForwardStreamToAllRooms]({{api}}#RTCEngine.pauseForwardStreamToAllRooms) and [resumeForwardStreamToAllRooms]({{api}}#RTCEngine.resumeForwardStreamToAllRooms) to pause and resume forwarding media stream to all rooms.
|
|
4988
5137
|
* @group Audio & Video Transport
|
|
4989
5138
|
* @order 42
|
|
4990
5139
|
*/
|
|
@@ -5101,6 +5250,29 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
5101
5250
|
* @order 80
|
|
5102
5251
|
*/
|
|
5103
5252
|
setEarMonitorVolume: (streamIndex: StreamIndex, volume: number) => void;
|
|
5253
|
+
|
|
5254
|
+
/**
|
|
5255
|
+
* @brief > Available since V4.67 <br>
|
|
5256
|
+
* Get the visibility state of local video player and reasons for invisibility.
|
|
5257
|
+
* @param streamIndex Stream index
|
|
5258
|
+
* @param playerId Optional parameter, player ID.
|
|
5259
|
+
* @return Player visibility state.
|
|
5260
|
+
* If the corresponding player does not exist, return `undefined`.
|
|
5261
|
+
* @group Video Management
|
|
5262
|
+
*/
|
|
5263
|
+
getLocalVideoPlayerVisibility: (streamIndex: StreamIndex, playerId?: string) => PlayerVisibility | undefined;
|
|
5264
|
+
|
|
5265
|
+
/**
|
|
5266
|
+
* @brief > Available since V4.67. <br>
|
|
5267
|
+
* Gets the visibility state of remote video player and reasons for invisibility.
|
|
5268
|
+
* @param userId User ID.
|
|
5269
|
+
* @param streamIndex Stream index.
|
|
5270
|
+
* @param playerId Optional parameter, player ID.
|
|
5271
|
+
* @return Player visibility state.
|
|
5272
|
+
* If the corresponding player does not exist, return `undefined`.
|
|
5273
|
+
* @group Video Management
|
|
5274
|
+
*/
|
|
5275
|
+
getRemotePlayerVisibility: (userId: string, streamIndex: StreamIndex, playerId?: string) => PlayerVisibility | undefined;
|
|
5104
5276
|
}
|
|
5105
5277
|
|
|
5106
5278
|
/**
|
|
@@ -5328,7 +5500,7 @@ export interface IWTNStream extends EnhancedEventEmitter<IWTNStreamEvents> {
|
|
|
5328
5500
|
* @return You will also receive the [onWTNPushStateChanged](docs-104479#wtnstreamevents-onwtnpushstatechanged) callback.
|
|
5329
5501
|
* @group WTN stream
|
|
5330
5502
|
* @order 14
|
|
5331
|
-
|
|
5503
|
+
*/
|
|
5332
5504
|
muteWTNLocalAudio: (streamId: string, mute: boolean) => Promise<void>;
|
|
5333
5505
|
|
|
5334
5506
|
/**
|
|
@@ -5341,24 +5513,24 @@ export interface IWTNStream extends EnhancedEventEmitter<IWTNStreamEvents> {
|
|
|
5341
5513
|
* @return You will also receive the [onWTNPushStateChanged](docs-104479#wtnstreamevents-onwtnpushstatechanged) callback.
|
|
5342
5514
|
* @group WTN stream
|
|
5343
5515
|
* @order 13
|
|
5344
|
-
|
|
5516
|
+
*/
|
|
5345
5517
|
muteWTNLocalVideo: (streamId: string, mute: boolean) => Promise<void>;
|
|
5346
5518
|
|
|
5347
5519
|
/**
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5520
|
+
* @valid since 4.65
|
|
5521
|
+
* @brief Sends SEI via a WTN stream.
|
|
5522
|
+
* @param streamId The WTN stream's ID. The local user has published the WTN stream via [startPushWTN](docs-104478#wtnstream-startpushwtn).
|
|
5523
|
+
* @param sei SEI message.
|
|
5524
|
+
* @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>
|
|
5525
|
+
* After calling this interface, the SEI data will be added to the consecutive `repeat_count+1` video frames starting from the current video frame.
|
|
5526
|
+
* @note
|
|
5527
|
+
* - The number of SEI messages sent per second should not exceed the current video frame rate.
|
|
5528
|
+
* - The video frame only carries SEI data received within the previous 2s.
|
|
5529
|
+
* - After the message is successfully sent, the remote will receive the [onWTNSEIMessageReceived](docs-104479#wtnstreamevents-onwtnseimessagereceived) callback.
|
|
5530
|
+
* - If the call fails, neither the local nor the remote will receive the callback.
|
|
5531
|
+
* @group WTN stream
|
|
5532
|
+
* @order 37
|
|
5533
|
+
*/
|
|
5362
5534
|
sendWTNSEIMessage: (streamId: string, sei: Uint8Array, repeatCount: number) => void;
|
|
5363
5535
|
|
|
5364
5536
|
/**
|
|
@@ -5444,6 +5616,16 @@ export interface IWTNStream extends EnhancedEventEmitter<IWTNStreamEvents> {
|
|
|
5444
5616
|
* @order 26
|
|
5445
5617
|
*/
|
|
5446
5618
|
setWTNRemoteAudioPlaybackVolume: (streamId: string, volume: number) => void;
|
|
5619
|
+
|
|
5620
|
+
/**
|
|
5621
|
+
* @brief Available since v4.67.<br>
|
|
5622
|
+
* Gets the visibility status of the specified WTN stream's video player.
|
|
5623
|
+
* @param streamId The WTN stream's ID.
|
|
5624
|
+
* @return Returns the visibility status of the video player, or `undefined` if the player does not exist.
|
|
5625
|
+
* @group WTN stream
|
|
5626
|
+
* @order 27
|
|
5627
|
+
*/
|
|
5628
|
+
getWTNVideoPlayerVisibility: (streamId: string) => PlayerVisibility | undefined;
|
|
5447
5629
|
}
|
|
5448
5630
|
|
|
5449
5631
|
/**
|
|
@@ -5527,6 +5709,22 @@ export interface IWTNStreamEvents {
|
|
|
5527
5709
|
* @order 40
|
|
5528
5710
|
*/
|
|
5529
5711
|
[WTNStreamEventsTypes.onWTNSEIMessageReceived]: (event: onWTNSEIMessageReceivedEvent) => void;
|
|
5712
|
+
|
|
5713
|
+
/**
|
|
5714
|
+
* @brief Exception event callback of local WTN media stream.
|
|
5715
|
+
* @param event
|
|
5716
|
+
* @group WTN stream
|
|
5717
|
+
* @order 41
|
|
5718
|
+
*/
|
|
5719
|
+
[WTNStreamEventsTypes.onWTNLocalStatsException]: (event: onWTNLocalStatsExceptionEvent) => void;
|
|
5720
|
+
|
|
5721
|
+
/**
|
|
5722
|
+
* @brief Exception event callback of remote WTN media stream.
|
|
5723
|
+
* @param event
|
|
5724
|
+
* @group WTN stream
|
|
5725
|
+
* @order 42
|
|
5726
|
+
*/
|
|
5727
|
+
[WTNStreamEventsTypes.onWTNRemoteStatsException]: (event: onWTNRemoteStatsExceptionEvent) => void;
|
|
5530
5728
|
}
|
|
5531
5729
|
|
|
5532
5730
|
/**
|
|
@@ -5738,11 +5936,6 @@ export interface LiveTranscodeVideoConfig {
|
|
|
5738
5936
|
*/
|
|
5739
5937
|
gop: number;
|
|
5740
5938
|
|
|
5741
|
-
/**
|
|
5742
|
-
* @hidden
|
|
5743
|
-
* @brief Whether to push streams with low latency. The default value is `true`.
|
|
5744
|
-
*/
|
|
5745
|
-
|
|
5746
5939
|
/**
|
|
5747
5940
|
* @brief The bitrate (Kbps) in range of [1, 10000]. The default value is self-adaptive.
|
|
5748
5941
|
*/
|
|
@@ -5824,6 +6017,27 @@ export interface LocalAudioStats {
|
|
|
5824
6017
|
sentSampleRate?: number;
|
|
5825
6018
|
}
|
|
5826
6019
|
|
|
6020
|
+
/**
|
|
6021
|
+
* @brief Exception of local media stream information
|
|
6022
|
+
*/
|
|
6023
|
+
export interface LocalStatsException {
|
|
6024
|
+
|
|
6025
|
+
/**
|
|
6026
|
+
* @brief Exception of local media stream information
|
|
6027
|
+
*/
|
|
6028
|
+
exception: keyof typeof RTCExceptionCodeMap;
|
|
6029
|
+
|
|
6030
|
+
/**
|
|
6031
|
+
* @brief Exception code of local media stream
|
|
6032
|
+
*/
|
|
6033
|
+
code: typeof RTCExceptionCodeMap[keyof typeof RTCExceptionCodeMap];
|
|
6034
|
+
|
|
6035
|
+
/**
|
|
6036
|
+
* @brief Whether it is a screen-sharing stream: true-screen stream, false-main stream
|
|
6037
|
+
*/
|
|
6038
|
+
isScreen: boolean;
|
|
6039
|
+
}
|
|
6040
|
+
|
|
5827
6041
|
/**
|
|
5828
6042
|
* State of the local media stream
|
|
5829
6043
|
*/
|
|
@@ -6051,6 +6265,48 @@ export interface PlayerEvent {
|
|
|
6051
6265
|
playerId?: string;
|
|
6052
6266
|
}
|
|
6053
6267
|
|
|
6268
|
+
/**
|
|
6269
|
+
* @brief Player visibility status and related information (e.g., user ID, media type, stream index, etc.).
|
|
6270
|
+
*/
|
|
6271
|
+
export interface PlayerVisibility {
|
|
6272
|
+
|
|
6273
|
+
/**
|
|
6274
|
+
* @brief Player descriptor information, which contains identification information like user ID, media type, stream index.
|
|
6275
|
+
*/
|
|
6276
|
+
descriptor: {
|
|
6277
|
+
|
|
6278
|
+
/**
|
|
6279
|
+
* @brief User ID that identifies the publisher of the stream.
|
|
6280
|
+
*/
|
|
6281
|
+
userId?: string;
|
|
6282
|
+
|
|
6283
|
+
/**
|
|
6284
|
+
* @brief Media type, currently only supports video type.
|
|
6285
|
+
*/
|
|
6286
|
+
mediaType: MediaType.VIDEO;
|
|
6287
|
+
|
|
6288
|
+
/**
|
|
6289
|
+
* @brief Stream index, used to distinguish between main stream and screen sharing stream.
|
|
6290
|
+
*/
|
|
6291
|
+
streamIndex?: StreamIndex;
|
|
6292
|
+
|
|
6293
|
+
/**
|
|
6294
|
+
* @brief Stream ID that uniquely identifies a media stream.
|
|
6295
|
+
*/
|
|
6296
|
+
streamId?: string;
|
|
6297
|
+
|
|
6298
|
+
/**
|
|
6299
|
+
* @brief Player ID that uniquely identifies a player instance.
|
|
6300
|
+
*/
|
|
6301
|
+
playerId?: string;
|
|
6302
|
+
};
|
|
6303
|
+
|
|
6304
|
+
/**
|
|
6305
|
+
* @brief Array of player visibility statuses, which contains all current visibility statuses of the player.
|
|
6306
|
+
*/
|
|
6307
|
+
status: VisibilityStatus[];
|
|
6308
|
+
}
|
|
6309
|
+
|
|
6054
6310
|
/**
|
|
6055
6311
|
* @brief Event related to decoding or rendering the first video frame of the public stream.
|
|
6056
6312
|
*/
|
|
@@ -6160,10 +6416,6 @@ export interface PublicStreamSEIMessageEvent {
|
|
|
6160
6416
|
sei: Uint8Array;
|
|
6161
6417
|
}
|
|
6162
6418
|
|
|
6163
|
-
/**
|
|
6164
|
-
* @brief Subscription configuration of video streams
|
|
6165
|
-
*/
|
|
6166
|
-
|
|
6167
6419
|
/**
|
|
6168
6420
|
* @brief Stream property.
|
|
6169
6421
|
*/
|
|
@@ -6198,7 +6450,7 @@ export interface RTCStream {
|
|
|
6198
6450
|
|
|
6199
6451
|
/**
|
|
6200
6452
|
* @hidden
|
|
6201
|
-
* @brief Subtitle
|
|
6453
|
+
* @brief Subtitle configurations.
|
|
6202
6454
|
*/
|
|
6203
6455
|
export interface RTCSubtitleConfig {
|
|
6204
6456
|
|
|
@@ -6332,6 +6584,32 @@ export interface RemoteAudioStats {
|
|
|
6332
6584
|
decDuration?: number;
|
|
6333
6585
|
}
|
|
6334
6586
|
|
|
6587
|
+
/**
|
|
6588
|
+
* @brief Exception of remote media stream information
|
|
6589
|
+
*/
|
|
6590
|
+
export interface RemoteStatsException {
|
|
6591
|
+
|
|
6592
|
+
/**
|
|
6593
|
+
* @brief The ID of the remote user that occurred an exception
|
|
6594
|
+
*/
|
|
6595
|
+
userId: string;
|
|
6596
|
+
|
|
6597
|
+
/**
|
|
6598
|
+
* @brief Exception of remote media stream information
|
|
6599
|
+
*/
|
|
6600
|
+
exception: keyof typeof RTCExceptionCodeMap;
|
|
6601
|
+
|
|
6602
|
+
/**
|
|
6603
|
+
* @brief Exception code of remote media stream
|
|
6604
|
+
*/
|
|
6605
|
+
code: typeof RTCExceptionCodeMap[keyof typeof RTCExceptionCodeMap];
|
|
6606
|
+
|
|
6607
|
+
/**
|
|
6608
|
+
* @brief Whether it is a screen-sharing stream: true-screen stream, false-main stream
|
|
6609
|
+
*/
|
|
6610
|
+
isScreen: boolean;
|
|
6611
|
+
}
|
|
6612
|
+
|
|
6335
6613
|
/**
|
|
6336
6614
|
* @brief Information of the remote stream
|
|
6337
6615
|
*/
|
|
@@ -6622,7 +6900,7 @@ export interface RoomConfig {
|
|
|
6622
6900
|
remoteVideoConfig?: RemoteVideoConfig;
|
|
6623
6901
|
|
|
6624
6902
|
/**
|
|
6625
|
-
* @brief Room creation mode.
|
|
6903
|
+
* @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
6904
|
*/
|
|
6627
6905
|
roomMode?: RoomMode;
|
|
6628
6906
|
}
|
|
@@ -7350,6 +7628,27 @@ export interface onWTNFirstRemoteVideoFrameDecodedEvent {
|
|
|
7350
7628
|
streamId: string;
|
|
7351
7629
|
}
|
|
7352
7630
|
|
|
7631
|
+
/**
|
|
7632
|
+
* @brief Exception event callback of local WTN media stream.
|
|
7633
|
+
*/
|
|
7634
|
+
export interface onWTNLocalStatsExceptionEvent {
|
|
7635
|
+
|
|
7636
|
+
/**
|
|
7637
|
+
* @brief Exception of local WTN media stream information.
|
|
7638
|
+
*/
|
|
7639
|
+
exception: keyof typeof RTCExceptionCodeMap;
|
|
7640
|
+
|
|
7641
|
+
/**
|
|
7642
|
+
* @brief Exception code of local WTN media stream.
|
|
7643
|
+
*/
|
|
7644
|
+
code: typeof RTCExceptionCodeMap[keyof typeof RTCExceptionCodeMap];
|
|
7645
|
+
|
|
7646
|
+
/**
|
|
7647
|
+
* @brief ID of the local WTN media stream.
|
|
7648
|
+
*/
|
|
7649
|
+
streamId: string;
|
|
7650
|
+
}
|
|
7651
|
+
|
|
7353
7652
|
/**
|
|
7354
7653
|
* @brief The state of the WTN stream playing.
|
|
7355
7654
|
*/
|
|
@@ -7449,6 +7748,27 @@ export interface onWTNRemoteAudioStatsEvent {
|
|
|
7449
7748
|
audioStats: RemoteAudioStats;
|
|
7450
7749
|
}
|
|
7451
7750
|
|
|
7751
|
+
/**
|
|
7752
|
+
* @brief Exception event callback of remote WTN media stream.
|
|
7753
|
+
*/
|
|
7754
|
+
export interface onWTNRemoteStatsExceptionEvent {
|
|
7755
|
+
|
|
7756
|
+
/**
|
|
7757
|
+
* @brief Exception of remote WTN media stream information.
|
|
7758
|
+
*/
|
|
7759
|
+
exception: keyof typeof RTCExceptionCodeMap;
|
|
7760
|
+
|
|
7761
|
+
/**
|
|
7762
|
+
* @brief Exception code of remote WTN media stream.
|
|
7763
|
+
*/
|
|
7764
|
+
code: typeof RTCExceptionCodeMap[keyof typeof RTCExceptionCodeMap];
|
|
7765
|
+
|
|
7766
|
+
/**
|
|
7767
|
+
* @brief ID of the remote WTN media stream.
|
|
7768
|
+
*/
|
|
7769
|
+
streamId: string;
|
|
7770
|
+
}
|
|
7771
|
+
|
|
7452
7772
|
/**
|
|
7453
7773
|
* @brief The state of the WTN stream video changed.
|
|
7454
7774
|
*/
|