@byteplus/rtc 4.52.3 → 4.53.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/index.d.ts +61 -26
- package/index.esm.min.js +2 -2
- package/index.min.js +2 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -990,7 +990,6 @@ export interface onSEIMessageEvent {
|
|
|
990
990
|
}
|
|
991
991
|
|
|
992
992
|
/**
|
|
993
|
-
* @hidden
|
|
994
993
|
* @brief The SEI carried by the public video stream.
|
|
995
994
|
*/
|
|
996
995
|
export interface PublicStreamSEIMessageEvent {
|
|
@@ -1204,6 +1203,12 @@ export interface RemoteAudioStats {
|
|
|
1204
1203
|
*/
|
|
1205
1204
|
e2eDelay: number;
|
|
1206
1205
|
|
|
1206
|
+
/**
|
|
1207
|
+
* @brief The round-trip transmission time delay in ms.
|
|
1208
|
+
* @notes For FireFox, the value is not accurate.
|
|
1209
|
+
*/
|
|
1210
|
+
totalRtt: number;
|
|
1211
|
+
|
|
1207
1212
|
/**
|
|
1208
1213
|
* @hidden
|
|
1209
1214
|
* @brief Sample rate of the playback
|
|
@@ -1322,6 +1327,12 @@ export interface RemoteVideoStats {
|
|
|
1322
1327
|
*/
|
|
1323
1328
|
e2eDelay: number;
|
|
1324
1329
|
|
|
1330
|
+
/**
|
|
1331
|
+
* @brief The round-trip transmission time delay in ms.
|
|
1332
|
+
* @notes For FireFox, the value is not accurate.
|
|
1333
|
+
*/
|
|
1334
|
+
totalRtt: number;
|
|
1335
|
+
|
|
1325
1336
|
/**
|
|
1326
1337
|
* @brief Whether it is a screen-sharing stream
|
|
1327
1338
|
*/
|
|
@@ -1507,6 +1518,9 @@ export interface ConnectionStateChangeEvent {
|
|
|
1507
1518
|
*/
|
|
1508
1519
|
state: ConnectionState;
|
|
1509
1520
|
}
|
|
1521
|
+
export interface VendorConnectionStateChangeEvent extends ConnectionStateChangeEvent {
|
|
1522
|
+
userId: string;
|
|
1523
|
+
}
|
|
1510
1524
|
|
|
1511
1525
|
/**
|
|
1512
1526
|
* @brief Event related to the player
|
|
@@ -1894,7 +1908,8 @@ declare enum EngineEventsTypes {
|
|
|
1894
1908
|
onLocalVideoSizeChanged = "onLocalVideoSizeChanged",
|
|
1895
1909
|
onSubtitleStateChanged = "onSubtitleStateChanged",
|
|
1896
1910
|
onSubtitleMessageReceived = "onSubtitleMessageReceived",
|
|
1897
|
-
onServerParamsSetResult = "onServerParamsSetResult"
|
|
1911
|
+
onServerParamsSetResult = "onServerParamsSetResult",
|
|
1912
|
+
onVendorConnectionStateChanged = "onVendorConnectionStateChanged"
|
|
1898
1913
|
}
|
|
1899
1914
|
|
|
1900
1915
|
/**
|
|
@@ -1932,6 +1947,14 @@ export interface IEngineEvents {
|
|
|
1932
1947
|
*/
|
|
1933
1948
|
[EngineEventsTypes.onConnectionStateChanged]: (event: ConnectionStateChangeEvent) => void;
|
|
1934
1949
|
|
|
1950
|
+
/**
|
|
1951
|
+
* @hidden
|
|
1952
|
+
* @brief Vendor ICE connection state changed
|
|
1953
|
+
* @param event
|
|
1954
|
+
* @region Network Event
|
|
1955
|
+
*/
|
|
1956
|
+
[EngineEventsTypes.onVendorConnectionStateChanged]: (event: VendorConnectionStateChangeEvent) => void;
|
|
1957
|
+
|
|
1935
1958
|
/**
|
|
1936
1959
|
* @brief Callback on new media streams captured by camera/microphone in the room.
|
|
1937
1960
|
* @notes You will receive this callback after a remote user successfully publishes media streams captured by camera/microphone in the room with [publishStream](104478#publishstream). Then you can choose whether to call [subscribeStream](104478#subscribestream) to subscribe to the streams or not.
|
|
@@ -2087,6 +2110,10 @@ export interface IEngineEvents {
|
|
|
2087
2110
|
*/
|
|
2088
2111
|
isScreen: boolean;
|
|
2089
2112
|
}) => void;
|
|
2113
|
+
|
|
2114
|
+
/**
|
|
2115
|
+
* @internal
|
|
2116
|
+
*/
|
|
2090
2117
|
[EngineEventsTypes.onTrackMute]: (event: {
|
|
2091
2118
|
|
|
2092
2119
|
/**
|
|
@@ -2099,6 +2126,10 @@ export interface IEngineEvents {
|
|
|
2099
2126
|
*/
|
|
2100
2127
|
isScreen: boolean;
|
|
2101
2128
|
}) => void;
|
|
2129
|
+
|
|
2130
|
+
/**
|
|
2131
|
+
* @internal
|
|
2132
|
+
*/
|
|
2102
2133
|
[EngineEventsTypes.onTrackUnmute]: (event: {
|
|
2103
2134
|
|
|
2104
2135
|
/**
|
|
@@ -2896,13 +2927,13 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
2896
2927
|
|
|
2897
2928
|
/**
|
|
2898
2929
|
* @brief Send SEI message carried by video frames
|
|
2899
|
-
* @param streamIndex
|
|
2900
|
-
* @param message SEI message within
|
|
2901
|
-
* @param repeatCount Number of message sending repetitions. The value range is [0,
|
|
2930
|
+
* @param streamIndex Stream index.
|
|
2931
|
+
* @param message SEI message within 4 KB. Empty message or message exceeding this size will not be sent with respective error prompt.
|
|
2932
|
+
* @param repeatCount Number of message sending repetitions. The value range is [0, max{29, %{video frame rate}-1}]. Recommended range: [2,4].
|
|
2902
2933
|
* Calling this API to add SEI data to consecutive `repeatCount` video frames starting from the current one.
|
|
2903
2934
|
* @notes + Call this API to add SEI message to the video frame captured by the internal video capture module.
|
|
2904
|
-
*
|
|
2905
|
-
*
|
|
2935
|
+
* + SDK will abandon the SEI message if no video frame in 2s after you call this API.
|
|
2936
|
+
* + Users receiving the stream will receive the SEI message via [onSEIMessageReceived](104479#onseimessagereceived) once the SEI message is sent successfully.
|
|
2906
2937
|
* @region Message
|
|
2907
2938
|
*/
|
|
2908
2939
|
sendSEIMessage: (streamIndex: StreamIndex, message: Uint8Array | string, repeatCount: number) => void;
|
|
@@ -3096,15 +3127,13 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3096
3127
|
/**
|
|
3097
3128
|
* @brief Log in to the RTM server.
|
|
3098
3129
|
* Call this method before users within the same `appID` can communicate with each other via messages.
|
|
3099
|
-
* @param token
|
|
3100
|
-
*
|
|
3101
|
-
*
|
|
3102
|
-
* @param
|
|
3130
|
+
* @param token Token for authentication.
|
|
3131
|
+
* During testing, you can use generate a temporary Token on [Console](https://console.byteplus.com/auth/login), and fill in any value with `roomId`.
|
|
3132
|
+
* To officially go live, you need to use the implement token generation at your server. The `roomId` field should be empty. See [Authentication with Token](70121).
|
|
3133
|
+
* @param userId User ID.
|
|
3103
3134
|
* @return
|
|
3104
|
-
* @notes
|
|
3105
|
-
* + Call [logout](#logout) to log out the IM server.
|
|
3135
|
+
* @notes + Call [logout](#logout) to log out the IM server.
|
|
3106
3136
|
* + In the same App ID, the user ID of each user must be unique. The user will be logged out when a user with the same userID joins the room because of the error of `RTM_DUPLICATE_LOGIN`.
|
|
3107
|
-
* @region Room Management
|
|
3108
3137
|
*/
|
|
3109
3138
|
login: (token: string | null, userId: string) => Promise<void>;
|
|
3110
3139
|
|
|
@@ -3429,8 +3458,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3429
3458
|
* 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](104479#onsubtitlemessagereceived) callback to informs you of related information about subtitles.
|
|
3430
3459
|
* After calling this method, you will receive the [onSubtitleStateChanged](104479#onsubtitlestatechanged) to inform you of whether subtitles are on.
|
|
3431
3460
|
* @param config Subtitle configrations.
|
|
3432
|
-
* @return
|
|
3433
|
-
* + `!0`: Failure.
|
|
3461
|
+
* @return
|
|
3434
3462
|
* @notes
|
|
3435
3463
|
* You must call this method after joining the room.
|
|
3436
3464
|
* You can set your source language by calling `joinRoom` and importing a json formatted string `"source_language": "zh"` through the paramater of extraInfo. Only chinese, English and Japanese are supported.
|
|
@@ -3715,7 +3743,7 @@ export interface VideoPlayerOption {
|
|
|
3715
3743
|
renderDom?: string | HTMLElement;
|
|
3716
3744
|
|
|
3717
3745
|
/**
|
|
3718
|
-
* @brief Rendering
|
|
3746
|
+
* @brief Rendering mode.
|
|
3719
3747
|
*/
|
|
3720
3748
|
renderMode?: VideoRenderMode;
|
|
3721
3749
|
|
|
@@ -3735,16 +3763,22 @@ export interface VideoPlayerOption {
|
|
|
3735
3763
|
export declare enum VideoRenderMode {
|
|
3736
3764
|
|
|
3737
3765
|
/**
|
|
3738
|
-
* @brief
|
|
3739
|
-
*
|
|
3766
|
+
* @brief (Default value for main stream) Fills the entire window with the video frame.
|
|
3767
|
+
* The video frame is scaled until the window is filled. If the video frame's aspect ratio is different from that of the window, the extra part of the video frame will be cropped.
|
|
3740
3768
|
*/
|
|
3741
3769
|
RENDER_MODE_HIDDEN = 0,
|
|
3742
3770
|
|
|
3743
3771
|
/**
|
|
3744
|
-
* @brief
|
|
3745
|
-
*
|
|
3772
|
+
* @brief (Default value for screen-sharing stream) Makes the entire video frame fit within the window while maintaining the video frame's original aspect ratio.
|
|
3773
|
+
* There may be empty space at the margins of the window.
|
|
3774
|
+
*/
|
|
3775
|
+
RENDER_MODE_FIT = 1,
|
|
3776
|
+
|
|
3777
|
+
/**
|
|
3778
|
+
* @brief Stretch the video frame until the window is filled.
|
|
3779
|
+
* The video frame's aspect ratio can be changed as it is automatically stretched to fill the window.
|
|
3746
3780
|
*/
|
|
3747
|
-
|
|
3781
|
+
RENDER_MODE_FILL = 2
|
|
3748
3782
|
}
|
|
3749
3783
|
|
|
3750
3784
|
/**
|
|
@@ -4063,10 +4097,10 @@ export declare enum MirrorType {
|
|
|
4063
4097
|
export interface AudioPropertiesConfig {
|
|
4064
4098
|
|
|
4065
4099
|
/**
|
|
4066
|
-
* @brief Prompt interval in ms, the default value is 100.
|
|
4067
|
-
*
|
|
4068
|
-
*
|
|
4069
|
-
*
|
|
4100
|
+
* @brief Prompt interval in ms, the default value is 100. </br>
|
|
4101
|
+
*   + `≤0`: Turn off prompt.
|
|
4102
|
+
*   + `(0,100)`: Invalid interval value, and will be automatically reset to 100ms.
|
|
4103
|
+
*   + `≥100`: Enable prompt and set the prompt interval to the set value.
|
|
4070
4104
|
*/
|
|
4071
4105
|
interval?: number;
|
|
4072
4106
|
|
|
@@ -5154,6 +5188,7 @@ declare class VERTC implements IVERTC {
|
|
|
5154
5188
|
events: typeof EngineEventsTypes;
|
|
5155
5189
|
ErrorCode: typeof ErrorCode;
|
|
5156
5190
|
platform: string;
|
|
5191
|
+
commitInfo: string;
|
|
5157
5192
|
downloadLog: (key?: string | undefined) => void;
|
|
5158
5193
|
setLogConfig: ({ logLevel, LogfileSize }: {
|
|
5159
5194
|
logLevel?: "none" | "error" | "info" | "warning" | "trace" | undefined;
|