@byteplus/rtc 4.51.2 → 4.52.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 CHANGED
@@ -251,7 +251,7 @@ export interface MixOption {
251
251
 
252
252
  /**
253
253
  * @brief Mix playback times
254
- * @notes + Play_count < = 0: Infinite loop
254
+ * + Play_count < = 0: Infinite loop
255
255
  * + Play_count == 1: Play once (default)
256
256
  * + Play_count > 1: Play play_count times
257
257
  */
@@ -672,7 +672,7 @@ declare enum ErrorCode {
672
672
 
673
673
  /**
674
674
  * @hidden currently not available
675
- * @brief The substitling task didn't start, or call an API to update subtitles without turning on subtitles.
675
+ * @brief The subtitling task didn't start, or call an API to update subtitles without turning on subtitles.
676
676
  */
677
677
  SUBTITLE_NOT_TURNED_ON = "SUBTITLE_NOT_TURNED_ON",
678
678
 
@@ -748,64 +748,7 @@ declare enum AudioMixingError {
748
748
  */
749
749
  AUDIO_MIXING_ERROR_INVALID_AUDIO_TRACK = 9
750
750
  }
751
- declare class AudioProfileManager {
752
- private _appId;
753
- private _roomId?;
754
- private _constraints;
755
- private _profile?;
756
- constructor(_appId: string);
757
- setRoomId(roomId?: string): void;
758
- setAudioProfile(profile: AudioProfileType): void;
759
- getOpusConfigStr(conf?: string): string;
760
- updateConstraints(conf: MediaTrackConstraints): void;
761
- getConstraints(): MediaTrackConstraints;
762
- private _getConfigByAudioProfile;
763
- }
764
- /**
765
- * @brief Cloud proxy informatio
766
- */
767
- export interface CloudProxyInfo {
768
-
769
- /**
770
- * @brief The cloud proxy IP of log report
771
- */
772
- logProxy: string;
773
-
774
- /**
775
- * @brief The cloud proxy IP of the access
776
- */
777
- accessProxy: string;
778
-
779
- /**
780
- * @brief The cloud proxy IP of RTC admin control
781
- */
782
- configProxy: string;
783
- }
784
- export interface RTCContext {
785
- id: string;
786
- audioProfileManager?: AudioProfileManager;
787
- serverConfig?: {
788
- videoCodec?: string;
789
- audioRed?: boolean;
790
- muteReplaceUnsub?: boolean;
791
- simulcastOnDemand?: boolean;
792
- };
793
- streamRTT?: {
794
- [streamId: string]: {
795
- audio: number;
796
- video: number;
797
- };
798
- };
799
- activeSimStreams?: boolean[];
800
- subscribeFallbackOption?: SubscribeFallbackOption;
801
- userPriority?: Map<string, RemoteUserPriority>;
802
- avSync: boolean;
803
- }
804
751
  export declare type RTCExtension = any;
805
- /**
806
- * 设置到pc上的视频编码参数
807
- */
808
- export declare type VideoEncoderConfig_PC = Pick<VideoEncoderConfig, "maxKbps">;
809
752
  declare enum StreamMixingEventType {
810
753
 
811
754
  /**
@@ -1458,190 +1401,6 @@ RemoteStreamStats, "userId" | "isScreen"> & {
1458
1401
  */
1459
1402
  publicStreamId: string;
1460
1403
  };
1461
- declare enum EngineEventsTypes {
1462
-
1463
- /**
1464
- * @brief The media track ends.
1465
- */
1466
- onTrackEnded = "onTrackEnded",
1467
-
1468
- /**
1469
- * @brief Player event
1470
- */
1471
- onPlayerEvent = "onPlayerEvent",
1472
-
1473
- /**
1474
- * @brief Streams fails to play automatically.
1475
- */
1476
- onAutoplayFailed = "onAutoplayFailed",
1477
-
1478
- /**
1479
- * @brief A user joins the room.
1480
- */
1481
- onUserJoined = "onUserJoined",
1482
-
1483
- /**
1484
- * @brief A user leaves the room.
1485
- */
1486
- onUserLeave = "onUserLeave",
1487
-
1488
- /**
1489
- * @brief Connection state changes.
1490
- */
1491
- onConnectionStateChanged = "onConnectionStateChanged",
1492
- onUserPublishStream = "onUserPublishStream",
1493
- onUserUnpublishStream = "onUserUnpublishStream",
1494
- onUserPublishScreen = "onUserPublishScreen",
1495
- onUserUnpublishScreen = "onUserUnpublishScreen",
1496
-
1497
- /**
1498
- * @brief Receiving a broadcasting message in the room
1499
- */
1500
- onRoomMessageReceived = "onRoomMessageReceived",
1501
-
1502
- /**
1503
- * @brief Receiving a broadcasting binary message in the room
1504
- */
1505
- onRoomBinaryMessageReceived = "onRoomBinaryMessageReceived",
1506
-
1507
- /**
1508
- * @brief Receiving a point-to-point text message
1509
- */
1510
- onUserMessageReceived = "onUserMessageReceived",
1511
-
1512
- /**
1513
- * @brief Receiving a point-to-point binary message
1514
- */
1515
- onUserBinaryMessageReceived = "onUserBinaryMessageReceived",
1516
-
1517
- /**
1518
- * @brief The first video frame has been rendered successfully.
1519
- * @deprecated since 4.47, use on onRemoteVideoFirstFrame instead.
1520
- */
1521
- onVideoFirstFrameRendered = "onVideoFirstFrameRendered",
1522
-
1523
- /**
1524
- * @brief The first video frame has been decoded successfully.
1525
- * @deprecated since 4.47, use on onRemoteVideoFirstFrame instead.
1526
- */
1527
- onVideoFirstFrameDecoded = "onVideoFirstFrameDecoded",
1528
-
1529
- /**
1530
- * @brief The first remote video frame has been rendered successfully.
1531
- */
1532
- onRemoteVideoFirstFrame = "onRemoteVideoFirstFrame",
1533
-
1534
- /**
1535
- * @deprecated since 4.47, use on onRemoteAudioFirstFrame instead.
1536
- * @brief The first audio frame has been decoded successfully.
1537
- */
1538
- onAudioFirstFrameDecoded = "onAudioFirstFrameDecoded",
1539
-
1540
- /**
1541
- * @brief The first audio frame has been decoded successfully.
1542
- */
1543
- onRemoteAudioFirstFrame = "onRemoteAudioFirstFrame",
1544
-
1545
- /**
1546
- * The first video frame has been rendered successfully.
1547
- */
1548
- onFirstPublicStreamVideoFrameRendered = "onFirstPublicStreamVideoFrameRendered",
1549
-
1550
- /**
1551
- * The first video frame has been decoded successfully.
1552
- */
1553
- onFirstPublicStreamVideoFrameDecoded = "onFirstPublicStreamVideoFrameDecoded",
1554
-
1555
- /**
1556
- * The first audio frame has been decoded successfully.
1557
- */
1558
- onFirstPublicStreamAudioFrameDecoded = "onFirstPublicStreamAudioFrameDecoded",
1559
-
1560
- /**
1561
- * @brief The state of the video media device changes.
1562
- */
1563
- onVideoDeviceStateChanged = "onVideoDeviceStateChanged",
1564
-
1565
- /**
1566
- * @brief The state of the audio media device changes.
1567
- */
1568
- onAudioDeviceStateChanged = "onAudioDeviceStateChanged",
1569
-
1570
- /**
1571
- * @brief Callback including the state of the remote media stream
1572
- */
1573
- onRemoteStreamStats = "onRemoteStreamStats",
1574
-
1575
- /**
1576
- * Callback including the state of the remote public media stream
1577
- */
1578
- onPublicStreamStats = "onPublicStreamStats",
1579
-
1580
- /**
1581
- * @brief Callback including the state of the local media stream
1582
- */
1583
- onLocalStreamStats = "onLocalStreamStats",
1584
-
1585
- /**
1586
- * @brief Indication of audio volume
1587
- */
1588
- onAudioVolumeIndication = "onAudioVolumeIndication",
1589
- onLocalAudioPropertiesReport = "onLocalAudioPropertiesReport",
1590
- onRemoteAudioPropertiesReport = "onRemoteAudioPropertiesReport",
1591
- onActiveSpeaker = "onActiveSpeaker",
1592
-
1593
- /**
1594
- * @brief Callback of the state changing of audio playback devices
1595
- */
1596
- onAudioPlaybackDeviceChanged = "onAudioPlaybackDeviceChanged",
1597
-
1598
- /**
1599
- * @brief A publisher starts video capture.
1600
- */
1601
- onUserStartVideoCapture = "onUserStartVideoCapture",
1602
-
1603
- /**
1604
- * @brief A publisher stops video capture.
1605
- */
1606
- onUserStopVideoCapture = "onUserStopVideoCapture",
1607
-
1608
- /**
1609
- * @brief A publisher starts audio capture.
1610
- */
1611
- onUserStartAudioCapture = "onUserStartAudioCapture",
1612
-
1613
- /**
1614
- * @brief A publisher stops audio capture.
1615
- */
1616
- onUserStopAudioCapture = "onUserStopAudioCapture",
1617
- onAutoPublishResult = "onAutoPublishResult",
1618
- onAutoSubscribeResult = "onAutoSubscribeResult",
1619
-
1620
- /**
1621
- * @brief The state of pushing streams to CDN
1622
- */
1623
- onLiveTranscodingResult = "onLiveTranscodingResult",
1624
- onStreamMixingEvent = "onStreamMixingEvent",
1625
- onAudioPlaybackDeviceTestVolume = "onAudioPlaybackDeviceTestVolume",
1626
- onSEIMessageReceived = "onSEIMessageReceived",
1627
- onError = "onError",
1628
- onAudioMixingStateChanged = "onAudioMixingStateChanged",
1629
- onUserMessageReceivedOutsideRoom = "onUserMessageReceivedOutsideRoom",
1630
- onUserBinaryMessageReceivedOutsideRoom = "onUserBinaryMessageReceivedOutsideRoom",
1631
- onTokenWillExpire = "onTokenWillExpire",
1632
- onCloudProxyConnected = "onCloudProxyConnected",
1633
- onPushPublicStreamResult = "onPushPublicStreamResult",
1634
- onPublicStreamSEIMessageReceived = "onPublicStreamSEIMessageReceived",
1635
- onNetworkQuality = "onNetworkQuality",
1636
- onSimulcastSubscribeFallback = "onSimulcastSubscribeFallback",
1637
- onRemoteVideoSizeChanged = "onRemoteVideoSizeChanged",
1638
- onVideoStreamBanned = "onVideoStreamBanned",
1639
- onAudioStreamBanned = "onAudioStreamBanned",
1640
- onLocalVideoSizeChanged = "onLocalVideoSizeChanged",
1641
- onSubtitleStateChanged = "onSubtitleStateChanged",
1642
- onSubtitleMessageReceived = "onSubtitleMessageReceived",
1643
- onServerParamsSetResult = "onServerParamsSetResult"
1644
- }
1645
1404
 
1646
1405
  /**
1647
1406
  * @brief Event of banning/unbanning video streaming
@@ -1951,6 +1710,192 @@ declare enum StreamMixingEventErrorCode {
1951
1710
  */
1952
1711
  ERR_UNKNOWN = 9999
1953
1712
  }
1713
+ declare enum EngineEventsTypes {
1714
+
1715
+ /**
1716
+ * @brief The media track ends.
1717
+ */
1718
+ onTrackEnded = "onTrackEnded",
1719
+ onTrackMute = "onTrackMute",
1720
+ onTrackUnmute = "onTrackUnmute",
1721
+
1722
+ /**
1723
+ * @brief Player event
1724
+ */
1725
+ onPlayerEvent = "onPlayerEvent",
1726
+
1727
+ /**
1728
+ * @brief Streams fails to play automatically.
1729
+ */
1730
+ onAutoplayFailed = "onAutoplayFailed",
1731
+
1732
+ /**
1733
+ * @brief A user joins the room.
1734
+ */
1735
+ onUserJoined = "onUserJoined",
1736
+
1737
+ /**
1738
+ * @brief A user leaves the room.
1739
+ */
1740
+ onUserLeave = "onUserLeave",
1741
+
1742
+ /**
1743
+ * @brief Connection state changes.
1744
+ */
1745
+ onConnectionStateChanged = "onConnectionStateChanged",
1746
+ onUserPublishStream = "onUserPublishStream",
1747
+ onUserUnpublishStream = "onUserUnpublishStream",
1748
+ onUserPublishScreen = "onUserPublishScreen",
1749
+ onUserUnpublishScreen = "onUserUnpublishScreen",
1750
+
1751
+ /**
1752
+ * @brief Receiving a broadcasting message in the room
1753
+ */
1754
+ onRoomMessageReceived = "onRoomMessageReceived",
1755
+
1756
+ /**
1757
+ * @brief Receiving a broadcasting binary message in the room
1758
+ */
1759
+ onRoomBinaryMessageReceived = "onRoomBinaryMessageReceived",
1760
+
1761
+ /**
1762
+ * @brief Receiving a point-to-point text message
1763
+ */
1764
+ onUserMessageReceived = "onUserMessageReceived",
1765
+
1766
+ /**
1767
+ * @brief Receiving a point-to-point binary message
1768
+ */
1769
+ onUserBinaryMessageReceived = "onUserBinaryMessageReceived",
1770
+
1771
+ /**
1772
+ * @brief The first video frame has been rendered successfully.
1773
+ * @deprecated since 4.47, use on onRemoteVideoFirstFrame instead.
1774
+ */
1775
+ onVideoFirstFrameRendered = "onVideoFirstFrameRendered",
1776
+
1777
+ /**
1778
+ * @brief The first video frame has been decoded successfully.
1779
+ * @deprecated since 4.47, use on onRemoteVideoFirstFrame instead.
1780
+ */
1781
+ onVideoFirstFrameDecoded = "onVideoFirstFrameDecoded",
1782
+
1783
+ /**
1784
+ * @brief The first remote video frame has been rendered successfully.
1785
+ */
1786
+ onRemoteVideoFirstFrame = "onRemoteVideoFirstFrame",
1787
+
1788
+ /**
1789
+ * @deprecated since 4.47, use on onRemoteAudioFirstFrame instead.
1790
+ * @brief The first audio frame has been decoded successfully.
1791
+ */
1792
+ onAudioFirstFrameDecoded = "onAudioFirstFrameDecoded",
1793
+
1794
+ /**
1795
+ * @brief The first audio frame has been decoded successfully.
1796
+ */
1797
+ onRemoteAudioFirstFrame = "onRemoteAudioFirstFrame",
1798
+
1799
+ /**
1800
+ * The first video frame has been rendered successfully.
1801
+ */
1802
+ onFirstPublicStreamVideoFrameRendered = "onFirstPublicStreamVideoFrameRendered",
1803
+
1804
+ /**
1805
+ * The first video frame has been decoded successfully.
1806
+ */
1807
+ onFirstPublicStreamVideoFrameDecoded = "onFirstPublicStreamVideoFrameDecoded",
1808
+
1809
+ /**
1810
+ * The first audio frame has been decoded successfully.
1811
+ */
1812
+ onFirstPublicStreamAudioFrameDecoded = "onFirstPublicStreamAudioFrameDecoded",
1813
+
1814
+ /**
1815
+ * @brief The state of the video media device changes.
1816
+ */
1817
+ onVideoDeviceStateChanged = "onVideoDeviceStateChanged",
1818
+
1819
+ /**
1820
+ * @brief The state of the audio media device changes.
1821
+ */
1822
+ onAudioDeviceStateChanged = "onAudioDeviceStateChanged",
1823
+
1824
+ /**
1825
+ * @brief Callback including the state of the remote media stream
1826
+ */
1827
+ onRemoteStreamStats = "onRemoteStreamStats",
1828
+
1829
+ /**
1830
+ * Callback including the state of the remote public media stream
1831
+ */
1832
+ onPublicStreamStats = "onPublicStreamStats",
1833
+
1834
+ /**
1835
+ * @brief Callback including the state of the local media stream
1836
+ */
1837
+ onLocalStreamStats = "onLocalStreamStats",
1838
+
1839
+ /**
1840
+ * @brief Indication of audio volume
1841
+ */
1842
+ onAudioVolumeIndication = "onAudioVolumeIndication",
1843
+ onLocalAudioPropertiesReport = "onLocalAudioPropertiesReport",
1844
+ onRemoteAudioPropertiesReport = "onRemoteAudioPropertiesReport",
1845
+ onActiveSpeaker = "onActiveSpeaker",
1846
+
1847
+ /**
1848
+ * @brief Callback of the state changing of audio playback devices
1849
+ */
1850
+ onAudioPlaybackDeviceChanged = "onAudioPlaybackDeviceChanged",
1851
+
1852
+ /**
1853
+ * @brief A publisher starts video capture.
1854
+ */
1855
+ onUserStartVideoCapture = "onUserStartVideoCapture",
1856
+
1857
+ /**
1858
+ * @brief A publisher stops video capture.
1859
+ */
1860
+ onUserStopVideoCapture = "onUserStopVideoCapture",
1861
+
1862
+ /**
1863
+ * @brief A publisher starts audio capture.
1864
+ */
1865
+ onUserStartAudioCapture = "onUserStartAudioCapture",
1866
+
1867
+ /**
1868
+ * @brief A publisher stops audio capture.
1869
+ */
1870
+ onUserStopAudioCapture = "onUserStopAudioCapture",
1871
+ onAutoPublishResult = "onAutoPublishResult",
1872
+ onAutoSubscribeResult = "onAutoSubscribeResult",
1873
+
1874
+ /**
1875
+ * @brief The state of pushing streams to CDN
1876
+ */
1877
+ onLiveTranscodingResult = "onLiveTranscodingResult",
1878
+ onStreamMixingEvent = "onStreamMixingEvent",
1879
+ onAudioPlaybackDeviceTestVolume = "onAudioPlaybackDeviceTestVolume",
1880
+ onSEIMessageReceived = "onSEIMessageReceived",
1881
+ onError = "onError",
1882
+ onAudioMixingStateChanged = "onAudioMixingStateChanged",
1883
+ onUserMessageReceivedOutsideRoom = "onUserMessageReceivedOutsideRoom",
1884
+ onUserBinaryMessageReceivedOutsideRoom = "onUserBinaryMessageReceivedOutsideRoom",
1885
+ onTokenWillExpire = "onTokenWillExpire",
1886
+ onCloudProxyConnected = "onCloudProxyConnected",
1887
+ onPushPublicStreamResult = "onPushPublicStreamResult",
1888
+ onPublicStreamSEIMessageReceived = "onPublicStreamSEIMessageReceived",
1889
+ onNetworkQuality = "onNetworkQuality",
1890
+ onSimulcastSubscribeFallback = "onSimulcastSubscribeFallback",
1891
+ onRemoteVideoSizeChanged = "onRemoteVideoSizeChanged",
1892
+ onVideoStreamBanned = "onVideoStreamBanned",
1893
+ onAudioStreamBanned = "onAudioStreamBanned",
1894
+ onLocalVideoSizeChanged = "onLocalVideoSizeChanged",
1895
+ onSubtitleStateChanged = "onSubtitleStateChanged",
1896
+ onSubtitleMessageReceived = "onSubtitleMessageReceived",
1897
+ onServerParamsSetResult = "onServerParamsSetResult"
1898
+ }
1954
1899
 
1955
1900
  /**
1956
1901
  * @id EngineEvents
@@ -2142,6 +2087,30 @@ export interface IEngineEvents {
2142
2087
  */
2143
2088
  isScreen: boolean;
2144
2089
  }) => void;
2090
+ [EngineEventsTypes.onTrackMute]: (event: {
2091
+
2092
+ /**
2093
+ * @brief Type of the trac
2094
+ */
2095
+ kind: string;
2096
+
2097
+ /**
2098
+ * @brief Whether it is a screen-sharing stream.
2099
+ */
2100
+ isScreen: boolean;
2101
+ }) => void;
2102
+ [EngineEventsTypes.onTrackUnmute]: (event: {
2103
+
2104
+ /**
2105
+ * @brief Type of the trac
2106
+ */
2107
+ kind: string;
2108
+
2109
+ /**
2110
+ * @brief Whether it is a screen-sharing stream.
2111
+ */
2112
+ isScreen: boolean;
2113
+ }) => void;
2145
2114
 
2146
2115
  /**
2147
2116
  * @brief Event of receiving a broadcast text message in the room
@@ -2593,7 +2562,6 @@ export interface IEngineEvents {
2593
2562
 
2594
2563
  /**
2595
2564
  * @id RTCEngine
2596
- * <span id="irtcengine"></span>
2597
2565
  * @list overview
2598
2566
  * @detail api
2599
2567
  */
@@ -2617,11 +2585,10 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
2617
2585
  * @return
2618
2586
  * @notes + In the same room with the same App ID, the user ID of each user must be unique. The user will be kicked out of the room when a user with the same userID joins the room because of the error of `DUPLICATE_LOGIN`.
2619
2587
  * + Remote users will receive [onUserJoined](104479#onuserjoined) callback when a visible user joins the room. Call [setUserVisibility](#setuservisibility) to switch the visibility of the user.
2620
- * + RTC SDK will try reconnect after losing connection to the server caused by a poor network connection. At this point, [onConnectionStateChanged](104479#onConnectionStateChanged) callback will be triggered and the SDK will automatically retry until it successfully reconnects to the server. The remote user will receive [onUserJoined](104479#onuserjoined) if a visible user reconnected successfully.
2588
+ * + RTC SDK will try reconnect after losing connection to the server caused by a poor network connection. At this point, [onConnectionStateChanged](104479#onconnectionstatechanged) callback will be triggered and the SDK will automatically retry until it successfully reconnects to the server. The remote user will receive [onUserJoined](104479#onuserjoined) if a visible user reconnected successfully.
2621
2589
  * @region Room Management
2622
2590
  */
2623
2591
  joinRoom: (token: string | null, roomId: string, userInfo: UserInfo, roomConfig?: RoomConfig) => Promise<void>;
2624
- setConnectionMode: (mode: ConnectionMode) => void;
2625
2592
 
2626
2593
  /**
2627
2594
  * @brief Leave the room.
@@ -2948,10 +2915,12 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
2948
2915
  * 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.
2949
2916
  * @notes + The default parameters are 640 × 480 px, 15 FPS, with 600 Kbps max bitrate.
2950
2917
  * + You can call this API before and after publishing video streams. After the video stream is published, you cannot switch from single stream to multi-stream, or modify the number of published multi-stream layers.
2918
+ * + When using mobile devices to publish video streams in the vertical holding state, the set resolution width and height should be the opposite of the actual sending parameters. For example, when setting the send resolution to 640 × 480 px, the actual send resolution is 480 × 640 px.
2951
2919
  * + When simulcasting, it is recommended to cancel automatic publishing and publish audio/video streams manually by calling [publishStream](#publishstream), otherwise simulcast will not take effect.
2952
2920
  * + If the set parameters are not supported by the browser, RTC SDK will capture and encode according to the range of parameters supported by the browser, and report the actual parameters of the capture by [onLocalVideoSizeChanged](104479#onlocalvideosizechanged).
2953
2921
  * + You need to call [enableSimulcastMode](#enablesimulcastmode) to start simulcasting. If you set the parameters for multiple streams without calling [enableSimulcastMode](#enablesimulcastmode), only the stream with the largest resolution will be published, and the setting will take effect after simulcasting is enabled. If simulcasting is enabled, but only one stream's parameters are set, RTC SDK will automatically fill 1~2 groups of smaller stream parameters.
2954
2922
  * + This API is applicable to the video stream captured by the camera, see [setScreenEncoderConfig](#setscreenencoderconfig) for setting parameters for screen sharing video stream.
2923
+ * + If simulcasting is started, for better compatibility, it is recommended to set the ratio of the maximum level resolution to other level resolutions as an integer multiple.
2955
2924
  */
2956
2925
  setVideoEncoderConfig: (descriptions: VideoEncoderConfig | VideoEncoderConfig[]) => Promise<void>;
2957
2926
 
@@ -3358,10 +3327,11 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
3358
3327
  * @param onAutoplayFailed Autoplay fails due to the limitation of the browser. We recommend to execute `resume` as soon as the user clicks on the UI element.
3359
3328
  * @return Resolve when the test ends.
3360
3329
  * @notes + You can call this API whether the user is in a room.
3361
- * + 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.
3362
- * + You must stop the test before starting another test for audio devices.
3363
- * + Call [stopAudioDevicePlayTest](#stopaudiodeviceplaytest) to stop the test, including capturing and playing the recording.
3364
- * + This test performs locally and does not involve network connection testing.
3330
+ * + You can call [setCaptureVolume]({{api}}#RTCEngine.setCaptureVolume) to adjust the capture volume during audio route testing. You cannot call [setPlaybackVolume]({{api}}#RTCEngine.setPlaybackVolume) during audio route testing.
3331
+ * + 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.
3332
+ * + You must stop the test before starting another test for audio devices.
3333
+ * + Call [stopAudioDevicePlayTest](#stopaudiodeviceplaytest) to stop the test, including capturing and playing the recording.
3334
+ * + This test performs locally and does not involve network connection testing.
3365
3335
  */
3366
3336
  startAudioDeviceRecordTest: (indicationInterval: number, onAutoplayFailed?: (resume: () => Promise<any>) => any) => Promise<void>;
3367
3337
 
@@ -3395,10 +3365,10 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
3395
3365
  * @notes + Call this API after you start the local media capture or designate a customized MediaStreamTrack.
3396
3366
  * + Callback of the MediaStreamTrack will inform you by the event of `ended` that the local media capture stops, probably caused either by an API call or the removal of devices.
3397
3367
  * + You can get the following info from the MediaStreamTrack: video resolution, device ID, and volume. You can manage the track actions by the method of `stop` or `mute`. You can also change the properties of the stream, such as audio volume.
3398
- * + We recommend to call RTC APIs to enable your app with the following capabilities instead of using mediaStreamTrack.
3399
- * 1. Get the video resolution or audio volume of the local streams: [onLocalStreamStats](104479#onlocalstreamstats)
3400
- * 2. Get device IDs: [enumerateDevices](#enumeratedevices)
3401
- * 3. stop: [stopAudioCapture](#stopaudiocapture), [stopVideoCapture](#stopvideocapture)
3368
+ * + We recommend to call RTC APIs to enable your app with the following capabilities instead of using mediaStreamTrack.<br/>
3369
+ * &ensp; 1. Get the video resolution or audio volume of the local streams: [onLocalStreamStats](104479#onlocalstreamstats)
3370
+ * &ensp; 2. Get device IDs: [enumerateDevices](#enumeratedevices)
3371
+ * &ensp; 3. stop: [stopAudioCapture](#stopaudiocapture), [stopVideoCapture](#stopvideocapture)
3402
3372
  */
3403
3373
  getLocalStreamTrack: (streamIndex: StreamIndex, type: "video" | "audio") => MediaStreamTrack | undefined;
3404
3374
 
@@ -3411,9 +3381,9 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
3411
3381
  * @notes + Call this API after the local user subscribe to the remote media stream.
3412
3382
  * + Callback of the MediaStreamTrack will inform you by the event of `ended` that the remote media stream stops, probably caused by the API call of [unsubscribeStream](#unsubscribestream) or [unsubscribeScreen](#unsubscribescreen).
3413
3383
  * + You can get video resolution and audio volume from the MediaStreamTrack. You can manage the track actions by the method of `stop` or `mute`. You can also change the properties of the stream, such as audio volume.
3414
- * + We recommend to call RTC APIs to enable your app with the following capabilities instead of using mediaStreamTrack.
3415
- * 1. Get the video resolution or audio volume of the remote streams: [onRemoteStreamStats](70081#onremotestreamstats)
3416
- * 2. stop: [unsubscribeStream](#unsubscribestream), [unsubscribeScreen](#unsubscribescreen)
3384
+ * + We recommend to call RTC APIs to enable your app with the following capabilities instead of using mediaStreamTrack.<br/>
3385
+ * &ensp; 1. Get the video resolution or audio volume of the remote streams: [onRemoteStreamStats]({{callback}}#onremotestreamstats)
3386
+ * &ensp; 2. Unsubscribe: [unsubscribeStream](#unsubscribestream), [unsubscribeScreen](#unsubscribescreen)
3417
3387
  */
3418
3388
  getRemoteStreamTrack: (userId: string, streamIndex: StreamIndex, type: "video" | "audio") => MediaStreamTrack | undefined;
3419
3389
 
@@ -3446,9 +3416,10 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
3446
3416
  * @brief Registers an extension.
3447
3417
  * @param extension The extension instance.
3448
3418
  * @return
3449
- * @notes You can use the following extensions.
3450
- * • [Beauty Effects Extension](https://docs.byteplus.com/byteplus-rtc/docs/148646).
3451
- * • [AI Noise-Cancelling Extension](https://docs.byteplus.com/byteplus-rtc/docs/148647).
3419
+ * @notes You can use the extension to implement the following features. </br>
3420
+ * &ensp; + [Beauty Effects](https://docs.byteplus.com/byteplus-rtc/docs/148646)
3421
+ * &ensp; + [Virtual Background](https://docs.byteplus.com/byteplus-rtc/docs/697417)
3422
+ * &ensp; + [AI Noise-Cancelling](https://docs.byteplus.com/byteplus-rtc/docs/148647)
3452
3423
  */
3453
3424
  registerExtension: (extension: RTCExtension) => Promise<void>;
3454
3425
 
@@ -3462,7 +3433,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
3462
3433
  * + `!0`: Failure.
3463
3434
  * @notes
3464
3435
  * You must call this method after joining the room.
3465
- * You can set your source language by calling `joinRoom` and importing a json formatted string `"SourceLanguage": "zh"` through the paramater of extraInfo. Only chinese, English and Japanese are supported.
3436
+ * 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.
3466
3437
  * The language of your browser will be automatically set as the source language if you don't set it.
3467
3438
  */
3468
3439
  startSubtitle: (config: RTCSubtitleConfig) => Promise<void>;
@@ -3471,21 +3442,53 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
3471
3442
  * @hidden currently not available
3472
3443
  * @brief Turns off subtitles.
3473
3444
  * After calling this method, you will receive the [onSubtitleStateChanged](104479#onsubtitlestatechanged) to inform you of whether subtitles are off.
3474
- * @return + `0`: Success.
3475
- * + `!0`: Failure.
3476
3445
  */
3477
3446
  stopSubtitle: () => void;
3478
3447
 
3479
3448
  /**
3480
3449
  * @brief Set whether the remote audio and video streams are rendered synchronously.
3481
3450
  * You can achieve ultra low latency by turning off the audio and video synchronization.
3482
- * @param sync `true`: (Default) Turn on sync.
3483
- * `false`: Turn off sync.
3451
+ * @param sync
3452
+ * &ensp; `true`: (Default) Turn on sync.
3453
+ * &ensp; `false`: Turn off sync.
3484
3454
  * @return + `true`: Success.
3485
3455
  * + `false`: Failure.
3486
3456
  * @notes You must call this API before joining the room. Calling it afterward is invalid.
3487
3457
  */
3488
3458
  setRemoteStreamRenderSync: (sync: boolean) => boolean;
3459
+
3460
+ /**
3461
+ * @brief Adjust audio capture volume.
3462
+ * @param streamIndex The index of the target stream whose recording volume is to be adjusted.
3463
+ * @param volume The percentage of capturing volume to the original volume in range of [0, 400]. The default value is 100%.
3464
+ * For better call quality, it is recommended to set the value in range of [0, 100].
3465
+ * @notes + It is recommended to set the capture volume after the capture has started.
3466
+ * + If capture has not yet started when you call this API, the setting will take effect after it starts.
3467
+ * + The capture volume adjustment controls the audio stream before audio mixing.
3468
+ */
3469
+ setCaptureVolume: (streamIndex: StreamIndex, volume: number) => void;
3470
+
3471
+ /**
3472
+ * @brief Adjust audio playback volume of a specified remote user.
3473
+ * @param userId The Id of the specified remote user.
3474
+ * @param streamIndex The index of the target stream whose playback volume is to be adjusted.
3475
+ * @param volume The percentage of playback volume to the original volume in range of [0, 400]. The default value is 100%.
3476
+ * For better call quality, it is recommended to set the value in range of [0, 100].
3477
+ * @notes + It is recommended to set the playback volume after the playing has started.
3478
+ * + If the playing has not yet started when you call this API, the setting will take effect after it starts.
3479
+ * + The playback volume cannot be adjusted in [Conference Mode](113547).
3480
+ */
3481
+ setPlaybackVolume: (userId: string, streamIndex: StreamIndex, volume: number) => void;
3482
+
3483
+ /**
3484
+ * @brief Adjust audio playback volume of a public stream.
3485
+ * @param publicStreamId The Id of a specified public stream.
3486
+ * @param volume The percentage of playback volume to the original volume in range of [0, 400]. The default value is 100%.
3487
+ * For better call quality, it is recommended to set the value in range of [0, 100].
3488
+ * @notes + It is recommended to set the playback volume after the playing has started.
3489
+ * + If the playing has not yet started when you call this API, the setting will take effect after it starts.
3490
+ */
3491
+ setPublicStreamVolume: (publicStreamId: string, volume: number) => void;
3489
3492
  }
3490
3493
 
3491
3494
  /**
@@ -4885,10 +4888,25 @@ export interface SubtitleMessage {
4885
4888
  */
4886
4889
  sequence: number;
4887
4890
  }
4888
- export declare enum ConnectionMode {
4889
- AUTO = "auto",
4890
- FORCE_TCP = "forceTCP",
4891
- FORCE_UDP = "forceUDP"
4891
+ /**
4892
+ * @brief Cloud proxy informatio
4893
+ */
4894
+ export interface CloudProxyInfo {
4895
+
4896
+ /**
4897
+ * @brief The cloud proxy IP of log report
4898
+ */
4899
+ logProxy: string;
4900
+
4901
+ /**
4902
+ * @brief The cloud proxy IP of the access
4903
+ */
4904
+ accessProxy: string;
4905
+
4906
+ /**
4907
+ * @brief The cloud proxy IP of RTC admin control
4908
+ */
4909
+ configProxy: string;
4892
4910
  }
4893
4911
 
4894
4912
  /**
@@ -5133,15 +5151,12 @@ declare class VERTC implements IVERTC {
5133
5151
  setParameter: typeof setParameter;
5134
5152
  isSupported: () => Promise<boolean>;
5135
5153
  getSupportedCodecs: () => Promise<string[]>;
5136
- ConnectionMode: typeof ConnectionMode;
5137
5154
  events: typeof EngineEventsTypes;
5138
5155
  ErrorCode: typeof ErrorCode;
5139
5156
  platform: string;
5140
- private _monitor;
5141
- private _rtmMonitor;
5142
5157
  downloadLog: (key?: string | undefined) => void;
5143
5158
  setLogConfig: ({ logLevel, LogfileSize }: {
5144
- logLevel?: "none" | "error" | "warning" | "info" | "trace" | undefined;
5159
+ logLevel?: "none" | "error" | "info" | "warning" | "trace" | undefined;
5145
5160
  LogfileSize?: number | undefined;
5146
5161
  }) => void;
5147
5162
  }