@byteplus/rtc 4.41.2 → 4.42.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
@@ -15,16 +15,28 @@ declare enum ErrorCode {
15
15
  INVALID_PARAMS = "INVALID_PARAMS",
16
16
 
17
17
  /**
18
- * @brief Token is invalid or has expired.
18
+ * @brief Invalid Token
19
19
  */
20
20
  INVALID_TOKEN = "INVALID_TOKEN",
21
+
22
+ /**
23
+ * @brief Token expired.
24
+ */
21
25
  EXPIRED_TOKEN = "EXPIRED_TOKEN",
22
26
 
23
27
  /**
24
28
  * @brief Failure of joining room
25
29
  */
26
30
  JOIN_ROOM_FAILED = "JOIN_ROOM_FAILED",
31
+
32
+ /**
33
+ * @brief Fail to update Token failed because the Token is invalid.
34
+ */
27
35
  UPDATE_TOKEN_WITH_INVALID_TOKEN = "UPDATE_TOKEN_WITH_INVALID_TOKEN",
36
+
37
+ /**
38
+ * @brief Fail to update Token failed because the user has not joined any room.
39
+ */
28
40
  UPDATE_TOKEN_BEFORE_JOIN = "UPDATE_TOKEN_BEFORE_JOIN",
29
41
 
30
42
  /**
@@ -247,6 +259,16 @@ declare enum ErrorCode {
247
259
  */
248
260
  UNEXPECTED_ERROR = "UNEXPECTED_ERROR",
249
261
 
262
+ /**
263
+ * @brief You have started another device test while the current one is still ongoing.
264
+ */
265
+ REPEAT_DEVICE_TEST = "REPEAT_DEVICE_TEST",
266
+
267
+ /**
268
+ * @brief The audio device test failed.
269
+ */
270
+ AUDIO_DEVICE_TEST_FAILED = "AUDIO_DEVICE_RECORD_FAILED",
271
+
250
272
  /**
251
273
  * @brief The user has already logged in.
252
274
  */
@@ -1376,6 +1398,8 @@ declare enum EngineEventsTypes {
1376
1398
  * @brief Indication of audio volume
1377
1399
  */
1378
1400
  onAudioVolumeIndication = "onAudioVolumeIndication",
1401
+ onLocalAudioPropertiesReport = "onLocalAudioPropertiesReport",
1402
+ onRemoteAudioPropertiesReport = "onRemoteAudioPropertiesReport",
1379
1403
 
1380
1404
  /**
1381
1405
  * @brief Callback of the state changing of audio playback devices
@@ -1408,6 +1432,7 @@ declare enum EngineEventsTypes {
1408
1432
  * @brief The state of pushing streams to CDN
1409
1433
  */
1410
1434
  onLiveTranscodingResult = "onLiveTranscodingResult",
1435
+ onAudioPlaybackDeviceTestVolume = "onAudioPlaybackDeviceTestVolume",
1411
1436
  onSEIMessageReceived = "onSEIMessageReceived",
1412
1437
  onError = "onError",
1413
1438
  onAudioMixingStateChanged = "onAudioMixingStateChanged",
@@ -1547,6 +1572,84 @@ export interface AudioMixingStateChangedEvent {
1547
1572
  error: AudioMixingError;
1548
1573
  }
1549
1574
 
1575
+ /**
1576
+ * @brief Information about local audio <br>
1577
+ */
1578
+ export interface LocalAudioPropertiesInfo {
1579
+
1580
+ /**
1581
+ * @brief Indicates whether the audio is captured by microphone or from screen sharing. <br>
1582
+ */
1583
+ streamIndex: StreamIndex;
1584
+
1585
+ /**
1586
+ * @type keytype
1587
+ * @brief Audio information <br>
1588
+ */
1589
+ audioPropertiesInfo: AudioPropertiesInfo;
1590
+ }
1591
+
1592
+ /**
1593
+ * @brief Information about remote audio <br>
1594
+ */
1595
+ export interface RemoteAudioPropertiesInfo {
1596
+
1597
+ /**
1598
+ * @brief Information about remote stream <br>
1599
+ */
1600
+ streamKey: StreamKey;
1601
+
1602
+ /**
1603
+ * @brief Information about remote audio properties <br>
1604
+ */
1605
+ audioPropertiesInfo: AudioPropertiesInfo;
1606
+ }
1607
+
1608
+ /**
1609
+ * @brief Audio information <br>
1610
+ */
1611
+ export interface AudioPropertiesInfo {
1612
+
1613
+ /**
1614
+ * @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>
1615
+ * - [0, 25]: Silence <br>
1616
+ * - [26, 75]: Low volume <br>
1617
+ * - [76, 204]: Medium volume <br>
1618
+ * - [205, 255]: High volume <br>
1619
+ */
1620
+ linearVolume: number;
1621
+
1622
+ /**
1623
+ * @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>
1624
+ * - [-127, -60]: Silence <br>
1625
+ * - [-59, -40]: Low volume <br>
1626
+ * - [-39, -20]: Medium volume <br>
1627
+ * - [-19, 0]: High volume <br>
1628
+ */
1629
+ nonlinearVolume: number;
1630
+ }
1631
+
1632
+ /**
1633
+ * @brief Information about the remote stream
1634
+ */
1635
+ export interface StreamKey {
1636
+
1637
+ /**
1638
+ * @brief ID of the room from which the stream is published.
1639
+ */
1640
+ roomId: string;
1641
+
1642
+ /**
1643
+ * @brief ID of the user who publishes the stream.
1644
+ */
1645
+ userId: string;
1646
+
1647
+ /**
1648
+ * @brief Indicates whether the audio is captured by microphone or from screen sharing. <br>
1649
+ */
1650
+ streamIndex: StreamIndex;
1651
+ }
1652
+
1550
1653
  /**
1551
1654
  * @list 104477
1552
1655
  * @detail 104479
@@ -1714,6 +1817,8 @@ export interface IEngineEvents {
1714
1817
  [EngineEventsTypes.onPublicStreamStats]: (stats: PublicStreamStats) => void;
1715
1818
 
1716
1819
  /**
1820
+ * @hidden
1821
+ * @deprecated since 4.42, use onLocalAudioPropertiesReport and onRemoteAudioPropertiesReport instead.
1717
1822
  * @brief Volume of each of the users in the room
1718
1823
  * If the user has not joined a room, the list will only include volume of `local_user`.
1719
1824
  * @param event Active user in the room and his/her volume.
@@ -1723,6 +1828,22 @@ export interface IEngineEvents {
1723
1828
  speakers: AudioVolumeInfo[];
1724
1829
  }) => void;
1725
1830
 
1831
+ /**
1832
+ * @brief After calling [enableAudioPropertiesReport](104478#enableAudioPropertiesReport), you will periodically receive this callback for the information about local audio. <br>
1833
+ * Local audio includes the microphone audio and the screen audio captured using RTC SDK internal mechanisms. <br>
1834
+ * @param event Information about local audio. <br>
1835
+ * @region Audio Managment <br>
1836
+ */
1837
+ [EngineEventsTypes.onLocalAudioPropertiesReport]: (event: LocalAudioPropertiesInfo[]) => void;
1838
+
1839
+ /**
1840
+ * @brief After calling [enableAudioPropertiesReport](104478#enableAudioPropertiesReport), you will periodically receive this callback for the information about the subscribed remote audio streams. <br>
1841
+ * The remote audio streams includes the microphone audio and screen audio collected using the RTC SDK internal mechanism/custom mechanism. <br>
1842
+ * @param event Information about remote audio. <br>
1843
+ * @region Audio Management
1844
+ */
1845
+ [EngineEventsTypes.onRemoteAudioPropertiesReport]: (event: RemoteAudioPropertiesInfo[]) => void;
1846
+
1726
1847
  /**
1727
1848
  * @brief The current playback device has been changed successfully by calling [setAudioPlaybackDevice](104478#setAudioPlaybackDevice).
1728
1849
  * @param event Information of the media devices. Refer to the [official documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo) for more details.
@@ -1837,6 +1958,11 @@ export interface IEngineEvents {
1837
1958
  * @region Message Event
1838
1959
  */
1839
1960
  [EngineEventsTypes.onUserBinaryMessageReceivedOutsideRoom]: (event: UserBinaryMessageEvent) => void;
1961
+
1962
+ /**
1963
+ * @brief You will receive this callback 30 s before the Token expires.
1964
+ * Call [updateToken](104478#updatetoken) to submit a new Token。The user will be removed from the room when the Token expires.
1965
+ */
1840
1966
  [EngineEventsTypes.onTokenWillExpire]: () => void;
1841
1967
 
1842
1968
  /**
@@ -1847,7 +1973,7 @@ export interface IEngineEvents {
1847
1973
 
1848
1974
  /**
1849
1975
  * @brief Callback of the result of publishing the public stream.
1850
- * After calling [startPushPublicStream](#startpushpublicstream), you will be informed of the result through this callback.
1976
+ * After calling [startPushPublicStream](104478#startpushpublicstream), you will be informed of the result through this callback.
1851
1977
  * @param event
1852
1978
  */
1853
1979
  [EngineEventsTypes.onPushPublicStreamResult]: (event: PublicStreamResultEvent) => void;
@@ -1855,7 +1981,7 @@ export interface IEngineEvents {
1855
1981
  /**
1856
1982
  * @hidden
1857
1983
  * @brief Callback of the SEI carried by the public video stream.
1858
- * You will receive SEI by this callback if the public stream you subscribed to by calling [startPlayPublicStream](#startplaypublicstream) is carrying SEI.
1984
+ * You will receive SEI by this callback if the public stream you subscribed to by calling [startPlayPublicStream](104478#startplaypublicstream) is carrying SEI.
1859
1985
  * @param event
1860
1986
  * @notes When multiple streams in the public stream contain SEI:
1861
1987
  * + You will receive SEI from all the video frames if the SEI do not have conflicts.
@@ -1865,14 +1991,14 @@ export interface IEngineEvents {
1865
1991
 
1866
1992
  /**
1867
1993
  * @brief Callback of the successful decoding of the first video frame of the public stream.
1868
- * Refer to [startPlayPublicStream](#startplaypublicstream) for details about subsribing to a public stream.
1994
+ * Refer to [startPlayPublicStream](104478#startplaypublicstream) for details about subscribing to a public stream.
1869
1995
  * @param event
1870
1996
  */
1871
1997
  [EngineEventsTypes.onFirstPublicStreamVideoFrameDecoded]: (event: PublicStreamVideoFirstFrameDecodedEvent) => void;
1872
1998
 
1873
1999
  /**
1874
2000
  * @brief Callback of the successful decoding of the first audio frame of the public stream.
1875
- * Refer to [startPlayPublicStream](#startplaypublicstream) for details about subsribing to a public stream.
2001
+ * Refer to [startPlayPublicStream](104478#startplaypublicstream) for details about subscribing to a public stream.
1876
2002
  * @param event
1877
2003
  */
1878
2004
  [EngineEventsTypes.onFirstPublicStreamAudioFrameDecoded]: (event: PublicStreamAudioFirstFrameDecodedEvent) => void;
@@ -1882,6 +2008,13 @@ export interface IEngineEvents {
1882
2008
  * @param event
1883
2009
  */
1884
2010
  [EngineEventsTypes.onFirstPublicStreamVideoFrameRendered]: (event: PublicStreamAudioFirstFrameDecodedEvent) => void;
2011
+
2012
+ /**
2013
+ * @brief Notification on the playing volume during the test for the local audio devices
2014
+ * @param volume playing volume during the test for the local audio devices in milliseconds. We recommend to set it to 200 ms.The range is [0,255].
2015
+ * @notes Start an audio-device test by calling [startAudioPlaybackDeviceTest](104478#startaudioplaybackdevicetest) or [startAudioDeviceRecordTest](104478#startaudiodevicerecordtest) will register this callback for regular notification on playing volume. You can set the time interval between each callback by passing a proper value when calling the API above.
2016
+ */
2017
+ [EngineEventsTypes.onAudioPlaybackDeviceTestVolume]: (volume: number) => void;
1885
2018
  }
1886
2019
 
1887
2020
  /**
@@ -2001,11 +2134,11 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
2001
2134
 
2002
2135
  /**
2003
2136
  * @brief Update Token. <br>
2004
- * Call this API to update the Token information of the room when the Token expires <br>
2137
+ * You will receive [onTokenWillExpire](104479#ontokenwillexpire) 30 s before the Token expires. Call this API to submit a new Token.
2005
2138
  * @param token A valid token <br>
2006
2139
  * @notes + If you call [joinRoom](#joinroom) with an expired token, the joining will fail with an error code `INVALID_TOKEN`. And you need to obtain a valid token and call this API to update the token. <br>
2007
2140
  * + If joining a room failed because the token expired, call this API with an updated token. And then RTC SDK will automatically rejoin the room without calling [joinRoom](#joinroom) again. <br>
2008
- * + You have no need to worry about the token expiration after the user joining successfully. Because RTC SDK only verifies the token when the user joins.
2141
+ * + The user will be removed from the room when the Token expires.
2009
2142
  * @region Room Management
2010
2143
  */
2011
2144
  updateToken(token: string): void;
@@ -2029,17 +2162,17 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
2029
2162
  switchCamera(deviceId: string): Promise<void>;
2030
2163
 
2031
2164
  /**
2032
- * @brief Enable internal video capture. The default state is off. <br>
2165
+ * @brief Enable internal video capture. The default state is off.
2033
2166
  * Internal video capture refers to: capturing video using the built-in module.
2034
- * The remote clients in the room will be informed of the state change via [onUserStartVideoCapture](104479#onuserstartvideocapture) after the publisher starts video capture by calling this API.<br>
2167
+ * The remote clients in the room will be informed of the state change via [onUserStartVideoCapture](104479#onuserstartvideocapture) after the publisher starts video capture by calling this API.
2035
2168
  * @param deviceId ID of the device need to enable which you can call [getDevices](#getdevices) to obtain.
2036
- * @return
2169
+ * @return The actual effective video capture parameters. See [MediaTrackSettings](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints). Pay attention to the properties: `frameRate`, `height`, and `width`.
2037
2170
  * @notes + Call [stopVideoCapture](#stopvideocapture) to stop the internal video capture. Otherwise, the internal video capture will sustain until you destroy the engine instance.<br>
2038
2171
  * + Once you create the engine instance, you can start internal video capture regardless of the video publishing state. The video stream will start publishing only after the video capture starts. <br>
2039
2172
  * + Call [switchCamera](#switchcamera) to switch the camera used by the internal video capture module.<br>
2040
2173
  * @region Video Management
2041
2174
  */
2042
- startVideoCapture(deviceId?: string): Promise<void>;
2175
+ startVideoCapture(deviceId?: string): Promise<MediaTrackSettings>;
2043
2176
 
2044
2177
  /**
2045
2178
  * @brief Enable internal video capture immediately. The default setting is off. <br>
@@ -2058,7 +2191,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
2058
2191
  * The remote clients in the room will be informed of the state change via [onUserStartAudioCapture](104479#onuserstartaudiocapture) after the publisher starts audio capture by calling this API.
2059
2192
  * @param deviceId ID of the device need to enable which you can call [getDevices](#getdevices) to obtain.
2060
2193
  * @return
2061
- * @notes + Call [stopVideoCapture](#stopvideocapture) to stop the internal audio capture. Otherwise, the internal audio capture will sustain until you destroy the engine instance. <br>
2194
+ * @notes + Call [stopAudioCapture](#stopaudiocapture) to stop the internal audio capture. Otherwise, the internal audio capture will sustain until you destroy the engine instance. <br>
2062
2195
  * + Once you create the engine instance, you can start internal audio capture regardless of the audio publishing state. The audio stream will start publishing only after the audio capture starts. <br>
2063
2196
  * @region Audio Management
2064
2197
  */
@@ -2259,17 +2392,28 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
2259
2392
  sendSEIMessage(streamIndex: StreamIndex, message: Uint8Array | string, repeatCount: number): void;
2260
2393
 
2261
2394
  /**
2262
- * @brief Sets the video encoder configuration of each individual stream for simulcasting, including resolution, frame rate, bitrate, scale mode, fallback strategy under poor network conditions.
2395
+ * @region Video Management
2396
+ * @brief Sets the video encoder configuration of the publishing streams.
2263
2397
  * @param streamIndex
2264
- * @param descriptions Video parameters of each individual stream for simulcasting.
2265
- * The length of `VideoEncoderConfig` is no more than 3. The resolutions must be in descending sort.
2266
- * @notes + The video streams are encoded by default with a bitrate of 500bps. <br>
2267
- * + The screen stream takes the first set of parameters. <br>
2268
- * @region Media Transmission
2398
+ * @param descriptions The max parameters of the video stream.
2399
+ * When you call [enableSimulcastMode](#enableSimulcastMode) and enable simulcasting, you can call this API to set the parameters of the multiple video streams. The length of `descriptions` is no more than 3. The code rate of the parameters must be in descending order.
2400
+ * When the resolution of the max stream is in [540P, 1080P], you can simulcast 3 streams; when in [270P, 450P], you can simulcast 2 streams; when in [0, 180P], you can not enable simulcast.
2401
+ * @notes For the video stream captured by the camera, the default value is 360P, 15FPS; for the screen-sharing stream, the default value is 1080P, 15FPS.
2402
+ */
2403
+ setVideoEncoderConfig(streamIndex: StreamIndex, descriptions: VideoEncoderConfig | VideoEncoderConfig[]): Promise<void>;
2404
+
2405
+ /**
2406
+ * @region Video Management
2407
+ * @brief Enables the simulcast mode of the video stream captured by the camera at the publishing end.imulcasting, including resolution, frame rate, bitrate, scale mode, fallback strategy under poor network conditions.
2408
+ * @param enabled
2409
+ * @param + You must call this API before publishing the video streams. <br>
2410
+ * + After enabling the simulcast mode, SDK automatically sets the encoding parameters for the video streams. For manual setting, call [setVideoEncoderConfig](#setVideoEncoderConfig).
2269
2411
  */
2270
- setVideoEncoderConfig(streamIndex: StreamIndex, descriptions: VideoEncoderConfig[]): Promise<void>;
2412
+ enableSimulcastMode(enabled: boolean): boolean;
2271
2413
 
2272
2414
  /**
2415
+ * @hidden
2416
+ * @deprecated since 4.42, use enableAudioPropertiesReport instead
2273
2417
  * @brief Turn on/off volume prompts. Off by default. <br>
2274
2418
  * Call this API to set the report period of the volume information of local user and each subscribed user.
2275
2419
  * Local client will get informed of the the volume of local user and each subscribed users via [onAudioVolumeIndication](104479#onaudiovolumeindication).
@@ -2281,6 +2425,16 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
2281
2425
  */
2282
2426
  setAudioVolumeIndicationInterval(interval?: number): void;
2283
2427
 
2428
+ /**
2429
+ * @brief Enable audio information prompts. <br>
2430
+ * @param config Audio information prompts-related configurations. <br>
2431
+ * @notes With the prompt on, you can: <br>
2432
+ * + Get the information of the audio stream captured by the local microphone and screen audio stream through [onLocalAudioPropertiesReport](104479#onLocalAudioPropertiesReport). <br>
2433
+ * + Get the information of the subscribed remote audio streams through [onRemoteAudioPropertiesReport](104479#onRemoteAudioPropertiesReport).
2434
+ * @region Audio Management
2435
+ */
2436
+ enableAudioPropertiesReport(config?: AudioPropertiesConfig): void;
2437
+
2284
2438
  /**
2285
2439
  * @brief Starts pushing media streams to CDN and sets the relevant configurations.
2286
2440
  * @param transcode configuration for push media streams to CDN.
@@ -2403,7 +2557,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
2403
2557
  * @param userInfo User information.
2404
2558
  * @return
2405
2559
  * @notes
2406
- * + Call logout{@link #logout} to log out the IM server.
2560
+ * + Call [logout](104478@#logout) to log out the IM server.
2407
2561
  * + 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`.
2408
2562
  * @region Room Management
2409
2563
  */
@@ -2419,7 +2573,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
2419
2573
  * @brief Update the Token used to login. Since all tokens have a limited time-to-live, call this API to refresh the token.
2420
2574
  * @param token updated token
2421
2575
  * @return
2422
- * @notes + Call this API to refresh the token after the token has expired with no need for calling login{@link #login}.
2576
+ * @notes + Call this API to refresh the token after the token has expired with no need for calling [login](#login).
2423
2577
  * + You will be informed of the expiration of the token if you tried to login with an expired token or during a reconnection. If the token expired after the user has logged in, no actions need to be taken.
2424
2578
  */
2425
2579
  updateLoginToken(token: string | null): Promise<void>;
@@ -2428,7 +2582,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
2428
2582
  * @brief Get the status of a user before sending him/her a P2P message. You can also call this API to check the status of the current user.
2429
2583
  * @param userId ID of the user whose status intended to know
2430
2584
  * @return
2431
- * @notes Call login{@link #login} before calling this API.
2585
+ * @notes Call [login](104478@#login) before calling this API.
2432
2586
  */
2433
2587
  getPeerOnlineStatus(userId: string): Promise<USER_ONLINE_STATUS>;
2434
2588
 
@@ -2437,8 +2591,8 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
2437
2591
  * @param userId ID of the recipient
2438
2592
  * @param message Text message within 62 KB.
2439
2593
  * @return
2440
- * @notes + Call login{@link #login} before calling this API.
2441
- * + The recipient must be logged into the server and will receive the text message via [EngineEventsTypes.onUserMessageReceivedOutsideRoom]{@link #[EngineEventsTypes.onUserMessageReceivedOutsideRoom]} if the message has been sent successfully.
2594
+ * @notes + Call [login](104478@#login) before calling this API.
2595
+ * + The recipient must be logged into the server and will receive the text message via [EngineEventsTypes.onUserMessageReceivedOutsideRoom](104479#onUserMessageReceivedOutsideRoom) if the message has been sent successfully.
2442
2596
  */
2443
2597
  sendUserMessageOutsideRoom(userId: string, message: string): Promise<any>;
2444
2598
 
@@ -2446,8 +2600,8 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
2446
2600
  * @brief Send point-to-point (P2P) binary message to a user.
2447
2601
  * @param userId ID of the recipient
2448
2602
  * @param message Binary message within 46 KB
2449
- * @return + Call login{@link #login} before calling this API.
2450
- * + The recipient must be logged into the server and will receive the text message via [EngineEventsTypes.onUserBinaryMessageReceivedOutsideRoom]{@link #[EngineEventsTypes.onUserBinaryMessageReceivedOutsideRoom]} if the message has been sent successfully.
2603
+ * @return + Call [login](#login) before calling this API.
2604
+ * + The recipient must be logged into the server and will receive the text message via [EngineEventsTypes.onUserBinaryMessageReceivedOutsideRoom](104479#onuserbinarymessagereceivedoutsideroom) if the message has been sent successfully.
2451
2605
  * @notes
2452
2606
  */
2453
2607
  sendUserBinaryMessageOutsideRoom(userId: string, message: ArrayBuffer): Promise<any>;
@@ -2457,7 +2611,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
2457
2611
  * @param signature Dynamic signature.
2458
2612
  * @param url Address of the IM server
2459
2613
  * @return
2460
- * @notes Call login{@link #login} before calling this API.
2614
+ * @notes Call [login](#login) before calling this API.
2461
2615
  */
2462
2616
  setServerParams(signature: string, url: string): Promise<any>;
2463
2617
 
@@ -2480,8 +2634,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
2480
2634
  /**
2481
2635
  * @brief Start cloud proxy
2482
2636
  * @param cloudProxyInfo cloud proxy informarion list.
2483
- * @notes <br>
2484
- * + Call this API before joining the room.<br>
2637
+ * @notes + Call this API before joining the room.<br>
2485
2638
  * + Start pre-call network detection after starting cloud proxy. <br>
2486
2639
  * + After starting cloud proxy and connects the cloud proxy server successfully, receives [onCloudProxyConnected](104479#onCloudProxyConnected). <br>
2487
2640
  * + To stop cloud proxy, call [stopCloudProxy](#stopCloudProxy).
@@ -2536,7 +2689,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
2536
2689
  * If the designated stream is not published when you call this API, you will receive the public stream once it is published.
2537
2690
  * @return
2538
2691
  * @notes + Before calling this API, we recommend that you call [setPublicStreamVideoPlayer](#setpublicstreamvideoplayer) first to set the player information and rendering mode for the public stream.
2539
- * + After calling this API, you will receive [onFirstPublicStreamVideoFrameDecoded](#onfirstpublicstreamvideoframedecoded) and [onFirstPublicStreamAudioFrameDecoded](#onfirstpublicstreamaudioframedecoded) once the first frame has been decoded.
2692
+ * + After calling this API, you will receive [onFirstPublicStreamVideoFrameDecoded](104479#onfirstpublicstreamvideoframedecoded) and [onFirstPublicStreamAudioFrameDecoded](104479#onfirstpublicstreamaudioframedecoded) once the first frame has been decoded.
2540
2693
  * + Call [stopPlayPublicStream](#stopplaypublicstream) to unsubscribing from the public stream.
2541
2694
  */
2542
2695
  startPlayPublicStream(publicStreamId: string): Promise<void>;
@@ -2556,11 +2709,64 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
2556
2709
  */
2557
2710
  setPublicStreamVideoPlayer(publicStreamId: string, videoPlayerOption: Omit<VideoPlayerOption, "userId">): void;
2558
2711
 
2712
+ /**
2713
+ * @region Video Management
2714
+ * @brief Set the placeholder image during local video capture pause
2715
+ * @param index
2716
+ * @param filePath Image path in Http protocal; or Blob object.
2717
+ * The format of the image can be: JPG, PNG, or BMP.
2718
+ * 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.
2719
+ * @return + It's recommended to call this API before stopping video capture to avoid blank frame in video recording. <br>
2720
+ * + You cannot see the image during local preview.
2721
+ */
2722
+ setDummyCaptureImagePath(index: StreamIndex, filePath: string): Promise<void>;
2723
+
2559
2724
  /**
2560
2725
  * @brief Get the default parameters of `LiveTranscodeConfig`.
2561
2726
  * @return The default parameters of `LiveTranscodeConfig`
2562
2727
  */
2563
2728
  defaultTranscoding(): Required<LiveTranscodeConfig>;
2729
+
2730
+ /**
2731
+ * @brief Start the playback test for the local audio device. RTC will start playing the audio file specified. And RTC will notify the audio volume via the [onAudioPlaybackDeviceTestVolume](104479#onaudioplaybackdevicetestvolume) periodically.
2732
+ * @param filePath Specify the path of the audio file for the playback test, including *.wav and *.mp3.
2733
+ * @param indicationInterval The time interval between each callback in milliseconds. We recommend setting it to 200 ms. The minimal value is 100 ms.
2734
+ * @return Resolve when the test ends.
2735
+ * @notes + You can call this API whether the user is in the room.
2736
+ * + Call [stopAudioPlaybackDeviceTest](#stopaudioplaybackdevicetest) to stop the playback test before moving on to the other device tests.
2737
+ */
2738
+ startAudioPlaybackDeviceTest(filePath: string, indicationInterval: number): Promise<void>;
2739
+
2740
+ /**
2741
+ * @brief Stop the playback test for the local audio device.
2742
+ * @notes Call this API to stop the playback test started by calling [startAudioPlaybackDeviceTest](#startaudioplaybackdevicetest) before moving on to the other device tests.
2743
+ */
2744
+ stopAudioPlaybackDeviceTest(): void;
2745
+
2746
+ /**
2747
+ * @brief Start the capture and playback test for local audio devices.
2748
+ * We recommend to register [onLocalAudioPropertiesReport](104479#onlocalaudiopropertiesreport) callback via [enableAudioPropertiesReport](enableaudiopropertiesreport). Once the test starts, you can get the volume of the capturing audio by this callback.
2749
+ * @param indicationInterval The time interval between each callback of [onAudioPlaybackDeviceTestVolume](104479#onaudioplaybackdevicetestvolume) via which you get informed of the playback volume during the test. We recommend setting it to 200 ms. The minimal value is 100 ms.
2750
+ * @return Resolve when the test ends.
2751
+ * @notes + You can call this API whether the user is in a room.
2752
+ * + The audio capturing will stop and begins to play the recording in 30 s after calling this API. Before that, call [stopAudioDeviceRecordAndPlayTest](#stopaudiodevicerecordandplayTest) to stop capturing and start playing the recording.
2753
+ * + You must stop the test before starting another test for audio devices.
2754
+ * + Call [stopAudioDeviceRecordTest](#stopaudiodevicerecordtest) to stop the test, including capturing and playing the recording.
2755
+ * + This test performs locally and does not involve network connection testing.
2756
+ */
2757
+ startAudioDeviceRecordTest(indicationInterval: number): Promise<void>;
2758
+
2759
+ /**
2760
+ * @brief Call this API to stop recording in the test and start to play the recording.
2761
+ * @notes After calling this API, the recording starts playing during which you can call [stopAudioDeviceRecordTest](#stopaudiodevicerecordtest) to stop playing.
2762
+ */
2763
+ stopAudioDeviceRecordAndPlayTest(): void;
2764
+
2765
+ /**
2766
+ * @brief Stop the capture and playback test for local audio devices which is started by calling [startAudioDeviceRecordTest](#startaudiodevicerecordtest).
2767
+ * Before the test ends by itself, you can call this API to stop the recording or playing.
2768
+ */
2769
+ stopAudioDevicePlayTest(): void;
2564
2770
  }
2565
2771
 
2566
2772
  /**
@@ -2657,6 +2863,7 @@ export interface RoomConfig {
2657
2863
 
2658
2864
  /**
2659
2865
  * @brief Enable/disable auto-subscribe audio. Enable by default.
2866
+ * Call publish[104481#publish] to publish media streams if you disable `isAutoPublish`.
2660
2867
  */
2661
2868
  isAutoPublish: boolean;
2662
2869
 
@@ -2806,7 +3013,7 @@ export interface VideoPlayerOption {
2806
3013
  renderDom?: string | HTMLElement;
2807
3014
 
2808
3015
  /**
2809
- * @brief Rendering modes: optional `RENDER_MODE_HIDDEN`, `RENDER_MODE_FIT` and `RENDER_MODE_ADAPTIVE`.
3016
+ * @brief Rendering modes: optional `RENDER_MODE_HIDDEN` and `RENDER_MODE_FIT` .
2810
3017
  */
2811
3018
  renderMode?: VideoRenderMode;
2812
3019
 
@@ -3071,6 +3278,21 @@ export interface ScreenConfig {
3071
3278
  */
3072
3279
  export interface VideoEncoderConfig {
3073
3280
 
3281
+ /**
3282
+ * @brief width in px
3283
+ */
3284
+ width: number;
3285
+
3286
+ /**
3287
+ * @brief height in px
3288
+ */
3289
+ height: number;
3290
+
3291
+ /**
3292
+ * @brief frame rate
3293
+ */
3294
+ frameRate: number;
3295
+
3074
3296
  /**
3075
3297
  * @brief The max bitrate, unit: kbps
3076
3298
  */
@@ -3098,6 +3320,27 @@ export declare enum MirrorType {
3098
3320
  MIRROR_TYPE_RENDER = 1
3099
3321
  }
3100
3322
 
3323
+ /**
3324
+ * @brief Configuration related to audio information prompt. <br>
3325
+ */
3326
+ export interface AudioPropertiesConfig {
3327
+
3328
+ /**
3329
+ * @brief Prompt interval in ms, the default value is 100. <br>
3330
+ * + `<= 0`: Turn off prompt <br>
3331
+ * + `(0,100]`: Invalid interval value, and will be automatically reset to 100ms. <br>
3332
+ * + `> 100`: The actual value of interval <br>
3333
+ */
3334
+ interval?: number;
3335
+
3336
+ /**
3337
+ * @brief Whether to keep audio information prompt on when you are not on the video/audio call webpage. The default setting is `true`. <br>
3338
+ * + true: Keep the prompt on <br>
3339
+ * + false: Disable the prompt <br>
3340
+ */
3341
+ enableInBackground?: boolean;
3342
+ }
3343
+
3101
3344
  /**
3102
3345
  * @brief Configurations to be set when pushing media streams to CDN
3103
3346
  */