From 72c9555ee1eceeb0553d6586a69344dec4c35f80 Mon Sep 17 00:00:00 2001 From: sda-rob <149643938+sda-rob@users.noreply.github.com> Date: Fri, 21 Jun 2024 17:27:27 +0800 Subject: [PATCH] [AUTO] Generate codes by terra (#1203) Co-authored-by: guoxianzhe --- ts/Private/AgoraBase.ts | 7 +-- ts/Private/AgoraMediaBase.ts | 2 +- ts/Private/IAgoraMediaEngine.ts | 6 +- ts/Private/IAgoraRtcEngine.ts | 77 ++++++++++---------------- ts/Private/IAgoraRtcEngineEx.ts | 14 ++--- ts/Private/impl/IAgoraRtcEngineImpl.ts | 16 +++--- 6 files changed, 50 insertions(+), 72 deletions(-) diff --git a/ts/Private/AgoraBase.ts b/ts/Private/AgoraBase.ts index b314ce46d..09d3f5de5 100644 --- a/ts/Private/AgoraBase.ts +++ b/ts/Private/AgoraBase.ts @@ -617,7 +617,7 @@ export enum QualityType { */ QualityDown = 6, /** - * 7: Users cannot detect the network quality (not in use). + * @ignore */ QualityUnsupported = 7, /** @@ -3333,7 +3333,6 @@ export enum ConnectionChangedReasonType { * All lowercase English letters: a to z. * All uppercase English letters: A to Z. * All numeric characters: 0 to 9. - * Space * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", "," */ ConnectionChangedInvalidChannelName = 7, @@ -3552,7 +3551,7 @@ export enum VideoViewSetupMode { */ export class VideoCanvas { /** - * The user ID. + * User ID that publishes the video source. */ uid?: number; /** @@ -3560,7 +3559,7 @@ export class VideoCanvas { */ subviewUid?: number; /** - * The video display window. In one VideoCanvas, you can only choose to set either view or surfaceTexture. If both are set, only the settings in view take effect. + * The video display window. */ view?: any; /** diff --git a/ts/Private/AgoraMediaBase.ts b/ts/Private/AgoraMediaBase.ts index c97e09983..d3d1305c1 100644 --- a/ts/Private/AgoraMediaBase.ts +++ b/ts/Private/AgoraMediaBase.ts @@ -1341,7 +1341,7 @@ export interface IAudioSpectrumObserver { /** * Gets the statistics of a local audio 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. + * After successfully calling registerAudioSpectrumObserver to implement the onLocalAudioSpectrum callback in IAudioSpectrumObserver and calling enableAudioSpectrumMonitor to enable audio spectrum monitoring, the SDK triggers this callback as the time interval you set to report the received remote audio data spectrum before encoding. * * @param data The audio spectrum data of the local user. See AudioSpectrumData. */ diff --git a/ts/Private/IAgoraMediaEngine.ts b/ts/Private/IAgoraMediaEngine.ts index 6756c072c..876cdfaba 100644 --- a/ts/Private/IAgoraMediaEngine.ts +++ b/ts/Private/IAgoraMediaEngine.ts @@ -119,7 +119,7 @@ export abstract class IMediaEngine { * * Before calling this method to push external audio data, perform the following steps: * Call createCustomAudioTrack to create a custom audio track and get the audio track ID. - * Call joinChannel to join the channel. In ChannelMediaOptions, set publishCustomAduioTrackId to the audio track ID that you want to publish, and set publishCustomAudioTrack to true. + * Call joinChannel to join the channel. In ChannelMediaOptions, set publishCustomAudioTrackId to the audio track ID that you want to publish, and set publishCustomAudioTrack to true. * * @param frame The external audio frame. See AudioFrame. * @param trackId The audio track ID. If you want to publish a custom external audio source, set this parameter to the ID of the corresponding custom audio track you want to publish. @@ -195,7 +195,7 @@ export abstract class IMediaEngine { * * Ensure that you call this method before joining a channel. To publish a custom audio source, see the following steps: * Call this method to create a custom audio track and get the audio track ID. - * Call joinChannel to join the channel. In ChannelMediaOptions, set publishCustomAduioTrackId to the audio track ID that you want to publish, and set publishCustomAudioTrack to true. + * Call joinChannel to join the channel. In ChannelMediaOptions, set publishCustomAudioTrackId to the audio track ID that you want to publish, and set publishCustomAudioTrack to true. * Call pushAudioFrame and specify trackId as the audio track ID set in step 2. You can then publish the corresponding custom audio source in the channel. * * @param trackType The type of the custom audio track. See AudioTrackType. If AudioTrackDirect is specified for this parameter, you must set publishMicrophoneTrack to false in ChannelMediaOptions when calling joinChannel to join the channel; otherwise, joining the channel fails and returns the error code -2. @@ -203,7 +203,7 @@ export abstract class IMediaEngine { * * @returns * If the method call is successful, the audio track ID is returned as the unique identifier of the audio track. - * If the method call fails, a negative value is returned. + * If the method call fails, 0xffffffff is returned. */ abstract createCustomAudioTrack( trackType: AudioTrackType, diff --git a/ts/Private/IAgoraRtcEngine.ts b/ts/Private/IAgoraRtcEngine.ts index 7140e8829..2639fd6b7 100644 --- a/ts/Private/IAgoraRtcEngine.ts +++ b/ts/Private/IAgoraRtcEngine.ts @@ -1425,10 +1425,10 @@ export interface IRtcEngineEventHandler { /** * 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 statistics. + * You can obtain information such as the total duration of a call, and the data traffic that the SDK transmits and receives. * * @param connection The connection information. See RtcConnection. - * @param stats The statistics of the call. See RtcStats. + * @param stats Call statistics. See RtcStats. */ onLeaveChannel?(connection: RtcConnection, stats: RtcStats): void; @@ -1502,7 +1502,7 @@ export interface IRtcEngineEventHandler { /** * Reports the last mile network quality of each user in the channel. * - * This callback reports the last mile network conditions of each user in the channel. Last mile refers to the connection between the local device and Agora's edge server. The SDK triggers this callback once every two seconds. If a channel includes multiple users, the SDK triggers this callback as many times. txQuality is Unknown when the user is not sending a stream; rxQuality is Unknown when the user is not receiving a stream. + * This callback reports the last mile network conditions of each user in the channel. Last mile refers to the connection between the local device and Agora's edge server. The SDK triggers this callback once every two seconds. If a channel includes multiple users, the SDK triggers this callback as many times. This callback provides feedback on network quality through sending and receiving broadcast packets within the channel. Excessive broadcast packets can lead to broadcast storms. To prevent broadcast storms from causing a large amount of data transmission within the channel, this callback supports feedback on the network quality of up to 4 remote hosts simultaneously by default. txQuality is Unknown when the user is not sending a stream; rxQuality is Unknown when the user is not receiving a stream. * * @param connection The connection information. See RtcConnection. * @param remoteUid The user ID. The network quality of the user with this user ID is reported. If the uid is 0, the local network quality is reported. @@ -1657,6 +1657,8 @@ export interface IRtcEngineEventHandler { /** * Occurs when the renderer receives the first frame of the remote video. * + * This callback is only triggered when the video frame is rendered by the SDK; it will not be triggered if the user employs custom video rendering.You need to implement this independently using methods outside the SDK. + * * @param connection The connection information. See RtcConnection. * @param remoteUid The user ID of the remote user sending the video stream. * @param width The width (px) of the video stream. @@ -2118,9 +2120,7 @@ export interface IRtcEngineEventHandler { ): void; /** - * Occurs when the user role switches during the interactive live streaming. - * - * The SDK triggers this callback when the local user switches their user role by calling setClientRole after joining the channel. + * Occurs when the user role or the audience latency level changes. * * @param connection The connection information. See RtcConnection. * @param oldRole Role that the user switches from: ClientRoleType. @@ -2135,9 +2135,9 @@ export interface IRtcEngineEventHandler { ): void; /** - * Occurs when the user role switching fails in the interactive live streaming. + * Occurs when switching a user role fails. * - * In the live broadcasting channel profile, when the local user calls setClientRole to switch the user role after joining the channel but the switch fails, the SDK triggers this callback to report the reason for the failure and the current user role. + * This callback informs you about the reason for failing to switching and your current user role. * * @param connection The connection information. See RtcConnection. * @param reason The reason for a user role switch failure. See ClientRoleChangeFailedReason. @@ -2922,8 +2922,6 @@ export abstract class IRtcEngine { * Creates and initializes IRtcEngine. * * All called methods provided by the IRtcEngine class are executed asynchronously. Agora recommends calling these methods in the same thread. - * Before calling other APIs, you must call createAgoraRtcEngine and initialize to create and initialize the IRtcEngine object. - * The SDK supports creating only one IRtcEngine instance for an app. * * @param context Configurations for the IRtcEngine instance. See RtcEngineContext. * @@ -2988,7 +2986,6 @@ export abstract class IRtcEngine { * 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. This parameter is used to identify the user in the channel for real-time audio and video interaction. You need to set and manage user IDs yourself, and ensure that each user ID in the same channel is unique. This parameter is a 32-bit unsigned integer. The value range is 1 to 2 32 -1. If the user ID is not assigned (or set to 0), the SDK assigns a random user ID and onJoinChannelSuccess returns it in the callback. Your application must record and maintain the returned user ID, because the SDK does not do so. * @@ -3043,7 +3040,6 @@ export abstract class IRtcEngine { * 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. This parameter is used to identify the user in the channel for real-time audio and video interaction. You need to set and manage user IDs yourself, and ensure that each user ID in the same channel is unique. This parameter is a 32-bit unsigned integer. The value range is 1 to 2 32 -1. If the user ID is not assigned (or set to 0), the SDK assigns a random user ID and onJoinChannelSuccess returns it in the callback. Your application must record and maintain the returned user ID, because the SDK does not do so. * @param options The channel media options. See ChannelMediaOptions. @@ -3083,8 +3079,7 @@ 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. + * After calling this method, the SDK terminates the audio and video interaction, leaves the current channel, and releases all resources related to the session. After joining the channel, you must call this method to end the call; otherwise, the next call cannot be started. If you have called joinChannelEx to join multiple channels, calling this method will leave all the channels you joined. This method call is asynchronous. When this method returns, it does not necessarily mean that the user has left the channel. * * @param options The options for leaving the channel. See LeaveChannelOptions. * @@ -3115,15 +3110,12 @@ export abstract class IRtcEngine { /** * Sets the channel profile. * - * After initializing the SDK, the default channel profile is the live streaming profile. You can call this method to set the channel profile. The Agora SDK differentiates channel profiles and applies optimization algorithms accordingly. For example, it prioritizes smoothness and low latency for a video call and prioritizes video quality for interactive live video streaming. - * To ensure the quality of real-time communication, Agora recommends that all users in a channel use the same channel profile. - * This method must be called and set before joinChannel, and cannot be set again after joining the channel. - * The default video encoding bitrate are different in different channel profiles. See setVideoEncoderConfiguration. + * You can call this method to set the channel profile. The SDK adopts different optimization strategies for different channel profiles. For example, in a live streaming scenario, the SDK prioritizes video quality. After initializing the SDK, the default channel profile is the live streaming profile. * * @param profile The channel profile. See ChannelProfileType. * * @returns - * 0(ERR_OK): Success. + * 0: Success. * < 0: Failure. * -2: The parameter is invalid. * -7: The SDK is not initialized. @@ -3131,14 +3123,11 @@ export abstract class IRtcEngine { abstract setChannelProfile(profile: ChannelProfileType): number; /** - * Sets the user role and level in an interactive live streaming channel. + * Set the user role and the audience latency level in a live streaming scenario. * - * In the interactive live streaming profile, the SDK sets the user role as audience by default. You can call this method to set the user role as host. You can call this method either before or after joining a channel. If you call this method to set the user's role as the host before joining the channel and set the local video property through the setupLocalVideo method, the local video preview is automatically enabled when the user joins the channel. If you call this method to switch the user role after joining a channel, the SDK automatically does the following: - * Calls muteLocalAudioStream and muteLocalVideoStream to change the publishing state. - * Triggers onClientRoleChanged on the local client. - * Triggers onUserJoined or onUserOffline on the remote client. This method applies to the interactive live streaming profile (the profile parameter of setChannelProfile is set as ChannelProfileLiveBroadcasting) only. + * By default,the SDK sets the user role as audience. You can call this method to set the user role as host. The user role (roles) determines the users' permissions at the SDK level, including whether they can publish audio and video streams in a channel. * - * @param role The user role in the interactive live streaming. See ClientRoleType. + * @param role The user role. See ClientRoleType. If you set the user role as an audience member, you cannot publish audio and video streams in the channel. If you want to publish media streams in a channel during live streaming, ensure you set the user role as broadcaster. * @param options The detailed options of a user, including the user level. See ClientRoleOptions. * * @returns @@ -3632,9 +3621,9 @@ export abstract class IRtcEngine { /** * 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. By default, the SDK subscribes to the video streams of all remote users when joining a channel. To modify this behavior, you can set autoSubscribeVideo to false when calling joinChannel to join the channel, which will cancel the subscription to the video streams of all users upon joining the channel. + * After successfully calling this method, the local user stops or resumes subscribing to the video streams of all remote users, including all subsequent users. By default, the SDK subscribes to the video streams of all remote users when joining a channel. To modify this behavior, you can set autoSubscribeVideo to false when calling joinChannel to join the channel, which will cancel the subscription to the video streams of all users upon joining the channel. * - * @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 video streams of all remote users. true : Stop subscribing to the video streams of all remote users. false : (Default) Subscribe to the video streams of all remote users by default. * * @returns * 0: Success. @@ -5037,7 +5026,11 @@ export abstract class IRtcEngine { /** * Whether to mute the recording signal. * - * @param mute true : The media file is muted. false : (Default) Do not mute the recording signal. If you have already called adjustRecordingSignalVolume to adjust the volume, then when you call this method and set it to true, the SDK will record the current volume and mute it. To restore the previous volume, call this method again and set it to false. + * If you have already called adjustRecordingSignalVolume to adjust the recording signal volume, when you call this method and set it to true, the SDK behaves as follows: + * Records the adjusted volume. + * Mutes the recording signal. When you call this method again and set it to false, the recording signal volume will be restored to the volume recorded by the SDK before muting. + * + * @param mute true : Mute the recording signal. false : (Default) Do not mute the recording signal. * * @returns * 0: Success. @@ -5214,8 +5207,6 @@ export abstract class IRtcEngine { * Enables in-ear monitoring. * * This method enables or disables in-ear monitoring. - * Users must use earphones (wired or Bluetooth) to hear the in-ear monitoring effect. - * You can call this method either before or after joining a channel. * * @param enabled Enables or disables in-ear monitoring. true : Enables in-ear monitoring. false : (Default) Disables in-ear monitoring. * @param includeAudioFilters The audio filter types of in-ear monitoring. See EarMonitoringFilterType. @@ -5313,7 +5304,7 @@ export abstract class IRtcEngine { * * @returns * If the method call is successful, the video track ID is returned as the unique identifier of the video track. - * If the method call fails, a negative value is returned. + * If the method call fails, 0xffffffff is returned. */ abstract createCustomVideoTrack(): number; @@ -5516,7 +5507,7 @@ export abstract class IRtcEngine { * * @param displayId The display ID of the screen to be shared. For the Windows platform, if you need to simultaneously share two screens (main screen and secondary screen), you can set displayId to -1 when calling this method. * @param regionRect (Optional) Sets the relative location of the region to the screen. Pass in nil to share the entire screen. - * @param captureParams Screen sharing configurations. The default video dimension is 1920 x 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters. + * @param captureParams Screen sharing configurations. The default video dimension is 1920 x 1080, that is, 2,073,600 pixels. Agora uses the value of this parameter to calculate the charges. See ScreenCaptureParameters. The video properties of the screen sharing stream only need to be set through this parameter, and are unrelated to setVideoEncoderConfiguration. * * @returns * 0: Success. @@ -5614,7 +5605,7 @@ export abstract class IRtcEngine { * * Call this method after starting screen sharing or window sharing. * - * @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. + * @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. The video properties of the screen sharing stream only need to be set through this parameter, and are unrelated to setVideoEncoderConfiguration. * * @returns * 0: Success. @@ -5887,8 +5878,6 @@ export abstract class IRtcEngine { /** * Gets the current connection state of the SDK. * - * You can call this method either before or after joining a channel. - * * @returns * The current connection state. See ConnectionStateType. */ @@ -5948,8 +5937,6 @@ export abstract class IRtcEngine { /** * Creates a data stream. * - * Creates a data stream. Each user can create up to five data streams in a single channel. - * * @param config The configurations for the data stream. See DataStreamConfig. * * @returns @@ -6130,10 +6117,9 @@ export abstract class IRtcEngine { /** * Registers a user account. * - * Once registered, the user account can be used to identify the local user when the user joins the channel. After the registration is successful, the user account can identify the identity of the local user, and the user can use it to join the channel. After the user successfully registers a user account, the SDK triggers the onLocalUserRegistered callback on the local client, reporting the user ID and account of the local user. This method is optional. To join a channel with a user account, you can choose either of the following ways: - * Call registerLocalUserAccount to create a user account, and then call joinChannelWithUserAccount to join the channel. - * Call the joinChannelWithUserAccount method to join the channel. The difference between the two ways is that the time elapsed between calling the registerLocalUserAccount method and joining the channel is shorter than directly calling joinChannelWithUserAccount. - * Ensure that you set the userAccount parameter; otherwise, this method does not take effect. + * Once registered, the user account can be used to identify the local user when the user joins the channel. After the registration is successful, the user account can identify the identity of the local user, and the user can use it to join the channel. This method is optional. If you want to join a channel using a user account, you can choose one of the following methods: + * Call the registerLocalUserAccount method to register a user account, and then call the joinChannelWithUserAccount method to join a channel, which can shorten the time it takes to enter the channel. + * Call the joinChannelWithUserAccount method to join a channel. * Ensure that the userAccount is unique in the channel. * To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the ID of the user is set to the same parameter type. * @@ -6164,7 +6150,6 @@ export abstract class IRtcEngine { * All lowercase English letters: a to z. * All uppercase English letters: A to Z. * All numeric characters: 0 to 9. - * Space * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", "," * @param userAccount The user account. This parameter is used to identify the user in the channel for real-time audio and video engagement. You need to set and manage user accounts yourself and ensure that each user account in the same channel is unique. The maximum length of this parameter is 255 bytes. Ensure that you set this parameter and do not set it as null. Supported characters are as follows(89 in total): * The 26 lowercase English letters: a to z. @@ -6204,7 +6189,6 @@ export abstract class IRtcEngine { * All lowercase English letters: a to z. * All uppercase English letters: A to Z. * All numeric characters: 0 to 9. - * Space * "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", "," * @param userAccount The user account. This parameter is used to identify the user in the channel for real-time audio and video engagement. You need to set and manage user accounts yourself and ensure that each user account in the same channel is unique. The maximum length of this parameter is 255 bytes. Ensure that you set this parameter and do not set it as null. Supported characters are as follows(89 in total): * The 26 lowercase English letters: a to z. @@ -6228,7 +6212,7 @@ export abstract class IRtcEngine { /** * Gets the user information by passing in the user account. * - * After a remote user joins the channel, the SDK gets the user ID and account of the remote user, caches them in a mapping table object, and triggers the onUserInfoUpdated callback on the local client. After receiving the callback, you can call this method to get the user account of the remote user from the UserInfo object by passing in the user ID. + * After a remote user joins the channel, the SDK gets the UID and user account of the remote user, caches them in a mapping table object, and triggers the onUserInfoUpdated callback on the local client. After receiving the callback, you can call this method and pass in the user account to get the UID of the remote user from the UserInfo object. * * @param userAccount The user account. * @@ -6241,7 +6225,7 @@ export abstract class IRtcEngine { /** * Gets the user information by passing in the user ID. * - * After a remote user joins the channel, the SDK gets the user ID and account of the remote user, caches them in a mapping table object, and triggers the onUserInfoUpdated callback on the local client. After receiving the callback, you can call this method to get the user account of the remote user from the UserInfo object by passing in the user ID. + * After a remote user joins the channel, the SDK gets the UID and user account of the remote user, caches them in a mapping table object, and triggers the onUserInfoUpdated callback on the local client. After receiving the callback, you can call this method and passi in the UID.to get the user account of the specified user from the UserInfo object. * * @param uid The user ID. * @@ -6336,7 +6320,7 @@ export abstract class IRtcEngine { /** * Starts pushing media streams to the CDN directly. * - * Aogra does not support pushing media streams to one URL repeatedly. Media options Agora does not support setting the value of publishCameraTrack and publishCustomVideoTrack as true, or the value of publishMicrophoneTrack and publishCustomAudioTrack as true at the same time. When choosing media setting options (DirectCdnStreamingMediaOptions), you can refer to the following examples: If you want to push audio and video streams published by the host to the CDN, the media setting options should be set as follows: publishCustomAudioTrack is set as true and call the pushAudioFrame method publishCustomVideoTrack is set as true and call the pushVideoFrame method publishCameraTrack is set as false (the default value) publishMicrophoneTrack is set as false (the default value) As of v4.2.0, Agora SDK supports audio-only live streaming. You can set publishCustomAudioTrack or publishMicrophoneTrack in DirectCdnStreamingMediaOptions as true and call pushAudioFrame to push audio streams. Agora only supports pushing one audio and video streams or one audio streams to CDN. + * Aogra does not support pushing media streams to one URL repeatedly. Media options Agora does not support setting the value of publishCameraTrack and publishCustomVideoTrack as true, or the value of publishMicrophoneTrack and publishCustomAudioTrack as true at the same time. When choosing media setting options (DirectCdnStreamingMediaOptions), you can refer to the following examples: If you want to push audio and video streams captured by the host from a custom source, the media setting options should be set as follows: publishCustomAudioTrack is set as true and call the pushAudioFrame method publishCustomVideoTrack is set as true and call the pushVideoFrame method publishCameraTrack is set as false (the default value) publishMicrophoneTrack is set as false (the default value) As of v4.2.0, Agora SDK supports audio-only live streaming. You can set publishCustomAudioTrack or publishMicrophoneTrack in DirectCdnStreamingMediaOptions as true and call pushAudioFrame to push audio streams. Agora only supports pushing one audio and video streams or one audio streams to CDN. * * @param eventHandler See onDirectCdnStreamingStateChanged and onDirectCdnStreamingStats. * @param publishUrl The CDN live streaming URL. @@ -6763,7 +6747,6 @@ export abstract class IRtcEngine { * 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. */ diff --git a/ts/Private/IAgoraRtcEngineEx.ts b/ts/Private/IAgoraRtcEngineEx.ts index c8ec84af3..3d8c1d164 100644 --- a/ts/Private/IAgoraRtcEngineEx.ts +++ b/ts/Private/IAgoraRtcEngineEx.ts @@ -78,9 +78,9 @@ export abstract class IRtcEngineEx extends IRtcEngine { /** * Sets channel options and leaves the channel. * - * This method lets the user leave the channel, for example, by hanging up or exiting the call. After calling joinChannelEx to join the channel, this method must be called to end the call before starting the next call. This method can be called whether or not a call is currently in progress. This method releases all resources related to the session. This method call is asynchronous. When this method returns, it does not necessarily mean that the user has left the channel. After you leave the channel, the SDK triggers the onLeaveChannel callback. 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 want to leave the channels that you joined by calling joinChannel and joinChannelEx, call the leaveChannel method. + * After calling this method, the SDK terminates the audio and video interaction, leaves the current channel, and releases all resources related to the session. After calling joinChannelEx to join a channel, you must call this method 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. + * If you call leaveChannel, you will leave all the channels you have joined by calling joinChannel or joinChannelEx. * * @param connection The connection information. See RtcConnection. * @param options The options for leaving the channel. See LeaveChannelOptions. This parameter only supports the stopMicrophoneRecording member in the LeaveChannelOptions settings; setting other members does not take effect. @@ -260,9 +260,9 @@ export abstract class IRtcEngineEx extends IRtcEngine { /** * 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. + * After successfully calling this method, the local user stops or resumes subscribing to the video streams of all remote users, including all subsequent users. * - * @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 video streams of all remote users. true : Stop subscribing to the video streams of all remote users. false : (Default) Subscribe to the video streams of all remote users by default. * @param connection The connection information. See RtcConnection. * * @returns @@ -508,8 +508,6 @@ export abstract class IRtcEngineEx extends IRtcEngine { /** * Gets the current connection state of the SDK. * - * You can call this method either before or after joining a channel. - * * @param connection The connection information. See RtcConnection. * * @returns @@ -539,8 +537,6 @@ export abstract class IRtcEngineEx extends IRtcEngine { /** * Creates a data stream. * - * Creates a data stream. Each user can create up to five data streams in a single channel. - * * @param config The configurations for the data stream. See DataStreamConfig. * @param connection The connection information. See RtcConnection. * diff --git a/ts/Private/impl/IAgoraRtcEngineImpl.ts b/ts/Private/impl/IAgoraRtcEngineImpl.ts index 81cdbcddc..f26c24285 100644 --- a/ts/Private/impl/IAgoraRtcEngineImpl.ts +++ b/ts/Private/impl/IAgoraRtcEngineImpl.ts @@ -6999,7 +6999,7 @@ export class IRtcEngineImpl implements IRtcEngine { } protected getApiTypeFromGetAudioDeviceManager(): string { - return 'RtcEngine_queryInterface_257d192'; + return 'RtcEngine_getAudioDeviceManager'; } getVideoDeviceManager(): IVideoDeviceManager { @@ -7010,7 +7010,7 @@ export class IRtcEngineImpl implements IRtcEngine { } protected getApiTypeFromGetVideoDeviceManager(): string { - return 'RtcEngine_queryInterface_257d192'; + return 'RtcEngine_getVideoDeviceManager'; } getMusicContentCenter(): IMusicContentCenter { @@ -7021,7 +7021,7 @@ export class IRtcEngineImpl implements IRtcEngine { } protected getApiTypeFromGetMusicContentCenter(): string { - return 'RtcEngine_queryInterface_257d192'; + return 'RtcEngine_getMusicContentCenter'; } getMediaEngine(): IMediaEngine { @@ -7032,7 +7032,7 @@ export class IRtcEngineImpl implements IRtcEngine { } protected getApiTypeFromGetMediaEngine(): string { - return 'RtcEngine_queryInterface_257d192'; + return 'RtcEngine_getMediaEngine'; } getLocalSpatialAudioEngine(): ILocalSpatialAudioEngine { @@ -7043,7 +7043,7 @@ export class IRtcEngineImpl implements IRtcEngine { } protected getApiTypeFromGetLocalSpatialAudioEngine(): string { - return 'RtcEngine_queryInterface_257d192'; + return 'RtcEngine_getLocalSpatialAudioEngine'; } getH265Transcoder(): IH265Transcoder { @@ -7054,7 +7054,7 @@ export class IRtcEngineImpl implements IRtcEngine { } protected getApiTypeFromGetH265Transcoder(): string { - return 'RtcEngine_queryInterface_257d192'; + return 'RtcEngine_getH265Transcoder'; } sendMetaData(metadata: Metadata, sourceType: VideoSourceType): number { @@ -7112,7 +7112,7 @@ export class IRtcEngineImpl implements IRtcEngine { } protected getApiTypeFromDestroyRendererByView(view: any): string { - return 'RtcEngine_destroyRendererByView'; + return 'RtcEngine_destroyRendererByView_a55f55f'; } destroyRendererByConfig( @@ -7145,7 +7145,7 @@ export class IRtcEngineImpl implements IRtcEngine { channelId?: string, uid: number = 0 ): string { - return 'RtcEngine_destroyRendererByConfig'; + return 'RtcEngine_destroyRendererByConfig_542c2ae'; } unregisterAudioEncodedFrameObserver(