diff --git a/ts/Private/AgoraBase.ts b/ts/Private/AgoraBase.ts index 44637533c..0bd74e78b 100644 --- a/ts/Private/AgoraBase.ts +++ b/ts/Private/AgoraBase.ts @@ -2241,11 +2241,11 @@ export enum RemoteVideoDownscaleLevel { */ export class AudioVolumeInfo { /** - * The user ID.In the local user's callback, uid = 0.In the remote users' callback, uid is the user ID of a remote user whose instantaneous volume is one of the three highest. + * The user ID.In the local user's callback, uid is 0.In the remote users' callback, uid is the user ID of a remote user whose instantaneous volume is the highest. */ uid?: number; /** - * The volume of the user. The value ranges between 0 (lowest volume) and 255 (highest volume). + * The volume of the user. The value ranges between 0 (the lowest volume) and 255 (the highest volume). If the local user enables audio capturing and calls muteLocalAudioStream and set it as true to mute, the value of volume indicates the volume of locally captured audio signal. */ volume?: number; /** @@ -2389,7 +2389,7 @@ export enum RtmpStreamPublishState { */ RtmpStreamPublishStateIdle = 0, /** - * 1: The SDK is connecting to Agora's streaming server and the CDN server. + * 1: The streaming server and CDN server are being connected. */ RtmpStreamPublishStateConnecting = 1, /** @@ -2397,16 +2397,15 @@ export enum RtmpStreamPublishState { */ RtmpStreamPublishStateRunning = 2, /** - * 3: The RTMP or RTMPS streaming is recovering. When exceptions occur to the CDN, or the streaming is interrupted, the SDK tries to resume RTMP or RTMPS streaming and returns this state.If the SDK successfully resumes the streaming, RtmpStreamPublishStateRunning(2) returns. - * If the streaming does not resume within 60 seconds or server errors occur, RtmpStreamPublishStateFailure(4) returns. You can also reconnect to the server by calling the stopRtmpStream method. + * 3: The RTMP or RTMPS streaming is recovering. When exceptions occur to the CDN, or the streaming is interrupted, the SDK tries to resume RTMP or RTMPS streaming and returns this state.If the SDK successfully resumes the streaming, RtmpStreamPublishStateRunning(2) returns.If the streaming does not resume within 60 seconds or server errors occur, RtmpStreamPublishStateFailure(4) returns. If you feel that 60 seconds is too long, you can also actively try to reconnect. */ RtmpStreamPublishStateRecovering = 3, /** - * 4: The RTMP or RTMPS streaming fails. See the errCode parameter for the detailed error information. + * 4: The RTMP or RTMPS streaming fails. After a failure, you can troubleshoot the cause of the error through the returned error code. */ RtmpStreamPublishStateFailure = 4, /** - * 5: The SDK is disconnecting from the Agora streaming server and CDN. When you call stopRtmpStream to stop the streaming normally, the SDK reports the streaming state as RtmpStreamPublishStateDisconnecting and RtmpStreamPublishStateIdle in sequence. + * 5: The SDK is disconnecting from the Agora streaming server and CDN. When you call stopRtmpStream to stop the Media Push normally, the SDK reports the Media Push state as RtmpStreamPublishStateDisconnecting and RtmpStreamPublishStateIdle in sequence. */ RtmpStreamPublishStateDisconnecting = 5, } @@ -2416,7 +2415,7 @@ export enum RtmpStreamPublishState { */ export enum RtmpStreamPublishErrorType { /** - * 0: The RTMP or RTMPS streaming publishes successfully. + * 0: The RTMP or RTMPS streaming has not started or has ended. */ RtmpStreamPublishErrorOk = 0, /** @@ -2428,11 +2427,11 @@ export enum RtmpStreamPublishErrorType { */ RtmpStreamPublishErrorEncryptedStreamNotAllowed = 2, /** - * 3: Timeout for the RTMP or RTMPS streaming. Try to publish the streaming again. + * 3: Timeout for the RTMP or RTMPS streaming. */ RtmpStreamPublishErrorConnectionTimeout = 3, /** - * 4: An error occurs in Agora's streaming server. Try to publish the streaming again. + * 4: An error occurs in Agora's streaming server. */ RtmpStreamPublishErrorInternalServerError = 4, /** @@ -2440,7 +2439,7 @@ export enum RtmpStreamPublishErrorType { */ RtmpStreamPublishErrorRtmpServerError = 5, /** - * 6: The RTMP or RTMPS streaming publishing requests are too frequent. + * 6: The RTMP or RTMPS streaming publishes too frequently. */ RtmpStreamPublishErrorTooOften = 6, /** @@ -2460,11 +2459,11 @@ export enum RtmpStreamPublishErrorType { */ RtmpStreamPublishErrorFormatNotSupported = 10, /** - * 11: The user role is not host, so the user cannot use the CDN live streaming function. Check your app code logic. + * 11: The user role is not host, so the user cannot use the CDN live streaming function. Check your application code logic. */ RtmpStreamPublishErrorNotBroadcaster = 11, /** - * 13: The updateRtmpTranscoding or setLiveTranscoding method is called to update the transcoding configuration in a scenario where there is streaming without transcoding. Check your application code logic. + * 13: The updateRtmpTranscoding method is called to update the transcoding configuration in a scenario where there is streaming without transcoding. Check your application code logic. */ RtmpStreamPublishErrorTranscodingNoMixStream = 13, /** @@ -2476,25 +2475,25 @@ export enum RtmpStreamPublishErrorType { */ RtmpStreamPublishErrorInvalidAppid = 15, /** - * @ignore + * 16: Your project does not have permission to use streaming services. Refer to Media Push to enable the Media Push permission. */ RtmpStreamPublishErrorInvalidPrivilege = 16, /** - * 100: The streaming has been stopped normally. After you call stopRtmpStream to stop streaming, the SDK returns this value. + * 100: The streaming has been stopped normally. After you stop the media push, the SDK returns this value. */ RtmpStreamUnpublishErrorOk = 100, } /** - * Events during the media push. + * Events during the Media Push. */ export enum RtmpStreamingEvent { /** - * 1: An error occurs when you add a background image or a watermark image in the media push. + * 1: An error occurs when you add a background image or a watermark image in the Media Push. */ RtmpStreamingEventFailedLoadImage = 1, /** - * 2: The streaming URL is already being used for CDN live streaming. If you want to start new streaming, use a new streaming URL. + * 2: The streaming URL is already being used for Media Push. If you want to start new streaming, use a new streaming URL. */ RtmpStreamingEventUrlAlreadyInUse = 2, /** @@ -3156,7 +3155,7 @@ export class VideoCanvas { */ sourceType?: VideoSourceType; /** - * The ID of the media player. You can get the Device ID by calling getMediaPlayerId . + * The ID of the media player. You can get the media player ID by calling getMediaPlayerId . */ mediaPlayerId?: number; /** @@ -3846,7 +3845,9 @@ export interface IAudioEncodedFrameObserver { * After calling registerAudioEncodedFrameObserver and setting the encoded audio as AudioEncodedFrameObserverPositionPlayback, you can get encoded audio data of all remote users through this callback. * * @param samplesPerSec Recording sample rate (Hz). - * @param channels The number of channels.1: Mono.2: Stereo. If the channel uses stereo, the data is interleaved. + * @param channels The number of channels. + * 1: Mono. + * 2: Stereo. If the channel uses stereo, the data is interleaved. * @param samplesPerChannel The number of samples per channel in the audio frame. * @param frameBuffer The audio buffer. * @param length The data length (byte). diff --git a/ts/Private/AgoraMediaBase.ts b/ts/Private/AgoraMediaBase.ts index 95d0f9e16..9f8762f57 100644 --- a/ts/Private/AgoraMediaBase.ts +++ b/ts/Private/AgoraMediaBase.ts @@ -696,10 +696,10 @@ export enum VideoModulePosition { */ export interface IAudioPcmFrameSink { /** - * Occurs each time the player receives an audio frame. - * After registering the audio frame observer, the callback occurs every time the player receives an audio frame, reporting the detailed information of the audio frame. + * Occurs each time the player receives a video frame. + * After registering the video frame observer, the callback occurs every time the player receives a video frame, reporting the detailed information of the video frame. * - * @param frame Audio frame information. See AudioPcmFrame . + * @param frame Video frame information. See VideoFrame . */ onFrame?(frame: AudioPcmFrame): void; } @@ -910,7 +910,7 @@ export class UserAudioSpectrumInfo { export interface IAudioSpectrumObserver { /** * Gets the statistics of a local audio spectrum. - * After successfully calling registerAudioSpectrumObserver to implement the onLocalAudioSpectrumcallback in IAudioSpectrumObserver and calling enableAudioSpectrumMonitor to enable audio spectrum monitoring, the SDK will trigger the callback as the time interval you set to report the received remote audio data spectrum. + * After successfully calling registerAudioSpectrumObserver to implement the onLocalAudioSpectrum callback in IAudioSpectrumObserver and calling enableAudioSpectrumMonitor to enable audio spectrum monitoring, the SDK will trigger the callback as the time interval you set to report the received remote audio data spectrum. * * @param data The audio spectrum data of the local user. See AudioSpectrumData . * @@ -979,7 +979,7 @@ export enum VideoFrameProcessMode { export interface IVideoFrameObserver { /** * Occurs each time the SDK receives a video frame captured by the local camera. - * After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. In this callback, you can get the video data captured by the local camera. You can then pre-process the data according to your scenarios.After pre-processing, you can send the processed video data back to the SDK through this callback.The video data that this callback gets has not been pre-processed, and is not watermarked, cropped, rotated or beautified.If the video data type you get is RGBA, the SDK does not support processing the data of the alpha channel. + * After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. In this callback, you can get the video data captured by the local camera. You can then pre-process the data according to your scenarios.Once the pre-processing is complete, you can directly modify videoFrame in this callback, and set the return value to true to send the modified video data to the SDK.The video data that this callback gets has not been pre-processed, and is not watermarked, cropped, rotated or beautified.If the video data type you get is RGBA, the SDK does not support processing the data of the alpha channel. * * @param videoFrame The video frame. See VideoFrame .The default value of the video frame data format obtained through this callback is as follows:macOS: YUV 420Windows: YUV 420 * @@ -995,16 +995,10 @@ export interface IVideoFrameObserver { * Occurs each time the SDK receives a video frame before encoding. * After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. In this callback, you can get the video data before encoding and then process the data according to your particular scenarios.After processing, you can send the processed video data back to the SDK in this callback.The video data that this callback gets has been preprocessed, with its content cropped and rotated, and the image enhanced. * - * @param videoFrame The video frame. See VideoFrame .The default value of the video frame data format obtained through this callback is as follows: - * macOS: YUV 420 - * Windows: YUV 420 + * @param videoFrame The video frame. See VideoFrame .The default value of the video frame data format obtained through this callback is as follows:macOS: YUV 420Windows: YUV 420 * * @returns - * When the video processing mode is ProcessModeReadOnly: - * true: Reserved for future use. - * false: Reserved for future use. When the video processing mode is ProcessModeReadWrite: - * true: Sets the SDK to receive the video frame. - * false: Sets the SDK to discard the video frame. + * When the video processing mode is ProcessModeReadOnly:true: Reserved for future use.false: Reserved for future use.When the video processing mode is ProcessModeReadWrite:true: Sets the SDK to receive the video frame.false: Sets the SDK to discard the video frame. */ onPreEncodeVideoFrame?( sourceType: VideoSourceType, @@ -1043,19 +1037,13 @@ export interface IVideoFrameObserver { ): boolean; /** - * Occurs each time the SDK receives a video frame captured by the screen. - * After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. In this callback, you can get the video data for screen sharing. You can then pre-process the data according to your scenarios.After pre-processing, you can send the processed video data back to the SDK through this callback.This callback does not support sending processed RGBA video data back to the SDK.The video data that this callback gets has not been pre-processed, and is not watermarked, cropped, rotated or beautified. + * Occurs each time the SDK receives a video frame before encoding. + * After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. In this callback, you can get the video data before encoding and then process the data according to your particular scenarios.After processing, you can send the processed video data back to the SDK in this callback.The video data that this callback gets has been preprocessed, with its content cropped and rotated, and the image enhanced. * - * @param videoFrame The video frame. See VideoFrame .The default value of the video frame data format obtained through this callback is as follows: - * macOS: YUV 420 - * Windows: YUV 420 + * @param videoFrame The video frame. See VideoFrame .The default value of the video frame data format obtained through this callback is as follows:macOS: YUV 420Windows: YUV 420 * * @returns - * When the video processing mode is ProcessModeReadOnly: - * true: Reserved for future use. - * false: Reserved for future use. When the video processing mode is ProcessModeReadWrite: - * true: Sets the SDK to receive the video frame. - * false: Sets the SDK to discard the video frame. + * When the video processing mode is ProcessModeReadOnly:true: Reserved for future use.false: Reserved for future use.When the video processing mode is ProcessModeReadWrite:true: Sets the SDK to receive the video frame.false: Sets the SDK to discard the video frame. */ onTranscodedVideoFrame?(videoFrame: VideoFrame): boolean; } diff --git a/ts/Private/IAgoraMediaEngine.ts b/ts/Private/IAgoraMediaEngine.ts index 58e27778f..18e73d2bb 100644 --- a/ts/Private/IAgoraMediaEngine.ts +++ b/ts/Private/IAgoraMediaEngine.ts @@ -126,7 +126,7 @@ export abstract class IMediaEngine { * Call this method before joining a channel. * * @param enabled Whether to enable the external audio source:true: Enable the external audio source.false: (Default) Disable the external audio source. - * @param sampleRate The sample rate (Hz) of the external audio which can be set as 8000, 16000, 32000, 44100, or 48000. + * @param sampleRate The sample rate (Hz) of the external audio source which can be set as 8000, 16000, 32000, 44100, or 48000. * @param channels The number of channels of the external audio source, which can be set as 1 (Mono) or 2 (Stereo). * @param sourceNumber The number of external audio sources. The value of this parameter should be larger than 0. The SDK creates a corresponding number of custom audio tracks based on this parameter value and names the audio tracks starting from 0. In ChannelMediaOptions , you can set publishCustomAudioSourceId to the audio track ID you want to publish. * @param localPlayback Whether to play the external audio source:true: Play the external audio source.false: (Default) Do not play the external source. diff --git a/ts/Private/IAgoraMediaPlayer.ts b/ts/Private/IAgoraMediaPlayer.ts index f152f932f..8268b2399 100644 --- a/ts/Private/IAgoraMediaPlayer.ts +++ b/ts/Private/IAgoraMediaPlayer.ts @@ -163,13 +163,7 @@ export abstract class IMediaPlayer { abstract setPlaybackSpeed(speed: number): number; /** - * Gets the detailed information of the media stream. - * Call this method after calling getStreamCount . - * - * @param index The index of the media stream. - * - * @returns - * If the call succeeds, returns the detailed information of the media stream. See PlayerStreamInfo .If the call fails, returns NULL. + * @ignore */ abstract selectAudioTrack(index: number): number; @@ -203,13 +197,7 @@ export abstract class IMediaPlayer { abstract takeScreenshot(filename: string): number; /** - * Gets the detailed information of the media stream. - * Call this method after calling getStreamCount . - * - * @param index The index of the media stream. - * - * @returns - * If the call succeeds, returns the detailed information of the media stream. See PlayerStreamInfo .If the call fails, returns NULL. + * @ignore */ abstract selectInternalSubtitle(index: number): number; @@ -332,9 +320,9 @@ export abstract class IMediaPlayer { ): number; /** - * Unregisters a receiver object for the encoded video image. + * Unregisters the encoded audio frame observer. * - * @param observer The video observer, reporting the reception of each video frame. See IVideoEncodedFrameObserver . + * @param observer The encoded audio observer. See IAudioEncodedFrameObserver . * * @returns * 0: Success.< 0: Failure. diff --git a/ts/Private/IAgoraMediaRecorder.ts b/ts/Private/IAgoraMediaRecorder.ts index 01caee1b8..7f349796d 100644 --- a/ts/Private/IAgoraMediaRecorder.ts +++ b/ts/Private/IAgoraMediaRecorder.ts @@ -22,13 +22,7 @@ export abstract class IMediaRecorder { abstract setMediaRecorderObserver(callback: IMediaRecorderObserver): number; /** - * Sets the video encoder configuration. - * Sets the encoder configuration for the local video.You can call this method either before or after joining a channel. If the user does not need to reset the video encoding properties after joining the channel, Agora recommends calling this method before enableVideo to reduce the time to render the first video frame. - * - * @param config Video profile. See VideoEncoderConfiguration . - * - * @returns - * 0: Success.< 0: Failure. + * @ignore */ abstract startRecording(config: MediaRecorderConfiguration): number; diff --git a/ts/Private/IAgoraMusicContentCenter.ts b/ts/Private/IAgoraMusicContentCenter.ts index abecbf5d5..4b17e5a26 100644 --- a/ts/Private/IAgoraMusicContentCenter.ts +++ b/ts/Private/IAgoraMusicContentCenter.ts @@ -108,13 +108,7 @@ export abstract class MusicChartCollection { abstract getCount(): number; /** - * Gets the detailed information of the media stream. - * Call this method after calling getStreamCount . - * - * @param index The index of the media stream. - * - * @returns - * If the call succeeds, returns the detailed information of the media stream. See PlayerStreamInfo .If the call fails, returns NULL. + * @ignore */ abstract get(index: number): MusicChartInfo; } diff --git a/ts/Private/IAgoraRtcEngine.ts b/ts/Private/IAgoraRtcEngine.ts index c85972d94..785440122 100644 --- a/ts/Private/IAgoraRtcEngine.ts +++ b/ts/Private/IAgoraRtcEngine.ts @@ -1038,7 +1038,7 @@ export class ChannelMediaOptions { */ publishCameraTrack?: boolean; /** - * @ignore + * Whether to publish the video captured by the second camera:true: Publish the video captured by the second camera.false: (Default) Do not publish the video captured by the second camera. */ publishSecondaryCameraTrack?: boolean; /** @@ -1046,7 +1046,7 @@ export class ChannelMediaOptions { */ publishMicrophoneTrack?: boolean; /** - * Whether to publish the video captured from the screen:true: Publish the video captured from the screen.false: (Default) Do not publish the video captured from the screen.This parameter applies to Android and iOS only. + * @ignore */ publishScreenCaptureVideo?: boolean; /** @@ -1121,7 +1121,6 @@ export class ChannelMediaOptions { defaultVideoStreamType?: VideoStreamType; /** * The channel profile. See ChannelProfileType . - * */ channelProfile?: ChannelProfileType; /** @@ -1367,10 +1366,10 @@ export interface IRtcEngineEventHandler { /** * Reports the volume information of users. - * By default, this callback is disabled. You can enable it by calling enableAudioVolumeIndication . Once this callback is enabled and users send streams in the channel, the SDK triggers the onAudioVolumeIndication callback according to the time interval set in enableAudioVolumeIndication. The SDK triggers two independent onAudioVolumeIndication callbacks simultaneously, which separately report the volume information of the local user who sends a stream and the remote users (up to three) whose instantaneous volume is the highest.Once this callback is enabled, if the local user calls the muteLocalAudioStream method for muting, the SDK continues to report the volume indication of the local user. In the callbacks triggered, the volume information about the local user is 0 If a remote user whose volume is one of the three highest in the channel stops publishing the audio stream for 20 seconds, the callback excludes this user's information; if all remote users stop publishing audio streams for 20 seconds, the SDK stops triggering the callback for remote users. + * By default, this callback is disabled. You can enable it by calling enableAudioVolumeIndication . Once this callback is enabled and users send streams in the channel, the SDK triggers the onAudioVolumeIndication callback according to the time interval set in enableAudioVolumeIndication. The SDK triggers two independent onAudioVolumeIndication callbacks simultaneously, which separately report the volume information of the local user who sends a stream and the remote users (up to three) whose instantaneous volume is the highest.Once this callback is enabled, if the local user calls the muteLocalAudioStream method to mute, the SDK continues to report the volume indication of the local user.If a remote user whose volume is one of the three highest in the channel stops publishing the audio stream for 20 seconds, the callback excludes this user's information; if all remote users stop publishing audio streams for 20 seconds, the SDK stops triggering the callback for remote users. * * @param connection The connection information. See RtcConnection . - * @param speakers The volume information of the users, see AudioVolumeInfo . An empty speakers array in the callback indicates that no remote user is in the channel or is sending a stream. + * @param speakers The volume information of the users. See AudioVolumeInfo . An empty speakers array in the callback indicates that no remote user is in the channel or is sending a stream. * @param speakerNumber The total number of users.In the callback for the local user, if the local user is sending streams, the value of speakerNumber is 1.In the callback for remote users, the value range of speakerNumber is [0,3]. If the number of remote users who send streams is greater than or equal to three, the value of speakerNumber is 3. * @param totalVolume The volume of the speaker. The value range is [0,255].In the callback for the local user, totalVolume is the volume of the local user who sends a stream.In the callback for remote users, totalVolume is the sum of the volume of all remote users (up to three) whose instantaneous volume is the highest. */ @@ -1401,11 +1400,11 @@ export interface IRtcEngineEventHandler { onRtcStats?(connection: RtcConnection, stats: RtcStats): void; /** - * Occurs when the audio device state changes. - * This callback notifies the application that the system's audio device state is changed. For example, a headset is unplugged from the device.This method is for Windows and macOS only. + * Occurs when the video device state changes. + * This callback reports the change of system video devices, such as being unplugged or removed. On a Windows device with an external camera for video capturing, the video disables once the external camera is unplugged.This callback is for Windows and macOS only. * * @param deviceId The device ID. - * @param deviceType The device type. See MediaDeviceType . + * @param deviceType Media device types. See MediaDeviceType . * @param deviceState Media device states. */ onAudioDeviceStateChanged?( @@ -1467,10 +1466,13 @@ export interface IRtcEngineEventHandler { ): void; /** - * Occurs when the token expires. - * When the token expires during a call, the SDK triggers this callback to remind the app to renew the token.Once you receive this callback, generate a new token on your app server, and call joinChannel to rejoin the channel. + * Stops recording the local audio and video. + * After calling startRecording , if you want to stop the recording, you must call this method; otherwise, the generated recording files may not be playable. * * @param connection The connection information. See RtcConnection . + * + * @returns + * 0: Success.< 0: Failure.-7: The method is called before IRtcEngine is initialized. */ onIntraRequestReceived?(connection: RtcConnection): void; @@ -1483,10 +1485,10 @@ export interface IRtcEngineEventHandler { onUplinkNetworkInfoUpdated?(info: UplinkNetworkInfo): void; /** - * Occurs when information related to the media player changes. - * When the information about the media player changes, the SDK triggers this callback. You can use this callback for troubleshooting. + * Occurs when the uplink network information changes. + * The SDK triggers this callback when the uplink network information changes.This callback only applies to scenarios where you push externally encoded video data in H.264 format to the SDK. * - * @param info Information related to the media player. See PlayerUpdatedInfo . + * @param info The uplink network information. See UplinkNetworkInfo . */ onDownlinkNetworkInfoUpdated?(info: DownlinkNetworkInfo): void; @@ -1494,15 +1496,7 @@ export interface IRtcEngineEventHandler { * Reports the last-mile network quality of the local user. * This callback reports the last-mile network conditions of the local user before the user joins the channel. Last mile refers to the connection between the local device and Agora's edge server.Before the user joins the channel, this callback is triggered by the SDK once startLastmileProbeTest is called and reports the last-mile network conditions of the local user. * - * @param quality The last-mile network quality. - * QualityUnknown(0): The quality is unknown. - * QualityExcellent(1): The quality is excellent. - * QualityGood(2): The network quality seems excellent, but the bitrate can be slightly lower than excellent. - * QualityPoor(3): Users can feel the communication is slightly impaired. - * QualityBad(4): Users cannot communicate smoothly. - * QualityVbad(5): The quality is so bad that users can barely communicate. - * QualityDown(6): The network is down, and users cannot communicate at all. - * See QualityType . + * @param quality The last-mile network quality. QualityUnknown(0): The quality is unknown.QualityExcellent(1): The quality is excellent.QualityGood(2): The network quality seems excellent, but the bitrate can be slightly lower than excellent.QualityPoor(3): Users can feel the communication is slightly impaired.QualityBad(4): Users cannot communicate smoothly.QualityVbad(5): The quality is so bad that users can barely communicate.QualityDown(6): The network is down, and users cannot communicate at all.See QualityType . */ onLastmileQuality?(quality: QualityType): void; @@ -1734,11 +1728,11 @@ export interface IRtcEngineEventHandler { onRemoteAudioStats?(connection: RtcConnection, stats: RemoteAudioStats): void; /** - * Occurs when a user leaves a channel. - * This callback notifies the app that the user leaves the channel by calling leaveChannel . From this callback, the app can get information such as the call duration and quality statistics. + * Reports the statistics of the video stream sent by each remote users. + * Reports the statistics of the video stream from the remote users. The SDK triggers this callback once every two seconds for each remote user. If a channel has multiple users/hosts sending video streams, the SDK triggers this callback as many times. * * @param connection The connection information. See RtcConnection . - * @param stats The statistics of the call. See RtcStats . + * @param stats Statistics of the remote video stream. */ onLocalVideoStats?(connection: RtcConnection, stats: LocalVideoStats): void; @@ -2054,12 +2048,12 @@ export interface IRtcEngineEventHandler { ): void; /** - * Occurs when the media push state changes. - * When the media push state changes, the SDK triggers this callback and reports the URL address and the current state of the media push. This callback indicates the state of the media push. When exceptions occur, you can troubleshoot issues by referring to the detailed error descriptions in the error code parameter. + * Occurs when the state of Media Push changes. + * When the state of Media Push changes, the SDK triggers this callback and reports the URL address and the current state of the Media Push. This callback indicates the state of the Media Push. When exceptions occur, you can troubleshoot issues by referring to the detailed error descriptions in the error code parameter. * - * @param url The URL address where the state of the media push changes. - * @param state The current state of the media push. See RtmpStreamPublishState . - * @param errCode The detailed error information for the media push. See RtmpStreamPublishErrorType . + * @param url The URL address where the state of the Media Push changes. + * @param state The current state of the Media Push. See RtmpStreamPublishState . + * @param errCode The detailed error information for the Media Push. See RtmpStreamPublishErrorType . */ onRtmpStreamingStateChanged?( url: string, @@ -2068,10 +2062,10 @@ export interface IRtcEngineEventHandler { ): void; /** - * Reports events during the media push. + * Reports events during the Media Push. * - * @param url The URL of media push. - * @param eventCode The event code of media push. See RtmpStreamingEvent . + * @param url The URL for Media Push. + * @param eventCode The event code of Media Push. RtmpStreamingEvent */ onRtmpStreamingEvent?(url: string, eventCode: RtmpStreamingEvent): void; @@ -2489,7 +2483,16 @@ export class RtcEngineContext { */ areaCode?: number; /** - * The SDK log files are: agorasdk.log, agorasdk.1.log, agorasdk.2.log, agorasdk.3.log, and agorasdk.4.log.The API call log files are: agoraapi.log, agoraapi.1.log, agoraapi.2.log, agoraapi.3.log, and agoraapi.4.log.The default size for each SDK log file is 1,024 KB; the default size for each API call log file is 2,048 KB. These log files are encoded in UTF-8.The SDK writes the latest logs in agorasdk.log or agoraapi.log.When agorasdk.log is full, the SDK processes the log files in the following order:Delete the agorasdk.4.log file (if any).Rename agorasdk.3.log to agorasdk.4.log.Rename agorasdk.2.log to agorasdk.3.log.Rename agorasdk.1.log to agorasdk.2.log.Create a new agorasdk.log file.The overwrite rules for the agoraapi.log file are the same as for agorasdk.log.Sets the log file size. See LogConfig .By default, the SDK generates five SDK log files and five API call log files with the following rules: + * The SDK log files are: agorasdk.log, agorasdk.1.log, agorasdk.2.log, agorasdk.3.log, and agorasdk.4.log. + * The API call log files are: agoraapi.log, agoraapi.1.log, agoraapi.2.log, agoraapi.3.log, and agoraapi.4.log. + * The default size for each SDK log file is 1,024 KB; the default size for each API call log file is 2,048 KB. These log files are encoded in UTF-8. + * The SDK writes the latest logs in agorasdk.log or agoraapi.log. + * When agorasdk.log is full, the SDK processes the log files in the following order: + * Delete the agorasdk.4.log file (if any). + * Rename agorasdk.3.log to agorasdk.4.log. + * Rename agorasdk.2.log to agorasdk.3.log. + * Rename agorasdk.1.log to agorasdk.2.log. + * Create a new agorasdk.log file. The overwrite rules for the agoraapi.log file are the same as for agorasdk.log. Sets the log file size. See LogConfig .By default, the SDK generates five SDK log files and five API call log files with the following rules: */ logConfig?: LogConfig; /** @@ -2811,7 +2814,9 @@ export abstract class IRtcEngine { /** * Sets channel options and leaves the channel. - * If you call release immediately after calling this method, the SDK does not trigger the onLeaveChannel callback.If you have called joinChannelEx to join multiple channels, calling this method will leave the channels when calling joinChannel and joinChannelEx at the same time.This method will release all resources related to the session, leave the channel, that is, hang up or exit the call. This method can be called whether or not a call is currently in progress.After joining the channel, you must call this method or to end the call, otherwise, the next call cannot be started.This method call is asynchronous. When this method returns, it does not necessarily mean that the user has left the channel. After actually leaving the channel, the local user triggers the onLeaveChannel callback; after the user in the communication scenario and the host in the live streaming scenario leave the channel, the remote user triggers the onUserOffline callback. + * If you call release immediately after calling this method, the SDK does not trigger the onLeaveChannel callback. + * If you have called joinChannelEx to join multiple channels, calling this method will leave the channels when calling joinChannel and joinChannelEx at the same time. + * This method will release all resources related to the session, leave the channel, that is, hang up or exit the call. This method can be called whether or not a call is currently in progress.After joining the channel, you must call this method or to end the call, otherwise, the next call cannot be started.This method call is asynchronous. When this method returns, it does not necessarily mean that the user has left the channel. After actually leaving the channel, the local user triggers the onLeaveChannel callback; after the user in the communication scenario and the host in the live streaming scenario leave the channel, the remote user triggers the onUserOffline callback. * * @param options The options for leaving the channel. See LeaveChannelOptions . * @@ -3154,13 +3159,13 @@ export abstract class IRtcEngine { abstract muteAllRemoteAudioStreams(mute: boolean): number; /** - * Stops or resumes subscribing to the video streams of all remote users. - * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.Call this method after joining a channel.If you do not want to subscribe the video streams of remote users before joining a channel, you can call joinChannel and set autoSubscribeVideo as false. + * Stops or resumes subscribing to the audio streams of all remote users. + * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.Call this method after joinChannel .When using the spatial audio effect, if you need to set whether to stop subscribing to the audio streams of all remote users, Agora recommends calling this method instead of the muteAllRemoteAudioStreams method in IRtcEngine .After calling this method, you need to call updateSelfPosition and updateRemotePosition to update the spatial location of the local user and the remote user; otherwise, the settings in this method do not take effect. * - * @param mute Whether to stop subscribing to the video streams of all remote users.true: Stop subscribing to the video streams of all remote users.false: (Default) Subscribe to the audio streams of all remote users by default. + * @param mute Whether to stop subscribing to the audio streams of all remote users:true: Stop subscribing to the audio streams of all remote users.false: Subscribe to the audio streams of all remote users. * * @returns - * 0: Success. < 0: Failure. + * 0: Success.< 0: Failure. */ abstract setDefaultMuteAllRemoteAudioStreams(mute: boolean): number; @@ -3210,13 +3215,13 @@ export abstract class IRtcEngine { abstract muteAllRemoteVideoStreams(mute: boolean): number; /** - * Stops or resumes subscribing to the video streams of all remote users. - * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.Call this method after joining a channel.If you do not want to subscribe the video streams of remote users before joining a channel, you can call joinChannel and set autoSubscribeVideo as false. + * Stops or resumes subscribing to the audio streams of all remote users. + * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.Call this method after joinChannel .When using the spatial audio effect, if you need to set whether to stop subscribing to the audio streams of all remote users, Agora recommends calling this method instead of the muteAllRemoteAudioStreams method in IRtcEngine .After calling this method, you need to call updateSelfPosition and updateRemotePosition to update the spatial location of the local user and the remote user; otherwise, the settings in this method do not take effect. * - * @param mute Whether to stop subscribing to the video streams of all remote users.true: Stop subscribing to the video streams of all remote users.false: (Default) Subscribe to the audio streams of all remote users by default. + * @param mute Whether to stop subscribing to the audio streams of all remote users:true: Stop subscribing to the audio streams of all remote users.false: Subscribe to the audio streams of all remote users. * * @returns - * 0: Success. < 0: Failure. + * 0: Success.< 0: Failure. */ abstract setDefaultMuteAllRemoteVideoStreams(mute: boolean): number; @@ -3264,8 +3269,7 @@ export abstract class IRtcEngine { /** * Sets the default stream type of subscrption for remote video streams. - * The SDK enables the low-quality video stream auto mode on the sender by default (not actively sending low-quality video streams). The host at the receiving end can call this method to initiate a low-quality video stream stream request on the receiving end, and the sender automatically switches to the low-quality video stream mode after receiving the request. - * Under limited network conditions, if the publisher has not disabled the dual-stream mode using enableDualStreamMode (false), the receiver can choose to receive either the high-quality video stream or the low-quality video stream. The high-quality video stream has a higher resolution and bitrate, and the low-quality video stream has a lower resolution and bitrate.By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. This method allows the app to adjust the corresponding video stream type based on the size of the video window to reduce the bandwidth and resources. The aspect ratio of the low-quality video stream is the same as the high-quality video stream. Once the resolution of the high-quality video stream is set, the system automatically sets the resolution, frame rate, and bitrate of the low-quality video stream.The result of this method returns in the onApiCallExecuted callback.Call this method before joining a channel. The SDK does not support changing the default subscribed video stream type after joining a channel.If you call both this method and setRemoteVideoStreamType , the SDK applies the settings in the setRemoteVideoStreamType method. + * The SDK enables the low-quality video stream auto mode on the sender by default (not actively sending low-quality video streams). The host at the receiving end can call this method to initiate a low-quality video stream stream request on the receiving end, and the sender automatically switches to the low-quality video stream mode after receiving the request.Under limited network conditions, if the publisher has not disabled the dual-stream mode using enableDualStreamMode (false), the receiver can choose to receive either the high-quality video stream or the low-quality video stream. The high-quality video stream has a higher resolution and bitrate, and the low-quality video stream has a lower resolution and bitrate.By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. This method allows the app to adjust the corresponding video stream type based on the size of the video window to reduce the bandwidth and resources. The aspect ratio of the low-quality video stream is the same as the high-quality video stream. Once the resolution of the high-quality video stream is set, the system automatically sets the resolution, frame rate, and bitrate of the low-quality video stream.The result of this method returns in the onApiCallExecuted callback.Call this method before joining a channel. The SDK does not support changing the default subscribed video stream type after joining a channel.If you call both this method and setRemoteVideoStreamType , the SDK applies the settings in the setRemoteVideoStreamType method. * * @param streamType The default video-stream type. See VideoStreamType . * @@ -3291,9 +3295,7 @@ export abstract class IRtcEngine { /** * Sets the allowlist of subscriptions for audio streams. - * You can call this method to specify the audio streams of a user that you want to subscribe to.If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect. - * You can call this method either before or after joining a channel. - * The allowlist is not affected by the setting in muteRemoteAudioStream , muteAllRemoteAudioStreams and autoSubscribeAudio in ChannelMediaOptions .Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel. + * You can call this method to specify the audio streams of a user that you want to subscribe to.If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.You can call this method either before or after joining a channel.The allowlist is not affected by the setting in muteRemoteAudioStream , muteAllRemoteAudioStreams and autoSubscribeAudio in ChannelMediaOptions .Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel. * * @param uidList The user ID list of users that you want to subscribe to.If you want to specify the audio streams of a user for subscription, add the user ID in this list. If you want to remove a user from the allowlist, you need to call the setSubscribeAudioAllowlist method to update the user ID list; this means you only add the uid of users that you want to subscribe to in the new user ID list. * @param uidNumber The number of users in the user ID list. @@ -3307,12 +3309,10 @@ export abstract class IRtcEngine { ): number; /** - * Sets the allowlist of subscriptions for audio streams. - * You can call this method to specify the audio streams of a user that you want to subscribe to.If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect. - * You can call this method either before or after joining a channel. - * The allowlist is not affected by the setting in muteRemoteAudioStream , muteAllRemoteAudioStreams and autoSubscribeAudio in ChannelMediaOptions .Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel. + * Set the blocklist of subscriptions for audio streams. + * You can call this method to specify the audio streams of a user that you do not want to subscribe to.You can call this method either before or after joining a channel.The blocklist is not affected by the setting in muteRemoteAudioStream , muteAllRemoteAudioStreams , and autoSubscribeAudio in ChannelMediaOptions .Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect. * - * @param uidList The user ID list of users that you want to subscribe to.If you want to specify the audio streams of a user for subscription, add the user ID in this list. If you want to remove a user from the allowlist, you need to call the setSubscribeAudioAllowlist method to update the user ID list; this means you only add the uid of users that you want to subscribe to in the new user ID list. + * @param uidList The user ID list of users that you do not want to subscribe to.If you want to specify the audio streams of a user that you do not want to subscribe to, add the user ID in this list. If you want to remove a user from the blocklist, you need to call the setSubscribeAudioBlocklist method to update the user ID list; this means you only add the uid of users that you do not want to subscribe to in the new user ID list. * @param uidNumber The number of users in the user ID list. * * @returns @@ -3324,12 +3324,10 @@ export abstract class IRtcEngine { ): number; /** - * Sets the allowlist of subscriptions for audio streams. - * You can call this method to specify the audio streams of a user that you want to subscribe to.If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect. - * You can call this method either before or after joining a channel. - * The allowlist is not affected by the setting in muteRemoteAudioStream , muteAllRemoteAudioStreams and autoSubscribeAudio in ChannelMediaOptions .Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel. + * Set the blocklist of subscriptions for audio streams. + * You can call this method to specify the audio streams of a user that you do not want to subscribe to.You can call this method either before or after joining a channel.The blocklist is not affected by the setting in muteRemoteAudioStream , muteAllRemoteAudioStreams , and autoSubscribeAudio in ChannelMediaOptions .Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel.If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect. * - * @param uidList The user ID list of users that you want to subscribe to.If you want to specify the audio streams of a user for subscription, add the user ID in this list. If you want to remove a user from the allowlist, you need to call the setSubscribeAudioAllowlist method to update the user ID list; this means you only add the uid of users that you want to subscribe to in the new user ID list. + * @param uidList The user ID list of users that you do not want to subscribe to.If you want to specify the audio streams of a user that you do not want to subscribe to, add the user ID in this list. If you want to remove a user from the blocklist, you need to call the setSubscribeAudioBlocklist method to update the user ID list; this means you only add the uid of users that you do not want to subscribe to in the new user ID list. * @param uidNumber The number of users in the user ID list. * * @returns @@ -3407,10 +3405,13 @@ export abstract class IRtcEngine { abstract destroyMediaPlayer(mediaPlayer: IMediaPlayer): number; /** - * Occurs when the token expires. - * When the token expires during a call, the SDK triggers this callback to remind the app to renew the token.Once you receive this callback, generate a new token on your app server, and call joinChannel to rejoin the channel. + * Stops recording the local audio and video. + * After calling startRecording , if you want to stop the recording, you must call this method; otherwise, the generated recording files may not be playable. * * @param connection The connection information. See RtcConnection . + * + * @returns + * 0: Success.< 0: Failure.-7: The method is called before IRtcEngine is initialized. */ abstract createLocalMediaRecorder(connection: RtcConnection): IMediaRecorder; @@ -3478,13 +3479,7 @@ export abstract class IRtcEngine { abstract resumeAudioMixing(): number; /** - * Gets the detailed information of the media stream. - * Call this method after calling getStreamCount . - * - * @param index The index of the media stream. - * - * @returns - * If the call succeeds, returns the detailed information of the media stream. See PlayerStreamInfo .If the call fails, returns NULL. + * @ignore */ abstract selectAudioTrack(index: number): number; @@ -3781,10 +3776,7 @@ export abstract class IRtcEngine { * Retrieves the duration of the audio effect file. * Call this method after joining a channel. * - * @param filePath File path: - * Windows: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example: C:\music\audio.mp4. - * macOS: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example: /var/mobile/Containers/Data/audio.mp4. - * + * @param filePath File path:Windows: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example: C:\music\audio.mp4.macOS: The absolute path or URL address (including the suffixes of the filename) of the audio effect file. For example: /var/mobile/Containers/Data/audio.mp4. * * @returns * The total duration (ms) of the specified audio effect file, if the method call succeeds.< 0: Failure. @@ -4258,9 +4250,9 @@ export abstract class IRtcEngine { ): number; /** - * Unregisters a receiver object for the encoded video image. + * Unregisters the encoded audio frame observer. * - * @param observer The video observer, reporting the reception of each video frame. See IVideoEncodedFrameObserver . + * @param observer The encoded audio observer. See IAudioEncodedFrameObserver . * * @returns * 0: Success.< 0: Failure. @@ -4294,10 +4286,7 @@ export abstract class IRtcEngine { * Adjusts the playback signal volume of all remote users. * This method adjusts the playback volume that is the mixed volume of all remote users.You can call this method either before or after joining a channel. * - * @param volume The volume of the user. The value range is [0,400]. - * 0: Mute. - * 100: (Default) The original volume. - * 400: Four times the original volume (amplifying the audio signals by four times). + * @param volume The volume of the user. The value range is [0,400].0: Mute.100: (Default) The original volume.400: Four times the original volume (amplifying the audio signals by four times). * * @returns * 0: Success. < 0: Failure. @@ -4431,10 +4420,7 @@ export abstract class IRtcEngine { * * @param provider The name of the extension provider. * @param extension The name of the extension. - * @param type Type of media source. See MediaSourceType .In this method, this parameter supports only the following two settings: - * The default value is UnknownMediaSource. - * If you want to use the second camera to capture video, set this parameter to SecondaryCameraSource. - * + * @param type Type of media source. See MediaSourceType .In this method, this parameter supports only the following two settings:The default value is UnknownMediaSource.If you want to use the second camera to capture video, set this parameter to SecondaryCameraSource. * * @returns * 0: Success.< 0: Failure. @@ -4506,13 +4492,7 @@ export abstract class IRtcEngine { ): string; /** - * Sets the video encoder configuration. - * Sets the encoder configuration for the local video.You can call this method either before or after joining a channel. If the user does not need to reset the video encoding properties after joining the channel, Agora recommends calling this method before enableVideo to reduce the time to render the first video frame. - * - * @param config Video profile. See VideoEncoderConfiguration . - * - * @returns - * 0: Success.< 0: Failure. + * @ignore */ abstract setCameraCapturerConfiguration( config: CameraCapturerConfiguration @@ -4588,10 +4568,10 @@ export abstract class IRtcEngine { abstract setCameraZoomFactor(factor: number): number; /** - * Enables interoperability with the Agora Web SDK (applicable only in the live streaming scenarios). - * Deprecated:The SDK automatically enables interoperability with the Web SDK, so you no longer need to call this method.You can call this method to enable or disable interoperability with the Agora Web SDK. If a channel has Web SDK users, ensure that you call this method, or the video of the Native user will be a black screen for the Web user.This method is only applicable in live streaming scenarios, and interoperability is enabled by default in communication scenarios. + * Enables/Disables the local video capture. + * This method disables or re-enables the local video capture, and does not affect receiving the remote video stream.After calling enableVideo , the local video capture is enabled by default. You can call enableLocalVideo (false) to disable the local video capture. If you want to re-enable the local video capture, call enableLocalVideo(true).After the local video capturer is successfully disabled or re-enabled, the SDK triggers the onRemoteVideoStateChanged callback on the remote client.You can call this method either before or after joining a channel.This method enables the internal engine and is valid after leaving the channel. * - * @param enabled Whether to enable interoperability:true: Enable interoperability.false: (Default) Disable interoperability. + * @param enabled Whether to enable the local video capture.true: (Default) Enable the local video capture.false: Disable the local video capture. Once the local video is disabled, the remote users cannot receive the video stream of the local user, while the local user can still receive the video streams of remote users. When set to false, this method does not require a local camera. * * @returns * 0: Success.< 0: Failure. @@ -4617,10 +4597,10 @@ export abstract class IRtcEngine { abstract setCameraTorchOn(isOn: boolean): number; /** - * Enables interoperability with the Agora Web SDK (applicable only in the live streaming scenarios). - * Deprecated:The SDK automatically enables interoperability with the Web SDK, so you no longer need to call this method.You can call this method to enable or disable interoperability with the Agora Web SDK. If a channel has Web SDK users, ensure that you call this method, or the video of the Native user will be a black screen for the Web user.This method is only applicable in live streaming scenarios, and interoperability is enabled by default in communication scenarios. + * Enables/Disables the local video capture. + * This method disables or re-enables the local video capture, and does not affect receiving the remote video stream.After calling enableVideo , the local video capture is enabled by default. You can call enableLocalVideo (false) to disable the local video capture. If you want to re-enable the local video capture, call enableLocalVideo(true).After the local video capturer is successfully disabled or re-enabled, the SDK triggers the onRemoteVideoStateChanged callback on the remote client.You can call this method either before or after joining a channel.This method enables the internal engine and is valid after leaving the channel. * - * @param enabled Whether to enable interoperability:true: Enable interoperability.false: (Default) Disable interoperability. + * @param enabled Whether to enable the local video capture.true: (Default) Enable the local video capture.false: Disable the local video capture. Once the local video is disabled, the remote users cannot receive the video stream of the local user, while the local user can still receive the video streams of remote users. When set to false, this method does not require a local camera. * * @returns * 0: Success.< 0: Failure. @@ -4646,10 +4626,10 @@ export abstract class IRtcEngine { abstract isCameraAutoExposureFaceModeSupported(): boolean; /** - * Enables interoperability with the Agora Web SDK (applicable only in the live streaming scenarios). - * Deprecated:The SDK automatically enables interoperability with the Web SDK, so you no longer need to call this method.You can call this method to enable or disable interoperability with the Agora Web SDK. If a channel has Web SDK users, ensure that you call this method, or the video of the Native user will be a black screen for the Web user.This method is only applicable in live streaming scenarios, and interoperability is enabled by default in communication scenarios. + * Enables/Disables the local video capture. + * This method disables or re-enables the local video capture, and does not affect receiving the remote video stream.After calling enableVideo , the local video capture is enabled by default. You can call enableLocalVideo (false) to disable the local video capture. If you want to re-enable the local video capture, call enableLocalVideo(true).After the local video capturer is successfully disabled or re-enabled, the SDK triggers the onRemoteVideoStateChanged callback on the remote client.You can call this method either before or after joining a channel.This method enables the internal engine and is valid after leaving the channel. * - * @param enabled Whether to enable interoperability:true: Enable interoperability.false: (Default) Disable interoperability. + * @param enabled Whether to enable the local video capture.true: (Default) Enable the local video capture.false: Disable the local video capture. Once the local video is disabled, the remote users cannot receive the video stream of the local user, while the local user can still receive the video streams of remote users. When set to false, this method does not require a local camera. * * @returns * 0: Success.< 0: Failure. @@ -4739,14 +4719,18 @@ export abstract class IRtcEngine { /** * Shares the whole or part of a window by specifying the window ID. - * There are two ways to start screen sharing, you can choose one according to your needs:Call this method before joining a channel, and then call joinChannel to join a channel and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing.Call this method after joining a channel, and then call updateChannelMediaOptions and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing.This method shares a window or part of the window. You need to specify the ID of the window to be shared.This method applies to the macOS and Windows platforms only.The window sharing feature of the Agora SDK relies on WGC (Windows Graphics Capture) or GDI (Graphics Device Interface) capture, and WGC cannot be set to disable mouse capture on systems earlier than Windows 10 2004. Therefore, captureMouseCursor(false) might not work when you start window sharing on a device with a system earlier than Windows 10 2004. See ScreenCaptureParameters .This method supports window sharing of UWP (Universal Windows Platform) applications. Agora tests the mainstream UWP applications by using the lastest SDK, see details as follows: + * There are two ways to start screen sharing, you can choose one according to your needs: + * Call this method before joining a channel, and then call joinChannel to join a channel and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing. + * Call this method after joining a channel, and then call updateChannelMediaOptions and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing. This method shares a window or part of the window. You need to specify the ID of the window to be shared.This method applies to the macOS and Windows platforms only.The window sharing feature of the Agora SDK relies on WGC (Windows Graphics Capture) or GDI (Graphics Device Interface) capture, and WGC cannot be set to disable mouse capture on systems earlier than Windows 10 2004. Therefore, captureMouseCursor(false) might not work when you start window sharing on a device with a system earlier than Windows 10 2004. See ScreenCaptureParameters .This method supports window sharing of UWP (Universal Windows Platform) applications. Agora tests the mainstream UWP applications by using the lastest SDK, see details as follows: * * @param windowId The ID of the window to be shared. * @param regionRect (Optional) Sets the relative location of the region to the screen. If you do not set this parameter, the SDK shares the whole screen. See Rectangle . If the specified region overruns the window, the SDK shares only the region within it; if you set width or height as 0, the SDK shares the whole window. * @param captureParams Screen sharing configurations. The default video resolution is 1920 × 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters . * * @returns - * 0: Success.< 0: Failure.-2: The parameter is invalid.-8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. + * 0: Success.< 0: Failure. + * -2: The parameter is invalid. + * -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. */ abstract startScreenCaptureByWindowId( windowId: any, @@ -4761,7 +4745,9 @@ export abstract class IRtcEngine { * @param contentHint The content hint for screen sharing. See VideoContentHint . * * @returns - * 0: Success.< 0: Failure.-2: The parameter is invalid.-8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. + * 0: Success.< 0: Failure. + * -2: The parameter is invalid. + * -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. */ abstract setScreenCaptureContentHint(contentHint: VideoContentHint): number; @@ -4772,7 +4758,9 @@ export abstract class IRtcEngine { * @param regionRect The relative location of the screen-share area to the screen or window. If you do not set this parameter, the SDK shares the whole screen or window. See Rectangle . If the specified region overruns the screen or window, the SDK shares only the region within it; if you set width or height as 0, the SDK shares the whole screen or window. * * @returns - * 0: Success.< 0: Failure.-2: The parameter is invalid.-8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. + * 0: Success.< 0: Failure. + * -2: The parameter is invalid. + * -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. */ abstract updateScreenCaptureRegion(regionRect: Rectangle): number; @@ -4783,7 +4771,9 @@ export abstract class IRtcEngine { * @param captureParams The screen sharing encoding parameters. The default video resolution is 1920 × 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters * * @returns - * 0: Success.< 0: Failure.-2: The parameter is invalid.-8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. + * 0: Success.< 0: Failure. + * -2: The parameter is invalid. + * -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. */ abstract updateScreenCaptureParameters( captureParams: ScreenCaptureParameters @@ -4796,7 +4786,9 @@ export abstract class IRtcEngine { * @param captureParams The screen sharing encoding parameters. The default video resolution is 1920 × 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters * * @returns - * 0: Success.< 0: Failure.-2: The parameter is invalid.-8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. + * 0: Success.< 0: Failure. + * -2: The parameter is invalid. + * -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. */ abstract startScreenCapture(captureParams: ScreenCaptureParameters2): number; @@ -4815,7 +4807,9 @@ export abstract class IRtcEngine { * @param captureParams The screen sharing encoding parameters. The default video resolution is 1920 × 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters * * @returns - * 0: Success.< 0: Failure.-2: The parameter is invalid.-8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. + * 0: Success.< 0: Failure. + * -2: The parameter is invalid. + * -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. */ abstract updateScreenCapture(captureParams: ScreenCaptureParameters2): number; @@ -4882,12 +4876,20 @@ export abstract class IRtcEngine { /** * Starts pushing media streams to a CDN without transcoding. - * Ensure that you enable the Media Push service before using this function. See Enable Media Push.Call this method after joining a channel.Only hosts in the LIVE_BROADCASTING profile can call this method.If you want to retry pushing streams after a failed push, make sure to call stopRtmpStream first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push.Agora recommends that you use the server-side Media Push function. You can call this method to push an audio or video stream to the specified CDN address. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times.After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming. + * Ensure that you enable the Media Push service before using this function. See Enable Media Push. + * Call this method after joining a channel. + * Only hosts in the LIVE_BROADCASTING profile can call this method. + * If you want to retry pushing streams after a failed push, make sure to call stopRtmpStream first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push. + * Agora recommends that you use the server-side Media Push function. You can call this method to push an audio or video stream to the specified CDN address. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times.After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming. * * @param url The address of Media Push. The format is RTMP or RTMPS. The character length cannot exceed 1024 bytes. Special characters such as Chinese characters are not supported. * * @returns - * 0: Success.< 0: Failure.-2: The URL is null or the string length is 0.-7: The SDK is not initialized before calling this method.-19: The Media Push URL is already in use, use another URL instead. + * 0: Success. + * < 0: Failure. + * -2: The URL is null or the string length is 0. + * -7: The SDK is not initialized before calling this method. + * -19: The Media Push URL is already in use, use another URL instead. */ abstract startRtmpStreamWithoutTranscoding(url: string): number; @@ -5187,7 +5189,9 @@ export abstract class IRtcEngine { ): number; /** - * Unregisters the specified metadata observer. + * Registers the metadata observer. + * You need to implement the IMetadataObserver class and specify the metadata type in this method. This method enables you to add synchronized metadata in the video stream for more diversified + * live interactive streaming, such as sending shopping links, digital coupons, and online quizzes.Call this method before joinChannel. * * @param observer The metadata observer. See IMetadataObserver . * @param type The metadata type. The SDK currently only supports VideoMetadata. See MetadataType . @@ -5249,7 +5253,7 @@ export abstract class IRtcEngine { * @param options The channel media options. See ChannelMediaOptions . * * @returns - * 0: Success.< 0: Failure. + * 0: Success.< 0: Failure.-2: The parameter is invalid. For example, the token is invalid, the uid parameter is not set to an integer, or the value of a member in ChannelMediaOptions is invalid. You need to pass in a valid parameter and join the channel again.-3: Failes to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object.-7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.-8: The internal state of the IRtcEngine object is wrong. The typical cause is that you call this method to join the channel without calling startEchoTest to stop the test after calling stopEchoTest to start a call loop test. You need to call stopEchoTest before calling this method.-17: The request to join the channel is rejected. The typical cause is that the user is in the channel. Agora recomments that you can use the onConnectionStateChanged callback to determine whether the user exists in the channel. Do not call this method to join the channel unless you receive the ConnectionStateDisconnected(1) state.-102: The channel name is invalid. You need to pass in a valid channelname in channelId to rejoin the channel.-121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel. */ abstract joinChannelWithUserAccount( token: string, @@ -5268,7 +5272,7 @@ export abstract class IRtcEngine { * @param options The channel media options. See ChannelMediaOptions . * * @returns - * 0: Success.< 0: Failure. + * 0: Success.< 0: Failure.-2: The parameter is invalid. For example, the token is invalid, the uid parameter is not set to an integer, or the value of a member in ChannelMediaOptions is invalid. You need to pass in a valid parameter and join the channel again.-3: Failes to initialize the IRtcEngine object. You need to reinitialize the IRtcEngine object.-7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.-8: The internal state of the IRtcEngine object is wrong. The typical cause is that you call this method to join the channel without calling startEchoTest to stop the test after calling stopEchoTest to start a call loop test. You need to call stopEchoTest before calling this method.-17: The request to join the channel is rejected. The typical cause is that the user is in the channel. Agora recomments that you can use the onConnectionStateChanged callback to determine whether the user exists in the channel. Do not call this method to join the channel unless you receive the ConnectionStateDisconnected(1) state.-102: The channel name is invalid. You need to pass in a valid channelname in channelId to rejoin the channel.-121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel. */ abstract joinChannelWithUserAccountEx( token: string, @@ -5284,8 +5288,7 @@ export abstract class IRtcEngine { * @param userAccount The user account. * * @returns - * A pointer to the UserInfo instance, if the method call succeeds. - * If the call fails, returns NULL. + * A pointer to the UserInfo instance, if the method call succeeds.If the call fails, returns NULL. */ abstract getUserInfoByUserAccount(userAccount: string): UserInfo; @@ -5405,12 +5408,15 @@ export abstract class IRtcEngine { abstract stopDirectCdnStreaming(): number; /** - * Updates the channel media options after joining the channel. + * Sets channel options and leaves the channel. + * If you call release immediately after calling this method, the SDK does not trigger the onLeaveChannel callback. + * If you have called joinChannelEx to join multiple channels, calling this method will leave the channels when calling joinChannel and joinChannelEx at the same time. + * This method will release all resources related to the session, leave the channel, that is, hang up or exit the call. This method can be called whether or not a call is currently in progress.After joining the channel, you must call this method or to end the call, otherwise, the next call cannot be started.This method call is asynchronous. When this method returns, it does not necessarily mean that the user has left the channel. After actually leaving the channel, the local user triggers the onLeaveChannel callback; after the user in the communication scenario and the host in the live streaming scenario leave the channel, the remote user triggers the onUserOffline callback. * - * @param options The channel media options. See ChannelMediaOptions . + * @param options The options for leaving the channel. See LeaveChannelOptions . * * @returns - * 0: Success.< 0: Failure.-2: The value of a member in the ChannelMediaOptions structure is invalid. For example, the token or the user ID is invalid. You need to fill in a valid parameter.-7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.-8: The internal state of the IRtcEngine object is wrong. The possible reason is that the user is not in the channel. Agora recomments that you can use the onConnectionStateChanged callback to determine whether the user exists in the channel. If you receive the ConnectionStateDisconnected (1) or ConnectionStateFailed (5) state, the user is not in the channel. You need to call joinChannel to join a channel before calling this method. + * 0: Success.< 0: Failure. */ abstract updateDirectCdnStreamingMediaOptions( options: DirectCdnStreamingMediaOptions @@ -5431,13 +5437,7 @@ export abstract class IRtcEngine { abstract stopRhythmPlayer(): number; /** - * Sets the video encoder configuration. - * Sets the encoder configuration for the local video.You can call this method either before or after joining a channel. If the user does not need to reset the video encoding properties after joining the channel, Agora recommends calling this method before enableVideo to reduce the time to render the first video frame. - * - * @param config Video profile. See VideoEncoderConfiguration . - * - * @returns - * 0: Success.< 0: Failure. + * @ignore */ abstract configRhythmPlayer(config: AgoraRhythmPlayerConfig): number; @@ -5547,10 +5547,10 @@ export abstract class IRtcEngine { abstract getCurrentMonotonicTimeInMs(): number; /** - * Enables interoperability with the Agora Web SDK (applicable only in the live streaming scenarios). - * Deprecated:The SDK automatically enables interoperability with the Web SDK, so you no longer need to call this method.You can call this method to enable or disable interoperability with the Agora Web SDK. If a channel has Web SDK users, ensure that you call this method, or the video of the Native user will be a black screen for the Web user.This method is only applicable in live streaming scenarios, and interoperability is enabled by default in communication scenarios. + * Enables/Disables the local video capture. + * This method disables or re-enables the local video capture, and does not affect receiving the remote video stream.After calling enableVideo , the local video capture is enabled by default. You can call enableLocalVideo (false) to disable the local video capture. If you want to re-enable the local video capture, call enableLocalVideo(true).After the local video capturer is successfully disabled or re-enabled, the SDK triggers the onRemoteVideoStateChanged callback on the remote client.You can call this method either before or after joining a channel.This method enables the internal engine and is valid after leaving the channel. * - * @param enabled Whether to enable interoperability:true: Enable interoperability.false: (Default) Disable interoperability. + * @param enabled Whether to enable the local video capture.true: (Default) Enable the local video capture.false: Disable the local video capture. Once the local video is disabled, the remote users cannot receive the video stream of the local user, while the local user can still receive the video streams of remote users. When set to false, this method does not require a local camera. * * @returns * 0: Success.< 0: Failure. @@ -5602,12 +5602,7 @@ export abstract class IRtcEngine { * Destroys multiple video renderer objects at one time. * * @param sourceType The type of the video frame, see VideoSourceType . - * @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters: - * All lowercase English letters: a to z. - * All uppercase English letters: A to Z. - * All numeric characters: 0 to 9. - * Space - * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "= ", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", "," + * @param channelId The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters:All lowercase English letters: a to z.All uppercase English letters: A to Z.All numeric characters: 0 to 9.Space"!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "= ", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", "," * @param uid The user ID of the remote user. */ abstract destroyRendererByConfig( diff --git a/ts/Private/IAgoraRtcEngineEx.ts b/ts/Private/IAgoraRtcEngineEx.ts index 99a6d88dc..8bdb81ae2 100644 --- a/ts/Private/IAgoraRtcEngineEx.ts +++ b/ts/Private/IAgoraRtcEngineEx.ts @@ -89,11 +89,7 @@ export abstract class IRtcEngineEx extends IRtcEngine { * @param connection The connection information. See RtcConnection . * * @returns - * 0: Success. - * < 0: Failure. - * -2: The value of a member in the ChannelMediaOptions structure is invalid. For example, the token or the user ID is invalid. You need to fill in a valid parameter. - * -7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method. - * -8: The internal state of the IRtcEngine object is wrong. The possible reason is that the user is not in the channel. Agora recomments that you can use the onConnectionStateChanged callback to determine whether the user exists in the channel. If you receive the ConnectionStateDisconnected (1) or ConnectionStateFailed (5) state, the user is not in the channel. You need to call joinChannel to join a channel before calling this method. + * 0: Success.< 0: Failure.-2: The value of a member in the ChannelMediaOptions structure is invalid. For example, the token or the user ID is invalid. You need to fill in a valid parameter.-7: The IRtcEngine object has not been initialized. You need to initialize the IRtcEngine object before calling this method.-8: The internal state of the IRtcEngine object is wrong. The possible reason is that the user is not in the channel. Agora recomments that you can use the onConnectionStateChanged callback to determine whether the user exists in the channel. If you receive the ConnectionStateDisconnected (1) or ConnectionStateFailed (5) state, the user is not in the channel. You need to call joinChannel to join a channel before calling this method. */ abstract updateChannelMediaOptionsEx( options: ChannelMediaOptions, @@ -101,14 +97,14 @@ export abstract class IRtcEngineEx extends IRtcEngine { ): number; /** - * Starts recording the local audio and video. - * After successfully getting the IMediaRecorder object by calling getMediaRecorder , you can call this method to enable the recoridng of the local audio and video.This method can record the audio captured by the local microphone and encoded in AAC format, and the video captured by the local camera and encoded in H.264 format. The SDK can generate a recording file only when it detects audio and video streams; when there are no audio and video streams to be recorded or the audio and video streams are interrupted for more than five seconds, the SDK stops the recording and triggers the onRecorderStateChanged(RecorderStateError, RecorderErrorNoStream) callback.Once the recording is started, if the video resolution is changed, the SDK stops the recording; if the sampling rate and audio channel changes, the SDK continues recording and generates audio files respectively.Call this method after joining a channel. + * Creates a data stream. + * Creates a data stream. Each user can create up to five data streams in a single channel.Compared with createDataStreamEx , this method does not support data reliability. If a data packet is not received five seconds after it was sent, the SDK directly discards the data. * - * @param config The recording configuration. See MediaRecorderConfiguration . + * @param config The configurations for the data stream. See DataStreamConfig . * @param connection The connection information. See RtcConnection . * * @returns - * 0: Success.< 0: Failure.-2: The parameter is invalid. Ensure the following:The specified path of the recording file exists and is writable.The specified format of the recording file is supported.The maximum recording duration is correctly set.-4: IRtcEngine does not support the request. The recording is ongoing or the recording stops because an error occurs.-7: The method is called before IRtcEngine is initialized. + * ID of the created data stream, if the method call succeeds.< 0: Failure. */ abstract setVideoEncoderConfigurationEx( config: VideoEncoderConfiguration, @@ -180,14 +176,14 @@ export abstract class IRtcEngineEx extends IRtcEngine { ): number; /** - * Stops or resumes subscribing to the audio streams of all remote users. - * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including the ones join the channel subsequent to this call.Call this method after joining a channel.If you do not want to subscribe the audio streams of remote users before joining a channel, you can set autoSubscribeAudio as false when calling joinChannel . + * Stops or resumes subscribing to the video streams of all remote users. + * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users. * - * @param mute Whether to stop subscribing to the audio streams of all remote users:true: Stops subscribing to the audio streams of all remote users.false: (Default) Subscribes to the audio streams of all remote users by default. + * @param mute Whether to stop subscribing to the video streams of all remote users.true: Stop subscribing to the video streams of all remote users.false: (Default) Subscribe to the audio streams of all remote users by default. * @param connection The connection information. See RtcConnection . * * @returns - * 0: Success. < 0: Failure. + * 0: Success.< 0: Failure. */ abstract muteLocalAudioStreamEx( mute: boolean, @@ -195,14 +191,14 @@ export abstract class IRtcEngineEx extends IRtcEngine { ): number; /** - * Stops or resumes subscribing to the audio streams of all remote users. - * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including the ones join the channel subsequent to this call.Call this method after joining a channel.If you do not want to subscribe the audio streams of remote users before joining a channel, you can set autoSubscribeAudio as false when calling joinChannel . + * Stops or resumes subscribing to the video streams of all remote users. + * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users. * - * @param mute Whether to stop subscribing to the audio streams of all remote users:true: Stops subscribing to the audio streams of all remote users.false: (Default) Subscribes to the audio streams of all remote users by default. + * @param mute Whether to stop subscribing to the video streams of all remote users.true: Stop subscribing to the video streams of all remote users.false: (Default) Subscribe to the audio streams of all remote users by default. * @param connection The connection information. See RtcConnection . * * @returns - * 0: Success. < 0: Failure. + * 0: Success.< 0: Failure. */ abstract muteLocalVideoStreamEx( mute: boolean, @@ -210,14 +206,14 @@ export abstract class IRtcEngineEx extends IRtcEngine { ): number; /** - * Stops or resumes subscribing to the audio streams of all remote users. - * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including the ones join the channel subsequent to this call.Call this method after joining a channel.If you do not want to subscribe the audio streams of remote users before joining a channel, you can set autoSubscribeAudio as false when calling joinChannel . + * Stops or resumes subscribing to the video streams of all remote users. + * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users. * - * @param mute Whether to stop subscribing to the audio streams of all remote users:true: Stops subscribing to the audio streams of all remote users.false: (Default) Subscribes to the audio streams of all remote users by default. + * @param mute Whether to stop subscribing to the video streams of all remote users.true: Stop subscribing to the video streams of all remote users.false: (Default) Subscribe to the audio streams of all remote users by default. * @param connection The connection information. See RtcConnection . * * @returns - * 0: Success. < 0: Failure. + * 0: Success.< 0: Failure. */ abstract muteAllRemoteAudioStreamsEx( mute: boolean, @@ -225,14 +221,14 @@ export abstract class IRtcEngineEx extends IRtcEngine { ): number; /** - * Stops or resumes subscribing to the audio streams of all remote users. - * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including the ones join the channel subsequent to this call.Call this method after joining a channel.If you do not want to subscribe the audio streams of remote users before joining a channel, you can set autoSubscribeAudio as false when calling joinChannel . + * Stops or resumes subscribing to the video streams of all remote users. + * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users. * - * @param mute Whether to stop subscribing to the audio streams of all remote users:true: Stops subscribing to the audio streams of all remote users.false: (Default) Subscribes to the audio streams of all remote users by default. + * @param mute Whether to stop subscribing to the video streams of all remote users.true: Stop subscribing to the video streams of all remote users.false: (Default) Subscribe to the audio streams of all remote users by default. * @param connection The connection information. See RtcConnection . * * @returns - * 0: Success. < 0: Failure. + * 0: Success.< 0: Failure. */ abstract muteAllRemoteVideoStreamsEx( mute: boolean, @@ -240,15 +236,11 @@ export abstract class IRtcEngineEx extends IRtcEngine { ): number; /** - * Set the blocklist of subscriptions for video streams. - * You can call this method to specify the video streams of a user that you do not want to subscribe to. If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect. - * Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel. - * You can call this method either before or after joining a channel. - * The blocklist is not affected by the setting in muteRemoteVideoStream , muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions . - * - * @param uidList The user ID list of users that you do not want to subscribe to. - * If you want to specify the video streams of a user that you do not want to subscribe to, add the user ID of that user in this list. If you want to remove a user from the blocklist, you need to call the setSubscribeVideoBlocklist method to update the user ID list; this means you only add the uid of users that you do not want to subscribe to in the new user ID list. + * Set the allowlist of subscriptions for video streams. + * You can call this method to specify the video streams of a user that you want to subscribe to.If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel. + * You can call this method either before or after joining a channel.The allowlist is not affected by the setting in muteRemoteVideoStream , muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions . * + * @param uidList The user ID list of users that you want to subscribe to.If you want to specify the video streams of a user for subscription, add the user ID of that user in this list. If you want to remove a user from the allowlist, you need to call the setSubscribeVideoAllowlist method to update the user ID list; this means you only add the uid of users that you want to subscribe to in the new user ID list. * @param uidNumber The number of users in the user ID list. * @param connection The connection information. See RtcConnection . * @@ -262,15 +254,11 @@ export abstract class IRtcEngineEx extends IRtcEngine { ): number; /** - * Set the blocklist of subscriptions for video streams. - * You can call this method to specify the video streams of a user that you do not want to subscribe to. If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect. - * Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel. - * You can call this method either before or after joining a channel. - * The blocklist is not affected by the setting in muteRemoteVideoStream , muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions . - * - * @param uidList The user ID list of users that you do not want to subscribe to. - * If you want to specify the video streams of a user that you do not want to subscribe to, add the user ID of that user in this list. If you want to remove a user from the blocklist, you need to call the setSubscribeVideoBlocklist method to update the user ID list; this means you only add the uid of users that you do not want to subscribe to in the new user ID list. + * Set the allowlist of subscriptions for video streams. + * You can call this method to specify the video streams of a user that you want to subscribe to.If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel. + * You can call this method either before or after joining a channel.The allowlist is not affected by the setting in muteRemoteVideoStream , muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions . * + * @param uidList The user ID list of users that you want to subscribe to.If you want to specify the video streams of a user for subscription, add the user ID of that user in this list. If you want to remove a user from the allowlist, you need to call the setSubscribeVideoAllowlist method to update the user ID list; this means you only add the uid of users that you want to subscribe to in the new user ID list. * @param uidNumber The number of users in the user ID list. * @param connection The connection information. See RtcConnection . * @@ -284,15 +272,11 @@ export abstract class IRtcEngineEx extends IRtcEngine { ): number; /** - * Set the blocklist of subscriptions for video streams. - * You can call this method to specify the video streams of a user that you do not want to subscribe to. If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect. - * Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel. - * You can call this method either before or after joining a channel. - * The blocklist is not affected by the setting in muteRemoteVideoStream , muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions . - * - * @param uidList The user ID list of users that you do not want to subscribe to. - * If you want to specify the video streams of a user that you do not want to subscribe to, add the user ID of that user in this list. If you want to remove a user from the blocklist, you need to call the setSubscribeVideoBlocklist method to update the user ID list; this means you only add the uid of users that you do not want to subscribe to in the new user ID list. + * Set the allowlist of subscriptions for video streams. + * You can call this method to specify the video streams of a user that you want to subscribe to.If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel. + * You can call this method either before or after joining a channel.The allowlist is not affected by the setting in muteRemoteVideoStream , muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions . * + * @param uidList The user ID list of users that you want to subscribe to.If you want to specify the video streams of a user for subscription, add the user ID of that user in this list. If you want to remove a user from the allowlist, you need to call the setSubscribeVideoAllowlist method to update the user ID list; this means you only add the uid of users that you want to subscribe to in the new user ID list. * @param uidNumber The number of users in the user ID list. * @param connection The connection information. See RtcConnection . * @@ -306,15 +290,11 @@ export abstract class IRtcEngineEx extends IRtcEngine { ): number; /** - * Set the blocklist of subscriptions for video streams. - * You can call this method to specify the video streams of a user that you do not want to subscribe to. If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect. - * Once the blocklist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel. - * You can call this method either before or after joining a channel. - * The blocklist is not affected by the setting in muteRemoteVideoStream , muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions . - * - * @param uidList The user ID list of users that you do not want to subscribe to. - * If you want to specify the video streams of a user that you do not want to subscribe to, add the user ID of that user in this list. If you want to remove a user from the blocklist, you need to call the setSubscribeVideoBlocklist method to update the user ID list; this means you only add the uid of users that you do not want to subscribe to in the new user ID list. + * Set the allowlist of subscriptions for video streams. + * You can call this method to specify the video streams of a user that you want to subscribe to.If a user is added in the allowlist and blocklist at the same time, only the blocklist takes effect.Once the allowlist of subscriptions is set, it is effective even if you leave the current channel and rejoin the channel. + * You can call this method either before or after joining a channel.The allowlist is not affected by the setting in muteRemoteVideoStream , muteAllRemoteVideoStreams and autoSubscribeAudio in ChannelMediaOptions . * + * @param uidList The user ID list of users that you want to subscribe to.If you want to specify the video streams of a user for subscription, add the user ID of that user in this list. If you want to remove a user from the allowlist, you need to call the setSubscribeVideoAllowlist method to update the user ID list; this means you only add the uid of users that you want to subscribe to in the new user ID list. * @param uidNumber The number of users in the user ID list. * @param connection The connection information. See RtcConnection . * @@ -408,14 +388,14 @@ export abstract class IRtcEngineEx extends IRtcEngine { ): number; /** - * Stops or resumes subscribing to the audio streams of all remote users. - * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including the ones join the channel subsequent to this call.Call this method after joining a channel.If you do not want to subscribe the audio streams of remote users before joining a channel, you can set autoSubscribeAudio as false when calling joinChannel . + * Stops or resumes subscribing to the video streams of all remote users. + * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users. * - * @param mute Whether to stop subscribing to the audio streams of all remote users:true: Stops subscribing to the audio streams of all remote users.false: (Default) Subscribes to the audio streams of all remote users by default. + * @param mute Whether to stop subscribing to the video streams of all remote users.true: Stop subscribing to the video streams of all remote users.false: (Default) Subscribe to the audio streams of all remote users by default. * @param connection The connection information. See RtcConnection . * * @returns - * 0: Success. < 0: Failure. + * 0: Success.< 0: Failure. */ abstract muteRecordingSignalEx( mute: boolean, @@ -460,14 +440,14 @@ export abstract class IRtcEngineEx extends IRtcEngine { ): number; /** - * Starts recording the local audio and video. - * After successfully getting the IMediaRecorder object by calling getMediaRecorder , you can call this method to enable the recoridng of the local audio and video.This method can record the audio captured by the local microphone and encoded in AAC format, and the video captured by the local camera and encoded in H.264 format. The SDK can generate a recording file only when it detects audio and video streams; when there are no audio and video streams to be recorded or the audio and video streams are interrupted for more than five seconds, the SDK stops the recording and triggers the onRecorderStateChanged(RecorderStateError, RecorderErrorNoStream) callback.Once the recording is started, if the video resolution is changed, the SDK stops the recording; if the sampling rate and audio channel changes, the SDK continues recording and generates audio files respectively.Call this method after joining a channel. + * Creates a data stream. + * Creates a data stream. Each user can create up to five data streams in a single channel.Compared with createDataStreamEx , this method does not support data reliability. If a data packet is not received five seconds after it was sent, the SDK directly discards the data. * - * @param config The recording configuration. See MediaRecorderConfiguration . + * @param config The configurations for the data stream. See DataStreamConfig . * @param connection The connection information. See RtcConnection . * * @returns - * 0: Success.< 0: Failure.-2: The parameter is invalid. Ensure the following:The specified path of the recording file exists and is writable.The specified format of the recording file is supported.The maximum recording duration is correctly set.-4: IRtcEngine does not support the request. The recording is ongoing or the recording stops because an error occurs.-7: The method is called before IRtcEngine is initialized. + * ID of the created data stream, if the method call succeeds.< 0: Failure. */ abstract createDataStreamEx( config: DataStreamConfig, @@ -604,6 +584,7 @@ export abstract class IRtcEngineEx extends IRtcEngine { * Agora recommends that you use the server-side Media Push function. After you start pushing media streams to CDN with transcoding, you can dynamically update the transcoding configuration according to the scenario. The SDK triggers the onTranscodingUpdated callback after the transcoding configuration is updated. * * @param transcoding The transcoding configuration for Media Push. See LiveTranscoding . + * * @param connection The connection information. See RtcConnection . * * @returns @@ -718,16 +699,10 @@ export abstract class IRtcEngineEx extends IRtcEngine { /** * Enables or disables dual-stream mode on the sender side. - * After you enable dual-stream mode, you can call setRemoteVideoStreamType to choose to receive either the high-quality video stream or the low-quality video stream on the subscriber side. - * You can call this method to enable or disable the dual-stream mode on the publisher side. Dual streams are a pairing of a high-quality video stream and a low-quality video stream: - * High-quality video stream: High bitrate, high resolution. - * Low-quality video stream: Low bitrate, low resolution. This method is applicable to all types of streams from the sender, including but not limited to video streams collected from cameras, screen sharing streams, and custom-collected video streams. - * - * @param enabled Whether to enable dual-stream mode: - * true: Enable dual-stream mode. - * false: (Default) Disable dual-stream mode. - * @param streamConfig The configuration of the low-quality video stream. See SimulcastStreamConfig . + * After you enable dual-stream mode, you can call setRemoteVideoStreamType to choose to receive either the high-quality video stream or the low-quality video stream on the subscriber side.You can call this method to enable or disable the dual-stream mode on the publisher side. Dual streams are a pairing of a high-quality video stream and a low-quality video stream:High-quality video stream: High bitrate, high resolution.Low-quality video stream: Low bitrate, low resolution.This method is applicable to all types of streams from the sender, including but not limited to video streams collected from cameras, screen sharing streams, and custom-collected video streams. * + * @param enabled Whether to enable dual-stream mode:true: Enable dual-stream mode.false: (Default) Disable dual-stream mode. + * @param streamConfig The configuration of the low-quality video stream. See SimulcastStreamConfig . * @param connection The connection information. See RtcConnection . * * @returns @@ -769,11 +744,17 @@ export abstract class IRtcEngineEx extends IRtcEngine { /** * Takes a snapshot of a video stream. - * The method is asynchronous, and the SDK has not taken the snapshot when the method call returns. After a successful method call, the SDK triggers the onSnapshotTaken callback to report whether the snapshot is successfully taken, as well as the details for that snapshot.This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path.Call this method after the joinChannelEx method.This method takes a snapshot of the published video stream specified in ChannelMediaOptions .If the user's video has been preprocessed, for example, watermarked or beautified, the resulting snapshot includes the pre-processing effect. + * The method is asynchronous, and the SDK has not taken the snapshot when the method call returns. After a successful method call, the SDK triggers the onSnapshotTaken callback to report whether the snapshot is successfully taken, as well as the details for that snapshot. + * This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path. + * Call this method after the joinChannelEx method.This method takes a snapshot of the published video stream specified in ChannelMediaOptions .If the user's video has been preprocessed, for example, watermarked or beautified, the resulting snapshot includes the pre-processing effect. * * @param connection The connection information. See RtcConnection . * @param uid The user ID. Set uid as 0 if you want to take a snapshot of the local user's video. - * @param filePath The local path (including filename extensions) of the snapshot. For example:Windows: C:\Users\\AppData\Local\Agora\\example.jpgmacOS: ~/Library/Logs/example.jpgEnsure that the path you specify exists and is writable. + * @param filePath The local path (including filename extensions) of the snapshot. For example: + * Windows: C:\Users\\AppData\Local\Agora\\example.jpg + * macOS: ~/Library/Logs/example.jpg + * Ensure that the path you specify exists and is writable. + * * * @returns * 0: Success.< 0: Failure. @@ -785,10 +766,13 @@ export abstract class IRtcEngineEx extends IRtcEngine { ): number; /** - * Occurs when the token expires. - * When the token expires during a call, the SDK triggers this callback to remind the app to renew the token.Once you receive this callback, generate a new token on your app server, and call joinChannel to rejoin the channel. + * Stops recording the local audio and video. + * After calling startRecording , if you want to stop the recording, you must call this method; otherwise, the generated recording files may not be playable. * * @param connection The connection information. See RtcConnection . + * + * @returns + * 0: Success.< 0: Failure.-7: The method is called before IRtcEngine is initialized. */ abstract startMediaRenderingTracingEx(connection: RtcConnection): number; } diff --git a/ts/Private/IAgoraSpatialAudio.ts b/ts/Private/IAgoraSpatialAudio.ts index d26f0259b..8f827ae88 100644 --- a/ts/Private/IAgoraSpatialAudio.ts +++ b/ts/Private/IAgoraSpatialAudio.ts @@ -283,10 +283,13 @@ export abstract class ILocalSpatialAudioEngine extends IBaseSpatialAudioEngine { abstract clearRemotePositions(): number; /** - * Occurs when the token expires. - * When the token expires during a call, the SDK triggers this callback to remind the app to renew the token.Once you receive this callback, generate a new token on your app server, and call joinChannel to rejoin the channel. + * Stops recording the local audio and video. + * After calling startRecording , if you want to stop the recording, you must call this method; otherwise, the generated recording files may not be playable. * * @param connection The connection information. See RtcConnection . + * + * @returns + * 0: Success.< 0: Failure.-7: The method is called before IRtcEngine is initialized. */ abstract clearRemotePositionsEx(connection: RtcConnection): number; @@ -294,8 +297,16 @@ export abstract class ILocalSpatialAudioEngine extends IBaseSpatialAudioEngine { * Sets the sound attenuation effect for the specified user. * * @param uid The user ID. This parameter must be the same as the user ID passed in when the user joined the channel. - * @param attenuation For the user's sound attenuation coefficient, the value range is [0,1]. The values are as follows:0: Broadcast mode, where the volume and timbre are not attenuated with distance, and the volume and timbre heard by local users do not change regardless of distance.(0,0.5): Weak attenuation mode, that is, the volume and timbre are only weakly attenuated during the propagation process, and the sound can travel farther than the real environment.0.5: (Default) simulates the attenuation of the volume in the real environment; the effect is equivalent to not setting the speaker_attenuation parameter.(0.5,1]: Strong attenuation mode, that is, the volume and timbre attenuate rapidly during the propagation process. - * @param forceSet Whether to force the user's sound attenuation effect:true: Force attenuation to set the sound attenuation of the user. At this time, the attenuation coefficient of the sound insulation area set in the audioAttenuation of the SpatialAudioZone does not take effect for the user.If the sound source and listener are inside and outside the sound isolation area, the sound attenuation effect is determined by the audioAttenuation in SpatialAudioZone.If the sound source and the listener are in the same sound insulation area or outside the same sound insulation area, the sound attenuation effect is determined by attenuation in this method.false: Do not force attenuation to set the user's sound attenuation effect, as shown in the following two cases. + * @param attenuation For the user's sound attenuation coefficient, the value range is [0,1]. The values are as follows: + * 0: Broadcast mode, where the volume and timbre are not attenuated with distance, and the volume and timbre heard by local users do not change regardless of distance. + * (0,0.5): Weak attenuation mode, that is, the volume and timbre are only weakly attenuated during the propagation process, and the sound can travel farther than the real environment. + * 0.5: (Default) simulates the attenuation of the volume in the real environment; the effect is equivalent to not setting the speaker_attenuation parameter. + * (0.5,1]: Strong attenuation mode, that is, the volume and timbre attenuate rapidly during the propagation process. + * + * @param forceSet Whether to force the user's sound attenuation effect:true: Force attenuation to set the sound attenuation of the user. At this time, the attenuation coefficient of the sound insulation area set in the audioAttenuation of the SpatialAudioZone does not take effect for the user. + * If the sound source and listener are inside and outside the sound isolation area, the sound attenuation effect is determined by the audioAttenuation in SpatialAudioZone. + * If the sound source and the listener are in the same sound insulation area or outside the same sound insulation area, the sound attenuation effect is determined by attenuation in this method. + * false: Do not force attenuation to set the user's sound attenuation effect, as shown in the following two cases. * * @returns * 0: Success.< 0: Failure. diff --git a/ts/Private/IAudioDeviceManager.ts b/ts/Private/IAudioDeviceManager.ts index 658594a8a..d6afd9529 100644 --- a/ts/Private/IAudioDeviceManager.ts +++ b/ts/Private/IAudioDeviceManager.ts @@ -58,13 +58,13 @@ export abstract class IAudioDeviceManager { abstract getPlaybackDeviceInfo(): AudioDeviceInfo; /** - * Sets the volume of the audio effects. - * Call this method after playEffect . + * Sets the volume of the in-ear monitor. + * Users must use wired earphones to hear their own voices.You can call this method either before or after joining a channel. * - * @param volume The playback volume. The value range is [0, 100]. The default value is 100, which represents the original volume. + * @param volume The volume of the in-ear monitor. The value ranges between 0 and 100. The default value is 100. * * @returns - * 0: Success.< 0: Failure. + * < 0: Failure. */ abstract setPlaybackDeviceVolume(volume: number): number; @@ -77,7 +77,7 @@ export abstract class IAudioDeviceManager { * Sets the audio capture device. * You can call this method to change the audio route currently being used, but this does not change the default audio route. For example, if the default audio route is microphone, you call this method to set the audio route as bluetooth earphones before joinging a channel and then start a device test, the SDK conducts device test on the bluetooth earphones. After the device test is completed and you join a channel, the SDK still uses the microphone for audio capturing. * - * @param deviceId The ID of the audio capture device. You can get the Device ID by calling enumerateRecordingDevices . Connecting or disconnecting the audio device does not change the value of deviceId.The maximum length is MaxDeviceIdLengthType . + * @param deviceId The ID of the audio capture device. You can get the media player ID by calling enumerateRecordingDevices . Connecting or disconnecting the audio device does not change the value of deviceId.The maximum length is MaxDeviceIdLengthType . * * @returns * 0: Success.< 0: Failure. @@ -137,13 +137,13 @@ export abstract class IAudioDeviceManager { abstract getLoopbackDevice(): string; /** - * Stops or resumes subscribing to the video streams of all remote users. - * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.Call this method after joining a channel.If you do not want to subscribe the video streams of remote users before joining a channel, you can call joinChannel and set autoSubscribeVideo as false. + * Stops or resumes subscribing to the audio streams of all remote users. + * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.Call this method after joinChannel .When using the spatial audio effect, if you need to set whether to stop subscribing to the audio streams of all remote users, Agora recommends calling this method instead of the muteAllRemoteAudioStreams method in IRtcEngine .After calling this method, you need to call updateSelfPosition and updateRemotePosition to update the spatial location of the local user and the remote user; otherwise, the settings in this method do not take effect. * - * @param mute Whether to stop subscribing to the video streams of all remote users.true: Stop subscribing to the video streams of all remote users.false: (Default) Subscribe to the audio streams of all remote users by default. + * @param mute Whether to stop subscribing to the audio streams of all remote users:true: Stop subscribing to the audio streams of all remote users.false: Subscribe to the audio streams of all remote users. * * @returns - * 0: Success. < 0: Failure. + * 0: Success.< 0: Failure. */ abstract setPlaybackDeviceMute(mute: boolean): number; @@ -153,13 +153,13 @@ export abstract class IAudioDeviceManager { abstract getPlaybackDeviceMute(): boolean; /** - * Stops or resumes subscribing to the video streams of all remote users. - * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.Call this method after joining a channel.If you do not want to subscribe the video streams of remote users before joining a channel, you can call joinChannel and set autoSubscribeVideo as false. + * Stops or resumes subscribing to the audio streams of all remote users. + * After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.Call this method after joinChannel .When using the spatial audio effect, if you need to set whether to stop subscribing to the audio streams of all remote users, Agora recommends calling this method instead of the muteAllRemoteAudioStreams method in IRtcEngine .After calling this method, you need to call updateSelfPosition and updateRemotePosition to update the spatial location of the local user and the remote user; otherwise, the settings in this method do not take effect. * - * @param mute Whether to stop subscribing to the video streams of all remote users.true: Stop subscribing to the video streams of all remote users.false: (Default) Subscribe to the audio streams of all remote users by default. + * @param mute Whether to stop subscribing to the audio streams of all remote users:true: Stop subscribing to the audio streams of all remote users.false: Subscribe to the audio streams of all remote users. * * @returns - * 0: Success. < 0: Failure. + * 0: Success.< 0: Failure. */ abstract setRecordingDeviceMute(mute: boolean): number; diff --git a/ts/Private/impl/IAgoraRtcEngineImpl.ts b/ts/Private/impl/IAgoraRtcEngineImpl.ts index fa84fa919..8d2c6b445 100644 --- a/ts/Private/impl/IAgoraRtcEngineImpl.ts +++ b/ts/Private/impl/IAgoraRtcEngineImpl.ts @@ -1165,7 +1165,7 @@ export class IRtcEngineImpl implements IRtcEngine { const apiType = this.getApiTypeFromQueryCodecCapability(); const jsonParams = {}; const jsonResults = callIrisApi.call(this, apiType, jsonParams); - const codecInfo = jsonResults.codec_info; + const codecInfo = jsonResults.codecInfo; const size = jsonResults.size; return { codecInfo, diff --git a/ts/Renderer/RendererManager.ts b/ts/Renderer/RendererManager.ts index 681470773..2fb2f3380 100644 --- a/ts/Renderer/RendererManager.ts +++ b/ts/Renderer/RendererManager.ts @@ -72,10 +72,10 @@ export class RendererManager { } /** - * Sets dual-stream mode on the sender side. - * The SDK enables the low-quality video stream auto mode on the sender by default, which is equivalent to calling this method and setting the mode to AutoSimulcastStream. If you want to modify this behavior, you can call this method and modify the mode to DisableSimulcastStream(never send low-quality video streams) or EnableSimulcastStream (always send low-quality video streams).The difference and connection between this method and enableDualStreamMode [1/3] is as follows:When calling this method and setting mode to DisableSimulcastStream, it has the same effect as enableDualStreamMode [1/3](false).When calling this method and setting mode to EnableSimulcastStream, it has the same effect as enableDualStreamMode [1/3](true).Both methods can be called before and after joining a channel. If they are used at the same time, the settings in the method called later shall prevail. + * Sets the channel mode of the current audio file. + * In a stereo music file, the left and right channels can store different audio data. According to your needs, you can set the channel mode to original mode, left channel mode, right channel mode, or mixed channel mode. For example, in the KTV scenario, the left channel of the music file stores the musical accompaniment, and the right channel stores the singing voice. If you only need to listen to the accompaniment, call this method to set the channel mode of the music file to left channel mode; if you need to listen to the accompaniment and the singing voice at the same time, call this method to set the channel mode to mixed channel mode.Call this method after calling open .This method only applies to stereo audio files. * - * @param mode The mode in which the video stream is sent. See SimulcastStreamMode . + * @param mode The channel mode. See AudioDualMonoMode . * * @returns * 0: Success.< 0: Failure. @@ -310,10 +310,10 @@ export class RendererManager { } /** - * Enables interoperability with the Agora Web SDK (applicable only in the live streaming scenarios). - * Deprecated:The SDK automatically enables interoperability with the Web SDK, so you no longer need to call this method.You can call this method to enable or disable interoperability with the Agora Web SDK. If a channel has Web SDK users, ensure that you call this method, or the video of the Native user will be a black screen for the Web user.This method is only applicable in live streaming scenarios, and interoperability is enabled by default in communication scenarios. + * Enables/Disables the local video capture. + * This method disables or re-enables the local video capture, and does not affect receiving the remote video stream.After calling enableVideo , the local video capture is enabled by default. You can call enableLocalVideo (false) to disable the local video capture. If you want to re-enable the local video capture, call enableLocalVideo(true).After the local video capturer is successfully disabled or re-enabled, the SDK triggers the onRemoteVideoStateChanged callback on the remote client.You can call this method either before or after joining a channel.This method enables the internal engine and is valid after leaving the channel. * - * @param enabled Whether to enable interoperability:true: Enable interoperability.false: (Default) Disable interoperability. + * @param enabled Whether to enable the local video capture.true: (Default) Enable the local video capture.false: Disable the local video capture. Once the local video is disabled, the remote users cannot receive the video stream of the local user, while the local user can still receive the video streams of remote users. When set to false, this method does not require a local camera. * * @returns * 0: Success.< 0: Failure. @@ -537,13 +537,7 @@ export class RendererManager { } /** - * Sets the video encoder configuration. - * Sets the encoder configuration for the local video.You can call this method either before or after joining a channel. If the user does not need to reset the video encoding properties after joining the channel, Agora recommends calling this method before enableVideo to reduce the time to render the first video frame. - * - * @param config Video profile. See VideoEncoderConfiguration . - * - * @returns - * 0: Success.< 0: Failure. + * @ignore */ private ensureRendererConfig(config: VideoFrameCacheConfig): | Map<