@byteplus/rtc 4.47.10 → 4.49.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-beauty/index.js +1 -1
- package/extension-beauty/index.umd.js +1 -1
- package/index.d.ts +212 -95
- package/index.esm.min.js +2 -2
- package/index.min.js +2 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -526,8 +526,8 @@ export interface IAudioMixingManager {
|
|
|
526
526
|
/**
|
|
527
527
|
* @brief Get audio file duration
|
|
528
528
|
* @param id Mix ID
|
|
529
|
-
* @return +
|
|
530
|
-
* +
|
|
529
|
+
* @return + `> 0`: Success, audio file duration, in milliseconds.
|
|
530
|
+
* + `< 0`: Failure
|
|
531
531
|
* @notes Before calling this method to obtain the length of the audio file, you need to call [preloadAudioMixing](#preloadaudiomixing) or [startAudioMixing](#startaudiomixing).
|
|
532
532
|
* @region Advanced Feature
|
|
533
533
|
*/
|
|
@@ -536,8 +536,8 @@ export interface IAudioMixingManager {
|
|
|
536
536
|
/**
|
|
537
537
|
* @brief Get audio file playback progress
|
|
538
538
|
* @param id Mix ID
|
|
539
|
-
* @return +
|
|
540
|
-
* +
|
|
539
|
+
* @return + `> 0`: Success, audio file playback progress, in milliseconds.
|
|
540
|
+
* + `< 0`: Failed
|
|
541
541
|
* @notes Before calling this method to get the audio file playback progress, you need to call [startAudioMixing](#startaudiomixing) to start playing the audio file.
|
|
542
542
|
* @region Advanced Feature
|
|
543
543
|
*/
|
|
@@ -665,7 +665,6 @@ export interface MixOption {
|
|
|
665
665
|
}
|
|
666
666
|
declare class EnhancedEventEmitter<EventTypes extends ValidEventTypes = string | symbol> extends EventEmitter<EventTypes> {
|
|
667
667
|
safeEmit<T extends EventNames<EventTypes>>(event: T, ...args: EventArgs<EventTypes, T>): boolean;
|
|
668
|
-
safeEmitAsPromise(event: string, ...args: any[]): Promise<any>;
|
|
669
668
|
}
|
|
670
669
|
|
|
671
670
|
/**
|
|
@@ -942,7 +941,7 @@ export interface onVideoFirstFrameDecodedEvent {
|
|
|
942
941
|
/**
|
|
943
942
|
* Event related to decoding the first video frame of the public stream.
|
|
944
943
|
*/
|
|
945
|
-
export type PublicStreamVideoFirstFrameDecodedEvent = Omit<
|
|
944
|
+
export declare type PublicStreamVideoFirstFrameDecodedEvent = Omit<
|
|
946
945
|
|
|
947
946
|
/**
|
|
948
947
|
* @brief Event related to the decoding of the first video frame.
|
|
@@ -1417,7 +1416,7 @@ export interface RemoteStreamStats {
|
|
|
1417
1416
|
/**
|
|
1418
1417
|
* @brief Subscribed public stream's statistics and network condition, reference period 2s.
|
|
1419
1418
|
*/
|
|
1420
|
-
export type PublicStreamStats = Omit<
|
|
1419
|
+
export declare type PublicStreamStats = Omit<
|
|
1421
1420
|
|
|
1422
1421
|
/**
|
|
1423
1422
|
* @brief Remote stream stats
|
|
@@ -1741,7 +1740,7 @@ export interface PlayerEvent {
|
|
|
1741
1740
|
/**
|
|
1742
1741
|
* @brief userId of the user who is joining the room
|
|
1743
1742
|
*/
|
|
1744
|
-
userId
|
|
1743
|
+
userId: string;
|
|
1745
1744
|
|
|
1746
1745
|
/**
|
|
1747
1746
|
* @brief The public stream's ID.
|
|
@@ -1824,20 +1823,20 @@ export interface RemoteAudioPropertiesInfo {
|
|
|
1824
1823
|
export interface AudioPropertiesInfo {
|
|
1825
1824
|
|
|
1826
1825
|
/**
|
|
1827
|
-
* @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].
|
|
1828
|
-
* - [0, 25]: Silence
|
|
1829
|
-
* - [26, 75]: Low volume
|
|
1830
|
-
* - [76, 204]: Medium volume
|
|
1831
|
-
* - [205, 255]: High volume
|
|
1826
|
+
* @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>
|
|
1827
|
+
* - [0, 25]: Silence <br>
|
|
1828
|
+
* - [26, 75]: Low volume <br>
|
|
1829
|
+
* - [76, 204]: Medium volume <br>
|
|
1830
|
+
* - [205, 255]: High volume <br>
|
|
1832
1831
|
*/
|
|
1833
1832
|
linearVolume: number;
|
|
1834
1833
|
|
|
1835
1834
|
/**
|
|
1836
|
-
* @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].
|
|
1837
|
-
* - [-127, -60]: Silence
|
|
1838
|
-
* - [-59, -40]: Low volume
|
|
1839
|
-
* - [-39, -20]: Medium volume
|
|
1840
|
-
* - [-19, 0]: High volume
|
|
1835
|
+
* @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>
|
|
1836
|
+
* - [-127, -60]: Silence <br>
|
|
1837
|
+
* - [-59, -40]: Low volume <br>
|
|
1838
|
+
* - [-39, -20]: Medium volume <br>
|
|
1839
|
+
* - [-19, 0]: High volume <br>
|
|
1841
1840
|
*/
|
|
1842
1841
|
nonlinearVolume: number;
|
|
1843
1842
|
}
|
|
@@ -1871,13 +1870,23 @@ export interface AutoPlayFailedEvent {
|
|
|
1871
1870
|
/**
|
|
1872
1871
|
* @brief ID of the user whose stream failed to playback automatically. Without this parameter, the notification is about the local stream.
|
|
1873
1872
|
*/
|
|
1874
|
-
userId
|
|
1873
|
+
userId: string;
|
|
1875
1874
|
|
|
1876
1875
|
/**
|
|
1877
1876
|
* @brief Type of the media which is failed to play automatically
|
|
1878
1877
|
* For example, when both audio and video streams from the same user failed to playback automatically, you would get notified by `onAutoPlayFailed` twice with the argument of `audio` and `video` respectively.
|
|
1879
1878
|
*/
|
|
1880
|
-
kind
|
|
1879
|
+
kind: "audio" | "video";
|
|
1880
|
+
|
|
1881
|
+
/**
|
|
1882
|
+
* @brief The attributes of the screen-sharing stream.
|
|
1883
|
+
*/
|
|
1884
|
+
streamIndex: StreamIndex;
|
|
1885
|
+
|
|
1886
|
+
/**
|
|
1887
|
+
* @brief Remote stream type
|
|
1888
|
+
*/
|
|
1889
|
+
mediaType: MediaType.AUDIO | MediaType.VIDEO;
|
|
1881
1890
|
}
|
|
1882
1891
|
declare enum StreamMixingEventErrorCode {
|
|
1883
1892
|
|
|
@@ -1927,14 +1936,14 @@ export interface IEngineEvents {
|
|
|
1927
1936
|
[EngineEventsTypes.onPlayerEvent]: (event: PlayerEvent) => void;
|
|
1928
1937
|
|
|
1929
1938
|
/**
|
|
1930
|
-
* @brief
|
|
1939
|
+
* @brief Callback for a remote visible user joining the room, or an invisible user in the room switching to visible.
|
|
1931
1940
|
* @param event
|
|
1932
1941
|
* @region Room Management Event
|
|
1933
1942
|
*/
|
|
1934
1943
|
[EngineEventsTypes.onUserJoined]: (event: onUserJoinedEvent) => void;
|
|
1935
1944
|
|
|
1936
1945
|
/**
|
|
1937
|
-
* @brief
|
|
1946
|
+
* @brief Callback for a remote visible user leaving the room, or a visible user in the room switching to invisible.
|
|
1938
1947
|
* @param event
|
|
1939
1948
|
* @region Room Management Event
|
|
1940
1949
|
*/
|
|
@@ -2168,6 +2177,7 @@ export interface IEngineEvents {
|
|
|
2168
2177
|
[EngineEventsTypes.onLocalStreamStats]: (stats: LocalStreamStats) => void;
|
|
2169
2178
|
|
|
2170
2179
|
/**
|
|
2180
|
+
* @hidden
|
|
2171
2181
|
* @brief This 2 s periodical callback notifies information of the public stream after calling [startPlayPublicStream](104478#startplaypublicstream).
|
|
2172
2182
|
* @param stats
|
|
2173
2183
|
*/
|
|
@@ -2381,6 +2391,7 @@ export interface IEngineEvents {
|
|
|
2381
2391
|
[EngineEventsTypes.onCloudProxyConnected]: (event: CloudProxyConnectedEvent) => void;
|
|
2382
2392
|
|
|
2383
2393
|
/**
|
|
2394
|
+
* @hidden
|
|
2384
2395
|
* @brief Callback of the result of publishing the public stream.
|
|
2385
2396
|
* After calling [startPushPublicStream](104478#startpushpublicstream), you will be informed of the result through this callback.
|
|
2386
2397
|
* @param event
|
|
@@ -2399,6 +2410,7 @@ export interface IEngineEvents {
|
|
|
2399
2410
|
[EngineEventsTypes.onPublicStreamSEIMessageReceived]: (event: PublicStreamSEIMessageEvent) => void;
|
|
2400
2411
|
|
|
2401
2412
|
/**
|
|
2413
|
+
* @hidden
|
|
2402
2414
|
* @brief Callback of the successful decoding of the first video frame of the public stream.
|
|
2403
2415
|
* Refer to [startPlayPublicStream](104478#startplaypublicstream) for details about subscribing to a public stream.
|
|
2404
2416
|
* @param event
|
|
@@ -2406,6 +2418,7 @@ export interface IEngineEvents {
|
|
|
2406
2418
|
[EngineEventsTypes.onFirstPublicStreamVideoFrameDecoded]: (event: PublicStreamVideoFirstFrameDecodedEvent) => void;
|
|
2407
2419
|
|
|
2408
2420
|
/**
|
|
2421
|
+
* @hidden
|
|
2409
2422
|
* @brief Callback of the successful decoding of the first audio frame of the public stream.
|
|
2410
2423
|
* Refer to [startPlayPublicStream](104478#startplaypublicstream) for details about subscribing to a public stream.
|
|
2411
2424
|
* @param event
|
|
@@ -2413,6 +2426,7 @@ export interface IEngineEvents {
|
|
|
2413
2426
|
[EngineEventsTypes.onFirstPublicStreamAudioFrameDecoded]: (event: PublicStreamAudioFirstFrameDecodedEvent) => void;
|
|
2414
2427
|
|
|
2415
2428
|
/**
|
|
2429
|
+
* @hidden
|
|
2416
2430
|
* @brief Callback of the successful rendering of the first video frame of the public stream.
|
|
2417
2431
|
* Refer to [startPlayPublicStream](104478#startplaypublicstream) for details about subscribing to a public stream.
|
|
2418
2432
|
* @param event
|
|
@@ -2626,7 +2640,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
2626
2640
|
* @param userId The ID of the remote user who published the target audio/video stream.
|
|
2627
2641
|
* @param mediaType Media stream type, used for specifying whether to subscribe to the audio stream or the video stream.
|
|
2628
2642
|
* @notes You must first get the remote stream
|
|
2629
|
-
* information through onUserPublishStream
|
|
2643
|
+
* information through [onUserPublishStream](104479#onuserpublishstream) before calling this API to subscribe to streams accordingly.
|
|
2630
2644
|
* @region Room Management
|
|
2631
2645
|
*/
|
|
2632
2646
|
subscribeStream: (userId: string, mediaType: MediaType) => Promise<void>;
|
|
@@ -2692,8 +2706,9 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
2692
2706
|
* @brief Enable internal video capture. The default state is off.
|
|
2693
2707
|
* Internal video capture refers to: capturing video using the built-in module.
|
|
2694
2708
|
* 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.
|
|
2695
|
-
* @param deviceId ID of the device need to
|
|
2709
|
+
* @param deviceId ID of the capture device which you need to pass in to avoid exceptions such as no screen or a screen that is not the desired one. You can call [enumerateDevices](#enumeratedevices) to obtain the list of devices.
|
|
2696
2710
|
* @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`.
|
|
2711
|
+
* The `frameRate`, `height`, `width` set in [setVideoEncoderConfig](104478#setvideoencoderconfig) for the max stream must match this return value accordingly.
|
|
2697
2712
|
* @notes + Call [stopVideoCapture](#stopvideocapture) to stop the internal video capture. Otherwise, the internal video capture will sustain until you destroy the engine instance.
|
|
2698
2713
|
* + 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.
|
|
2699
2714
|
* + Call [setVideoCaptureDevice](#setvideocapturedevice) to switch the camera used by the internal video capture module.
|
|
@@ -2716,7 +2731,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
2716
2731
|
* @brief Start internal audio capture. The default is off.
|
|
2717
2732
|
* Internal audio capture refers to: capturing audio using the built-in module.
|
|
2718
2733
|
* 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.
|
|
2719
|
-
* @param deviceId ID of the device need to
|
|
2734
|
+
* @param deviceId ID of the capture device which you need to pass in to avoid exceptions such as no sound. You can call [enumerateDevices](#enumeratedevices) to obtain the list of devices.
|
|
2720
2735
|
* @return
|
|
2721
2736
|
* @notes + Call [stopAudioCapture](#stopaudiocapture) to stop the internal audio capture. Otherwise, the internal audio capture will sustain until you destroy the engine instance.
|
|
2722
2737
|
* + 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.
|
|
@@ -2767,7 +2782,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
2767
2782
|
|
|
2768
2783
|
/**
|
|
2769
2784
|
* @brief Bind a view to the remote media stream and set the rendering mode for the rendering of the remote stream
|
|
2770
|
-
* It's recommended to call this API and bind a view once the event of
|
|
2785
|
+
* It's recommended to call this API and bind a view once the event of [onUserPublishStream](104479#onuserpublishstream) is triggered.
|
|
2771
2786
|
* Call this API again with a blank view to unbind the view from the remote video stream.
|
|
2772
2787
|
* @param streamIndex Video stream properties
|
|
2773
2788
|
* @param videoPlayer View information and rendering mode
|
|
@@ -2797,12 +2812,14 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
2797
2812
|
* Call this API when user need to take part in the audio and video reaction after calling [createEngine](#createengine) and set to autoPlay to False.
|
|
2798
2813
|
* @param userId ID of the user whose stream is intended to play
|
|
2799
2814
|
* Call this API without a parameter to start playing the local medias.
|
|
2815
|
+
* @param mediaType Media stream type, used for specifying whether to publish audio stream or video stream.
|
|
2816
|
+
* @param streamIndex Video stream properties
|
|
2800
2817
|
* @return Calling this API when the audio and video are playing will also return a Promise.
|
|
2801
2818
|
* @region Room Management
|
|
2802
2819
|
* @note + Call this API to start playback if the audio and/or video is not playing.
|
|
2803
2820
|
* + Call this API once to start both audio and video playbacks when they do not start.
|
|
2804
2821
|
*/
|
|
2805
|
-
play: (userId?: string) => Promise<void>;
|
|
2822
|
+
play: (userId?: string, mediaType?: MediaType, streamIndex?: StreamIndex) => Promise<void>;
|
|
2806
2823
|
|
|
2807
2824
|
/**
|
|
2808
2825
|
* @brief Pause receiving remote media streams.
|
|
@@ -2884,7 +2901,8 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
2884
2901
|
* You can set parameters for up to 3 streams, SDK will always take the value of the first 3 streams when parameters for more streams are set.
|
|
2885
2902
|
* The resolutions and the frame rates must be in descending order.
|
|
2886
2903
|
* 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.
|
|
2887
|
-
* @notes +
|
|
2904
|
+
* @notes + The `frameRate`, `height`, `width` set by the max stream must match the return value of [startVideoCapture](104478#startvideocapture).
|
|
2905
|
+
* + 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.
|
|
2888
2906
|
* + Before calling this API to set parameters for multiple video streams, the largest resolution of published streams is 640px × 360px with a frame rate of 15fps by default.
|
|
2889
2907
|
* + This API is applicable to the video stream captured by the camera, see [setScreenEncoderConfig](#setscreenencoderconfig) for setting parameters for screen sharing video stream.
|
|
2890
2908
|
* @region Video Management
|
|
@@ -2905,7 +2923,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
2905
2923
|
/**
|
|
2906
2924
|
* @brief Sets your expected configuration of the remote video stream that you want to subscribe to or have subscribed to.
|
|
2907
2925
|
* @param userId The ID of the target stream publisher
|
|
2908
|
-
* @param remoteVideoConfig Your expected configuration
|
|
2926
|
+
* @param remoteVideoConfig Your expected configuration.
|
|
2909
2927
|
* @notes + This API only works after the publisher calls [enableSimulcastMode](#enablesimulcastmode) to enable publishing multiple video streams, in which case the subscriber will receive a stream that is closest to the set configuration.
|
|
2910
2928
|
* + If you don't call this API after the publisher enables the function of publishing multiple streams, you will receive by default the video stream with the largest resolution set by the publisher.
|
|
2911
2929
|
* + You should call this API in the room. If you want to call it before entering the room, you should set the `remoteVideoConfig` in the roomConfig` when calling [joinRoom](#joinroom).
|
|
@@ -2930,8 +2948,8 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
2930
2948
|
* Local client will get informed of the the volume of local user and each subscribed users via [onAudioVolumeIndication](104479#onaudiovolumeindication).
|
|
2931
2949
|
* @param interval The time interval for receiving a volume prompt callback.
|
|
2932
2950
|
* It is recommended to set to greater than or equal to 200 milliseconds; when less than 10 milliseconds, the behavior is undefined.
|
|
2933
|
-
* +
|
|
2934
|
-
* +
|
|
2951
|
+
* + `≤ 0`: Disable the volume prompt function.
|
|
2952
|
+
* + `> 0`: Enable the volume prompt function and set the time interval for receiving the volume prompt callback. In milliseconds.
|
|
2935
2953
|
* @region Room Management
|
|
2936
2954
|
*/
|
|
2937
2955
|
setAudioVolumeIndicationInterval: (interval?: number) => void;
|
|
@@ -2948,7 +2966,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
2948
2966
|
|
|
2949
2967
|
/**
|
|
2950
2968
|
* @brief Starts pushing media streams to CDN and sets the relevant configurations.
|
|
2951
|
-
* @param transcode
|
|
2969
|
+
* @param transcode Configurations to be set when pushing media streams to CDN.
|
|
2952
2970
|
* @return
|
|
2953
2971
|
* @notes + After calling this API, you will receive the pushing a mixed stream to CDN events via [onStreamMixingEvent](104479#onstreammixingevent).
|
|
2954
2972
|
* + Call [stopLiveTranscoding](#stoplivetranscoding) to stop pushing mixed streams to CDN.
|
|
@@ -2958,9 +2976,9 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
2958
2976
|
|
|
2959
2977
|
/**
|
|
2960
2978
|
* @brief Update configuration needed when pushing media streams to CDN.
|
|
2961
|
-
*
|
|
2962
|
-
* @param transcode
|
|
2963
|
-
* @
|
|
2979
|
+
* After calling [startLiveTranscoding](#startlivetranscoding) to enable the function of pushing streams to CDN, you can call this API to update the relevant configurations.
|
|
2980
|
+
* @param transcode Updated configurations. Some of the configurations cannot be updated. See [LiveTranscodeConfig](104481#livetranscodeconfig) for specific indications.
|
|
2981
|
+
* @return
|
|
2964
2982
|
*/
|
|
2965
2983
|
updateLiveTranscoding: (transcode: Partial<LiveTranscodeConfig>) => Promise<void>;
|
|
2966
2984
|
|
|
@@ -3048,18 +3066,17 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3048
3066
|
* @param config Configuration of the internal audio capture such as, disabling audio 3A processing. Refer to [MediaTrackConstraints](https://developer.mozilla.org/zh-CN/docs/Web/API/MediaTrackConstraints) for more details.
|
|
3049
3067
|
* @return
|
|
3050
3068
|
* @note You can call this API after creating the engine. We recommend to call this API before [startAudioCapture](#startaudiocapture).
|
|
3051
|
-
* @region Audio Management
|
|
3052
3069
|
*/
|
|
3053
3070
|
setAudioCaptureConfig: (config: TrackCaptureConfig) => Promise<void>;
|
|
3054
3071
|
|
|
3055
3072
|
/**
|
|
3056
3073
|
* @brief Configure the internal video capture. Different browser has its own default settings.
|
|
3057
|
-
* @param config Configuration
|
|
3074
|
+
* @param config Configuration for internal video capture. See [MediaTrackConstraints](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints).
|
|
3075
|
+
* The input `frameRate`, `height`, `width` are only desired values. The true resolution and framerate of the internal capture are the return values of [startVideoCapture](104478#startvideocapture).
|
|
3058
3076
|
* @return
|
|
3059
3077
|
* @note You can call this API after creating the engine. We recommend to call this API before [startVideoCapture](#startvideocapture).
|
|
3060
|
-
* @region Video Management
|
|
3061
3078
|
*/
|
|
3062
|
-
setVideoCaptureConfig: (config: TrackCaptureConfig) => Promise<
|
|
3079
|
+
setVideoCaptureConfig: (config: TrackCaptureConfig) => Promise<MediaTrackSettings>;
|
|
3063
3080
|
|
|
3064
3081
|
/**
|
|
3065
3082
|
* @brief Log in to the RTM server.
|
|
@@ -3150,18 +3167,19 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3150
3167
|
* @param cloudProxyInfo cloud proxy informarion list.
|
|
3151
3168
|
* @notes + Call this API before joining the room.
|
|
3152
3169
|
* + Start pre-call network detection after starting cloud proxy.
|
|
3153
|
-
* + After starting cloud proxy and connects the cloud proxy server successfully, receives [onCloudProxyConnected](104479#
|
|
3154
|
-
* + To stop cloud proxy, call [stopCloudProxy](#
|
|
3170
|
+
* + After starting cloud proxy and connects the cloud proxy server successfully, receives [onCloudProxyConnected](104479#oncloudproxyconnected).
|
|
3171
|
+
* + To stop cloud proxy, call [stopCloudProxy](#stopcloudproxy).
|
|
3155
3172
|
*/
|
|
3156
3173
|
startCloudProxy: (cloudProxyInfo: CloudProxyInfo) => void;
|
|
3157
3174
|
|
|
3158
3175
|
/**
|
|
3159
3176
|
* @brief Stop cloud proxy
|
|
3160
|
-
* @notes To start cloud proxy, call [startCloudProxy](#
|
|
3177
|
+
* @notes To start cloud proxy, call [startCloudProxy](#startcloudproxy).
|
|
3161
3178
|
*/
|
|
3162
3179
|
stopCloudProxy: () => void;
|
|
3163
3180
|
|
|
3164
3181
|
/**
|
|
3182
|
+
* @hidden
|
|
3165
3183
|
* @brief Starts publishing a public media stream.
|
|
3166
3184
|
* @param publicStreamId The public stream's ID.
|
|
3167
3185
|
* @param publicStreamParam The public stream's parameters.
|
|
@@ -3177,6 +3195,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3177
3195
|
startPushPublicStream: (publicStreamId: string, publicStreamParam: PublicStreamConfig) => Promise<void>;
|
|
3178
3196
|
|
|
3179
3197
|
/**
|
|
3198
|
+
* @hidden
|
|
3180
3199
|
* @brief Update the properties of the public stream published by the current user.
|
|
3181
3200
|
* Call [startPushPublicStream](#startpushpublicstream) to start publishing a public stream.
|
|
3182
3201
|
* @param publicStreamId The public stream's ID.
|
|
@@ -3187,6 +3206,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3187
3206
|
updatePublicStreamParam: (publicStreamId: string, publicStreamParam: Partial<PublicStreamConfig>) => Promise<void>;
|
|
3188
3207
|
|
|
3189
3208
|
/**
|
|
3209
|
+
* @hidden
|
|
3190
3210
|
* @type api
|
|
3191
3211
|
* @brief Stops publishing the public stream.
|
|
3192
3212
|
* Call [startPushPublicStream](#startpushpublicstream) to start publishing a public stream.
|
|
@@ -3197,6 +3217,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3197
3217
|
stopPushPublicStream: (publicStreamId: string) => Promise<void>;
|
|
3198
3218
|
|
|
3199
3219
|
/**
|
|
3220
|
+
* @hidden
|
|
3200
3221
|
* @brief Subscribes to a designated public stream.
|
|
3201
3222
|
* You can call this API to subscribe to a public stream whether you joined the room or not.
|
|
3202
3223
|
* @param publicStreamId The public stream's ID.
|
|
@@ -3209,6 +3230,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3209
3230
|
startPlayPublicStream: (publicStreamId: string) => Promise<void>;
|
|
3210
3231
|
|
|
3211
3232
|
/**
|
|
3233
|
+
* @hidden
|
|
3212
3234
|
* @brief Unsubscribes from a designated public stream.
|
|
3213
3235
|
* Call [startPlayPublicStream](#startplaypublicstream) to subscribe to the public stream.
|
|
3214
3236
|
* @param publicStreamId The public stream's ID.
|
|
@@ -3217,6 +3239,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3217
3239
|
stopPlayPublicStream: (publicStreamId: string) => Promise<void>;
|
|
3218
3240
|
|
|
3219
3241
|
/**
|
|
3242
|
+
* @hidden
|
|
3220
3243
|
* @brief Sets the player information and rendering mode for the public stream.
|
|
3221
3244
|
* @param publicStreamId The public stream's ID.
|
|
3222
3245
|
* @param videoPlayerOption Player information and rendering mode.
|
|
@@ -3249,7 +3272,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3249
3272
|
* @return + `true` Success
|
|
3250
3273
|
* + `false` Failure
|
|
3251
3274
|
* @notes + You must call this API before joining the room.
|
|
3252
|
-
* + After you enable the fallback, you will receive [onSimulcastSubscribeFallback](104479#onsimulcastsubscribefallback) and [onRemoteVideoSizeChanged](104479#onremotevideosizechanged
|
|
3275
|
+
* + After you enable the fallback, you will receive [onSimulcastSubscribeFallback](104479#onsimulcastsubscribefallback) and [onRemoteVideoSizeChanged](104479#onremotevideosizechanged) when the resolution of your subscribed stream is lowered or restored.
|
|
3253
3276
|
* + You can set media stream fallback using API or cloud configuration. The latter takes a higher priority.
|
|
3254
3277
|
*/
|
|
3255
3278
|
setSubscribeFallbackOption: (option: SubscribeFallbackOption) => boolean;
|
|
@@ -3285,6 +3308,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3285
3308
|
* @brief Start the capture and playback test for local audio devices.
|
|
3286
3309
|
* 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.
|
|
3287
3310
|
* @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.
|
|
3311
|
+
* @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.
|
|
3288
3312
|
* @return Resolve when the test ends.
|
|
3289
3313
|
* @notes + You can call this API whether the user is in a room.
|
|
3290
3314
|
* + 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.
|
|
@@ -3292,7 +3316,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3292
3316
|
* + Call [stopAudioDevicePlayTest](#stopaudiodeviceplaytest) to stop the test, including capturing and playing the recording.
|
|
3293
3317
|
* + This test performs locally and does not involve network connection testing.
|
|
3294
3318
|
*/
|
|
3295
|
-
startAudioDeviceRecordTest: (indicationInterval: number) => Promise<void>;
|
|
3319
|
+
startAudioDeviceRecordTest: (indicationInterval: number, onAutoplayFailed?: (resume: () => Promise<any>) => any) => Promise<void>;
|
|
3296
3320
|
|
|
3297
3321
|
/**
|
|
3298
3322
|
* @brief Call this API to stop recording in the test and start to play the recording.
|
|
@@ -3324,9 +3348,9 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3324
3348
|
* + 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.
|
|
3325
3349
|
* + 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.
|
|
3326
3350
|
* + We recommend to call RTC APIs to enable your app with the following capabilities instead of using mediaStreamTrack.
|
|
3327
|
-
* 1. Get the video resolution or audio volume of the local streams: [onLocalStreamStats](
|
|
3328
|
-
* 2. Get device IDs: [
|
|
3329
|
-
* 3. stop: [
|
|
3351
|
+
* 1. Get the video resolution or audio volume of the local streams: [onLocalStreamStats](104479#onlocalstreamstats)
|
|
3352
|
+
* 2. Get device IDs: [enumerateDevices](#enumeratedevices)
|
|
3353
|
+
* 3. stop: [stopAudioCapture](#stopaudiocapture), [stopVideoCapture](#stopvideocapture)
|
|
3330
3354
|
*/
|
|
3331
3355
|
getLocalStreamTrack: (streamIndex: StreamIndex, type: "video" | "audio") => MediaStreamTrack | undefined;
|
|
3332
3356
|
|
|
@@ -3921,7 +3945,7 @@ export interface ScreenEncoderConfig {
|
|
|
3921
3945
|
/**
|
|
3922
3946
|
* @brief Internal capture configuration for video & audio. Refer to [browser documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints) for more details.
|
|
3923
3947
|
*/
|
|
3924
|
-
export type TrackCaptureConfig = Omit<MediaTrackConstraints, "deviceId">;
|
|
3948
|
+
export declare type TrackCaptureConfig = Omit<MediaTrackConstraints, "deviceId">;
|
|
3925
3949
|
|
|
3926
3950
|
/**
|
|
3927
3951
|
* @brief The mirror type
|
|
@@ -3961,22 +3985,24 @@ export interface AudioPropertiesConfig {
|
|
|
3961
3985
|
}
|
|
3962
3986
|
|
|
3963
3987
|
/**
|
|
3964
|
-
* @brief Configurations to be set when pushing media streams to CDN
|
|
3988
|
+
* @brief Configurations to be set when pushing media streams to CDN.
|
|
3965
3989
|
*/
|
|
3966
3990
|
export interface LiveTranscodeConfig {
|
|
3967
3991
|
|
|
3968
3992
|
/**
|
|
3969
|
-
* @brief
|
|
3993
|
+
* @brief The URL for live transcoding. Only supports live transcoding via RTMP. The URL should match the regular expression `/^rtmps?:\/\//`.
|
|
3994
|
+
* This parameter cannot be updated while pushing stream to the CDN.
|
|
3970
3995
|
*/
|
|
3971
3996
|
url: string;
|
|
3972
3997
|
|
|
3973
3998
|
/**
|
|
3974
|
-
* Audio transcoding
|
|
3999
|
+
* @brief Audio transcoding configurations.
|
|
4000
|
+
* These parameters cannot be updated while pushing stream to the CDN.
|
|
3975
4001
|
*/
|
|
3976
4002
|
audio?: Partial<LiveTranscodeAudioConfig>;
|
|
3977
4003
|
|
|
3978
4004
|
/**
|
|
3979
|
-
* @brief Video transcoding
|
|
4005
|
+
* @brief Video transcoding configurations.
|
|
3980
4006
|
*/
|
|
3981
4007
|
video?: Partial<LiveTranscodeVideoConfig>;
|
|
3982
4008
|
|
|
@@ -3999,107 +4025,112 @@ export declare enum LogChannel {
|
|
|
3999
4025
|
}
|
|
4000
4026
|
|
|
4001
4027
|
/**
|
|
4002
|
-
* @brief Video transcoding
|
|
4028
|
+
* @brief Video transcoding configurations. With invalid or empty input, the configurations will be set as the default values.
|
|
4003
4029
|
*/
|
|
4004
4030
|
export interface LiveTranscodeVideoConfig {
|
|
4005
4031
|
|
|
4006
4032
|
/**
|
|
4007
|
-
* @brief
|
|
4033
|
+
* @brief The width (pixels) to be set. The range is [2, 1920], and must be an even number. The default value is 640 pixels.
|
|
4034
|
+
* If an odd number is set, the width will be adjusted to the next larger even number.
|
|
4008
4035
|
*/
|
|
4009
4036
|
width: number;
|
|
4010
4037
|
|
|
4011
4038
|
/**
|
|
4012
|
-
* @brief
|
|
4039
|
+
* @brief The height (pixels) to be set. The range is [2, 1920], and must be an even number. The default value is 360 pixels.
|
|
4040
|
+
* If an odd number is set, the height will be adjusted to the next larger even number.
|
|
4013
4041
|
*/
|
|
4014
4042
|
height: number;
|
|
4015
4043
|
|
|
4016
4044
|
/**
|
|
4017
|
-
* @brief The video
|
|
4045
|
+
* @brief The video codec. The default value is `H264`.
|
|
4046
|
+
* This parameter cannot be updated while pushing stream to the CDN.
|
|
4018
4047
|
*/
|
|
4019
|
-
codec:
|
|
4048
|
+
codec: TRANSCODING_VIDEO_CODEC;
|
|
4020
4049
|
|
|
4021
4050
|
/**
|
|
4022
|
-
* @brief
|
|
4051
|
+
* @brief The frame rate (FPS) in range of [1, 60]. The default value is 15 FPS.
|
|
4023
4052
|
*/
|
|
4024
4053
|
fps: number;
|
|
4025
4054
|
|
|
4026
4055
|
/**
|
|
4027
|
-
* @brief
|
|
4056
|
+
* @brief The time interval between I-frames (second) in range of [1, 5]. The default value is 2 seconds.
|
|
4057
|
+
* This parameter cannot be updated while pushing stream to the CDN.
|
|
4028
4058
|
*/
|
|
4029
4059
|
gop: number;
|
|
4030
4060
|
|
|
4031
4061
|
/**
|
|
4062
|
+
* @hidden
|
|
4032
4063
|
* @brief Whether to push streams with low latency. The default value is `true`.
|
|
4033
4064
|
*/
|
|
4034
|
-
lowLatency: boolean;
|
|
4035
4065
|
|
|
4036
4066
|
/**
|
|
4037
|
-
* @brief
|
|
4067
|
+
* @brief The bitrate (Kbps) in range of [1, 10000]. The default value is self-adaptive.
|
|
4038
4068
|
*/
|
|
4039
4069
|
kBitRate: number;
|
|
4040
4070
|
}
|
|
4041
4071
|
|
|
4042
4072
|
/**
|
|
4043
|
-
* @brief Audio transcoding
|
|
4073
|
+
* @brief Audio transcoding configurations. With invalid or empty input, the configurations will be set as the default values.
|
|
4044
4074
|
*/
|
|
4045
4075
|
export interface LiveTranscodeAudioConfig {
|
|
4046
4076
|
|
|
4047
4077
|
/**
|
|
4048
4078
|
* @brief Audio coding standard. Optional. The default value is `AAC`.
|
|
4049
4079
|
*/
|
|
4050
|
-
codec?:
|
|
4080
|
+
codec?: "AAC";
|
|
4051
4081
|
|
|
4052
4082
|
/**
|
|
4053
|
-
* @brief The bitrate (
|
|
4083
|
+
* @brief The bitrate (Kbps) in range of [32, 192]. Defaults to 64 Kbps.
|
|
4054
4084
|
*/
|
|
4055
4085
|
kBitRate: number;
|
|
4056
4086
|
|
|
4057
4087
|
/**
|
|
4058
|
-
* @brief The sample rate (
|
|
4088
|
+
* @brief The sample rate (Hz). Supported sample rates: 32,000Hz, 44,100Hz, 48,000Hz. Defaults to 48,000Hz.
|
|
4059
4089
|
*/
|
|
4060
4090
|
sampleRate: number;
|
|
4061
4091
|
|
|
4062
4092
|
/**
|
|
4063
|
-
* @brief The number of
|
|
4093
|
+
* @brief The number of channels. Supported channels: 1 (single channel), 2 (dual channel). Defaults to 2.
|
|
4064
4094
|
*/
|
|
4065
4095
|
channels: number;
|
|
4066
4096
|
|
|
4067
4097
|
/**
|
|
4068
|
-
* @brief
|
|
4098
|
+
* @brief AAC profile. Defaults to `LC`.
|
|
4069
4099
|
*/
|
|
4070
|
-
AACProfile:
|
|
4100
|
+
AACProfile: AAC_PROFILE;
|
|
4071
4101
|
}
|
|
4072
4102
|
|
|
4073
4103
|
/**
|
|
4074
|
-
* @brief
|
|
4104
|
+
* @brief The overall video layout of the mixed stream.
|
|
4075
4105
|
*/
|
|
4076
4106
|
export interface LiveTranscodeLayoutConfig {
|
|
4077
4107
|
|
|
4078
4108
|
/**
|
|
4079
|
-
* @brief
|
|
4109
|
+
* @brief List of user's video layout information. With invalid or empty input, the configurations will be set as the default values.
|
|
4080
4110
|
*/
|
|
4081
4111
|
regions: LiveTranscodeLayoutRegion[];
|
|
4082
4112
|
|
|
4083
4113
|
/**
|
|
4084
|
-
* @brief Data passed through from the App
|
|
4114
|
+
* @brief Data passed through from the App.
|
|
4085
4115
|
*/
|
|
4086
4116
|
appData: string;
|
|
4087
4117
|
|
|
4088
4118
|
/**
|
|
4089
|
-
* @brief Background
|
|
4119
|
+
* @brief Background-color of the mixed stream in hexadecimal values such as #FFFFFF and #000000. The default value is #000000 (black).
|
|
4120
|
+
* With invalid or empty input, the configurations will be set as the default values.
|
|
4090
4121
|
*/
|
|
4091
4122
|
backgroundColor: string;
|
|
4092
4123
|
}
|
|
4093
4124
|
|
|
4094
4125
|
/**
|
|
4095
|
-
* @brief Layout information for one of the video streams to be mixed
|
|
4126
|
+
* @brief Layout information for one of the video streams to be mixed.
|
|
4096
4127
|
*/
|
|
4097
4128
|
export interface LiveTranscodeLayoutRegion {
|
|
4098
4129
|
|
|
4099
4130
|
/**
|
|
4100
|
-
* @brief
|
|
4131
|
+
* @brief The opacity in range of (0.0, 1.0]. The lower value, the more transparent. The default value is 1.0.
|
|
4101
4132
|
*/
|
|
4102
|
-
alpha
|
|
4133
|
+
alpha?: number;
|
|
4103
4134
|
|
|
4104
4135
|
/**
|
|
4105
4136
|
* @brief ID of the user who published the stream
|
|
@@ -4107,43 +4138,43 @@ export interface LiveTranscodeLayoutRegion {
|
|
|
4107
4138
|
userId: string;
|
|
4108
4139
|
|
|
4109
4140
|
/**
|
|
4110
|
-
* @brief The
|
|
4141
|
+
* @brief The normalized horizontal coordinate value of the top left end vertex of the user's view, ranging within [0.0, 1.0). The default value is 0.0.
|
|
4111
4142
|
*/
|
|
4112
|
-
x
|
|
4143
|
+
x?: number;
|
|
4113
4144
|
|
|
4114
4145
|
/**
|
|
4115
|
-
* @brief The normalized
|
|
4146
|
+
* @brief The normalized vertical coordinate value of the top left end vertex of the user's view, ranging within [0.0, 1.0). The default value is 0.0.
|
|
4116
4147
|
*/
|
|
4117
|
-
y
|
|
4148
|
+
y?: number;
|
|
4118
4149
|
|
|
4119
4150
|
/**
|
|
4120
|
-
* @brief The
|
|
4151
|
+
* @brief The layer on which the video is rendered. The range is [0, 100]. 0 for the bottom layer, and 100 for the top layer. The default value is 0.
|
|
4121
4152
|
*/
|
|
4122
|
-
zorder
|
|
4153
|
+
zorder?: number;
|
|
4123
4154
|
|
|
4124
4155
|
/**
|
|
4125
|
-
* @brief The normalized width of the user's view, ranging within (0.0, 1.0]
|
|
4156
|
+
* @brief The normalized width of the user's view, ranging within (0.0, 1.0]. The default value is 1.0.
|
|
4126
4157
|
*/
|
|
4127
|
-
w
|
|
4158
|
+
w?: number;
|
|
4128
4159
|
|
|
4129
4160
|
/**
|
|
4130
|
-
* @brief The normalized height of the user's view, ranging within (0.0, 1.0]
|
|
4161
|
+
* @brief The normalized height of the user's view, ranging within (0.0, 1.0]. The default value is 1.0.
|
|
4131
4162
|
*/
|
|
4132
|
-
h
|
|
4163
|
+
h?: number;
|
|
4133
4164
|
|
|
4134
4165
|
/**
|
|
4135
|
-
* @brief The
|
|
4136
|
-
*
|
|
4137
|
-
*
|
|
4138
|
-
*
|
|
4166
|
+
* @brief The render mode to be set. The default value is 1. See the following options:
|
|
4167
|
+
* • 1: Fill and Crop. The video is enlarged or shrunk with fixed aspect ratio, and completely fills the windows. The region of the video which exceeds the window will be cropped.
|
|
4168
|
+
* • 2: Fit. The video is enlarged or shrunk with fixed aspect ratio, and is shown completely in the windows. The region of the window, which is not filled with video, is filled with black background.
|
|
4169
|
+
* • 3: Stretch. The video's aspect ratio is changed as it's automatically stretched to completely fill the bounding box it's contained in, but the whole image is visible.
|
|
4139
4170
|
*/
|
|
4140
4171
|
renderMode?: number;
|
|
4141
4172
|
|
|
4142
4173
|
/**
|
|
4143
4174
|
* @brief The content to be set. The default value is 0. See the following options:
|
|
4144
|
-
*
|
|
4145
|
-
*
|
|
4146
|
-
*
|
|
4175
|
+
* • 0: Push both audio and video stream.
|
|
4176
|
+
* • 1: Push audio stream only.
|
|
4177
|
+
* • 2: Push video stream only.
|
|
4147
4178
|
*/
|
|
4148
4179
|
contentControl?: number;
|
|
4149
4180
|
|
|
@@ -4153,9 +4184,10 @@ export interface LiveTranscodeLayoutRegion {
|
|
|
4153
4184
|
isScreenStream: boolean;
|
|
4154
4185
|
|
|
4155
4186
|
/**
|
|
4187
|
+
* @hidden
|
|
4156
4188
|
* @brief Whether the source user of the stream is a local user.
|
|
4157
4189
|
*/
|
|
4158
|
-
isLocalUser
|
|
4190
|
+
isLocalUser?: boolean;
|
|
4159
4191
|
}
|
|
4160
4192
|
|
|
4161
4193
|
/**
|
|
@@ -4240,7 +4272,7 @@ export declare enum PublicInterpolationMode {
|
|
|
4240
4272
|
/**
|
|
4241
4273
|
* @brief Layout configuration of a media stream
|
|
4242
4274
|
*/
|
|
4243
|
-
export type PublicStreamLayoutRegion = Omit<LiveTranscodeLayoutRegion, "isLocalUser" | "contentControl"> & {
|
|
4275
|
+
export declare type PublicStreamLayoutRegion = Omit<LiveTranscodeLayoutRegion, "isLocalUser" | "contentControl"> & {
|
|
4244
4276
|
|
|
4245
4277
|
/**
|
|
4246
4278
|
* @brief Room ID of the user that publishes the media stream.
|
|
@@ -4626,6 +4658,44 @@ export interface EngineConfig {
|
|
|
4626
4658
|
expectedIDC: string;
|
|
4627
4659
|
}
|
|
4628
4660
|
|
|
4661
|
+
/**
|
|
4662
|
+
* @type keytype
|
|
4663
|
+
* @brief Advanced Audio Coding (AAC) profile.
|
|
4664
|
+
*/
|
|
4665
|
+
export declare enum AAC_PROFILE {
|
|
4666
|
+
|
|
4667
|
+
/**
|
|
4668
|
+
* @brief (Default) AAC Low-Complexity profile (AAC-LC).
|
|
4669
|
+
*/
|
|
4670
|
+
LC = "LC",
|
|
4671
|
+
|
|
4672
|
+
/**
|
|
4673
|
+
* @brief HE-AAC v1 profile (AAC LC with SBR).
|
|
4674
|
+
*/
|
|
4675
|
+
HEv1 = "HEv1",
|
|
4676
|
+
|
|
4677
|
+
/**
|
|
4678
|
+
* @brief HE-AAC v2 profile (AAC LC with SBR and Parametric Stereo).
|
|
4679
|
+
*/
|
|
4680
|
+
HEv2 = "HEv2"
|
|
4681
|
+
}
|
|
4682
|
+
|
|
4683
|
+
/**
|
|
4684
|
+
* @brief The video codec.
|
|
4685
|
+
*/
|
|
4686
|
+
export declare enum TRANSCODING_VIDEO_CODEC {
|
|
4687
|
+
|
|
4688
|
+
/**
|
|
4689
|
+
* @brief (Default) H.264 format.
|
|
4690
|
+
*/
|
|
4691
|
+
H264 = "H264",
|
|
4692
|
+
|
|
4693
|
+
/**
|
|
4694
|
+
* @brief ByteVC1 format.
|
|
4695
|
+
*/
|
|
4696
|
+
H265 = "H265"
|
|
4697
|
+
}
|
|
4698
|
+
|
|
4629
4699
|
/**
|
|
4630
4700
|
* @brief Point-to-point text message
|
|
4631
4701
|
*/
|
|
@@ -4687,10 +4757,24 @@ export interface PublicStreamResultEvent {
|
|
|
4687
4757
|
|
|
4688
4758
|
/**
|
|
4689
4759
|
* @brief Event details of publishing the public stream.
|
|
4760
|
+
* + `200`: Published or subscribed successfully.
|
|
4761
|
+
* + `1191`: Invalid parameter(s). Please revise the paramter(s) and retry.
|
|
4762
|
+
* + `1192`: Error for the task at the server side. The server will retry automatically.
|
|
4763
|
+
* + `1193`: Unrecoverable error of publishing the public stream. Please start the task again.
|
|
4764
|
+
* + `1195`: Failed to publish the public stream. The SDK will retry that you have no need to handle.
|
|
4765
|
+
* + `1196`: Time-out error of publishing the public stream. The SDK will retry in 10 s. The SDK will stop trying again after three times of failures.
|
|
4690
4766
|
*/
|
|
4691
4767
|
message: string;
|
|
4692
4768
|
}
|
|
4769
|
+
|
|
4770
|
+
/**
|
|
4771
|
+
* @brief SDK successful connected to the cloud proxy server event.
|
|
4772
|
+
*/
|
|
4693
4773
|
export interface CloudProxyConnectedEvent {
|
|
4774
|
+
|
|
4775
|
+
/**
|
|
4776
|
+
* @brief The time interval to join the channel after SDK turned on cloud proxy.
|
|
4777
|
+
*/
|
|
4694
4778
|
interval: number;
|
|
4695
4779
|
}
|
|
4696
4780
|
declare const Config: {
|
|
@@ -4713,7 +4797,7 @@ declare function getParameter(key: keyof typeof Config): string | boolean | stri
|
|
|
4713
4797
|
* @detail 104478
|
|
4714
4798
|
*/
|
|
4715
4799
|
/**
|
|
4716
|
-
* @id
|
|
4800
|
+
* @id BytePlusRTC
|
|
4717
4801
|
* @list 104477
|
|
4718
4802
|
* @detail 104478
|
|
4719
4803
|
*/
|
|
@@ -4819,6 +4903,34 @@ export interface IVERTC {
|
|
|
4819
4903
|
* @region Engine Management
|
|
4820
4904
|
*/
|
|
4821
4905
|
getSupportedCodecs: () => Promise<string[]>;
|
|
4906
|
+
|
|
4907
|
+
/**
|
|
4908
|
+
* @brief Configures the logging level of local cache, and the maximum cache space that can be used.
|
|
4909
|
+
* @notes This API must be called before [createEngine](#createengine). If called after [createEngine](#createengine), it will take effect after the next [createEngine](#createengine) after [destroyEngine](#destroyengine).
|
|
4910
|
+
*/
|
|
4911
|
+
setLogConfig: ({ logLevel, LogfileSize }: {
|
|
4912
|
+
|
|
4913
|
+
/**
|
|
4914
|
+
* @brief The logging level of local cache.
|
|
4915
|
+
* • `none`: (Default) Turn off logging.
|
|
4916
|
+
* • `error`: Error.
|
|
4917
|
+
* • `warning`: Warning.
|
|
4918
|
+
* • `info`: Information.
|
|
4919
|
+
* • `trace`: Trace.
|
|
4920
|
+
*/
|
|
4921
|
+
logLevel?: "none" | "error" | "warning" | "info" | "trace";
|
|
4922
|
+
|
|
4923
|
+
/**
|
|
4924
|
+
* @brief The maximum cache space available for logs in MB. the range is 1 to 100 MB, and the default value is 10 MB.
|
|
4925
|
+
*/
|
|
4926
|
+
LogfileSize?: number;
|
|
4927
|
+
}) => void;
|
|
4928
|
+
|
|
4929
|
+
/**
|
|
4930
|
+
* @brief Download local cache generated file.
|
|
4931
|
+
* @param key The key of the local cache. If empty, download the logs from the current cache.
|
|
4932
|
+
*/
|
|
4933
|
+
downloadLog: (key?: string) => void;
|
|
4822
4934
|
}
|
|
4823
4935
|
declare class VERTC implements IVERTC {
|
|
4824
4936
|
getSdkVersion: () => string;
|
|
@@ -4843,6 +4955,11 @@ declare class VERTC implements IVERTC {
|
|
|
4843
4955
|
ErrorCode: typeof ErrorCode;
|
|
4844
4956
|
platform: string;
|
|
4845
4957
|
private _monitor;
|
|
4958
|
+
downloadLog: (key?: string | undefined) => void;
|
|
4959
|
+
setLogConfig: ({ logLevel, LogfileSize }: {
|
|
4960
|
+
logLevel?: "none" | "error" | "warning" | "info" | "trace" | undefined;
|
|
4961
|
+
LogfileSize?: number | undefined;
|
|
4962
|
+
}) => void;
|
|
4846
4963
|
}
|
|
4847
4964
|
declare const _default: VERTC;
|
|
4848
4965
|
|