diff --git a/lib/src/agora_base.dart b/lib/src/agora_base.dart index 404af0aee..8d13e2636 100644 --- a/lib/src/agora_base.dart +++ b/lib/src/agora_base.dart @@ -591,11 +591,11 @@ extension UserOfflineReasonTypeExt on UserOfflineReasonType { /// The interface class. @JsonEnum(alwaysCreate: true) enum InterfaceIdType { - /// The AudioDeviceManager interface class. + /// 1: The AudioDeviceManager interface class. @JsonValue(1) agoraIidAudioDeviceManager, - /// The VideoDeviceManager interface class. + /// 2: The VideoDeviceManager interface class. @JsonValue(2) agoraIidVideoDeviceManager, @@ -603,7 +603,7 @@ enum InterfaceIdType { @JsonValue(3) agoraIidParameterEngine, - /// The MediaEngine interface class. + /// 4: The MediaEngine interface class. @JsonValue(4) agoraIidMediaEngine, @@ -2898,6 +2898,10 @@ enum LocalVideoStreamError { /// @nodoc @JsonValue(27) localVideoStreamErrorScreenCaptureWindowRecoverFromMinimized, + + /// @nodoc + @JsonValue(30) + localVideoStreamReasonScreenCaptureDisplayDiscnnected, } /// @nodoc @@ -3863,7 +3867,7 @@ class LiveTranscoding { @JsonKey(name: 'height') final int? height; - /// Bitrate of the output video stream for Media Push in Kbps. The default value is 400 Kbps. Set this member according to the table. If you set a bitrate beyond the proper range, the SDK automatically adapts it to a value within the range. + /// The encoding bitrate (Kbps) of the video. This parameter does not need to be set; keeping the default value standardBitrate is sufficient. The SDK automatically matches the most suitable bitrate based on the video resolution and frame rate you have set. For the correspondence between video resolution and frame rate, see. @JsonKey(name: 'videoBitrate') final int? videoBitrate; @@ -4242,11 +4246,11 @@ enum ConnectionChangedReasonType { @JsonValue(2) connectionChangedInterrupted, - /// 3: The connection between the SDK and the Agora edge server is banned by the Agora edge server. This error occurs when the user is kicked out of the channel by the server. + /// 3: The connection between the SDK and the Agora edge server is banned by the Agora edge server. For example, when a user is kicked out of the channel, this status will be returned. @JsonValue(3) connectionChangedBannedByServer, - /// 4: The SDK fails to join the channel. When the SDK fails to join the channel for more than 20 minutes, this error occurs and the SDK stops reconnecting to the channel. + /// 4: The SDK fails to join the channel. When the SDK fails to join the channel for more than 20 minutes, this code will be returned and the SDK stops reconnecting to the channel. You need to prompt the user to try to switch to another network and rejoin the channel. @JsonValue(4) connectionChangedJoinFailed, @@ -4254,21 +4258,30 @@ enum ConnectionChangedReasonType { @JsonValue(5) connectionChangedLeaveChannel, - /// 6: The connection failed because the App ID is not valid. Please rejoin the channel with a valid App ID. + /// 6: The App ID is invalid. You need to rejoin the channel with a valid APP ID and make sure the App ID you are using is consistent with the one generated in the Agora Console. @JsonValue(6) connectionChangedInvalidAppId, - /// 7: The connection failed since channel name is not valid. Rejoin the channel with a valid channel name. + /// 7: Invalid channel name. Rejoin the channel with a valid channel name. A valid channel name is a string of up to 64 bytes in length. Supported characters (89 characters in total): + /// All lowercase English letters: a to z. + /// All uppercase English letters: A to Z. + /// All numeric characters: 0 to 9. + /// Space + /// "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", "," @JsonValue(7) connectionChangedInvalidChannelName, - /// 8: The connection failed because the token is not valid. Possible reasons are as follows: - /// The App Certificate for the project is enabled in Agora Console, but you do not use a token when joining the channel. If you enable the App Certificate, you must use a token to join the channel. + /// 8: Invalid token. Possible reasons are as follows: + /// The App Certificate for the project is enabled in Agora Console, but you do not pass in a token when joining a channel. /// The uid specified when calling joinChannel to join the channel is inconsistent with the uid passed in when generating the token. + /// The generated token and the token used to join the channel are not consistent. Ensure the following: + /// When your project enables App Certificate, you need to pass in a token to join a channel. + /// The user ID specified when generating the token is consistent with the user ID used when joining the channel. + /// The generated token is the same as the token passed in to join the channel. @JsonValue(8) connectionChangedInvalidToken, - /// 9: The connection failed since token is expired. + /// (9): The token currently being used has expired. You need to generate a new token on your server and rejoin the channel with the new token. @JsonValue(9) connectionChangedTokenExpired, @@ -4286,7 +4299,7 @@ enum ConnectionChangedReasonType { @JsonValue(12) connectionChangedRenewToken, - /// 13: The IP address of the client has changed, possibly because the network type, IP address, or port has been changed. + /// (13): Client IP address changed. If you receive this code multiple times, You need to prompt the user to switch networks and try joining the channel again. @JsonValue(13) connectionChangedClientIpAddressChanged, @@ -5359,7 +5372,7 @@ class ScreenCaptureParameters { @JsonKey(name: 'captureMouseCursor') final bool? captureMouseCursor; - /// Whether to bring the window to the front when calling the startScreenCaptureByWindowId method to share it: true : Bring the window to the front. false : (Default) Do not bring the window to the front. + /// Whether to bring the window to the front when calling the startScreenCaptureByWindowId method to share it: true : Bring the window to the front. false : (Default) Do not bring the window to the front. Due to macOS system limitations, when setting this member to bring the window to the front, if the current app has multiple windows, only the main window will be brought to the front. @JsonKey(name: 'windowFocus') final bool? windowFocus; @@ -6588,41 +6601,41 @@ class VideoRenderingTracingInfo { this.remoteJoined2UnmuteVideo, this.remoteJoined2PacketReceived}); - /// The time interval from calling the startMediaRenderingTracing method to SDK triggering the onVideoRenderingTracingResult callback. The unit is milliseconds. Agora recommends you call startMediaRenderingTracing before joining a channel. + /// The time interval (ms) from startMediaRenderingTracing to SDK triggering the onVideoRenderingTracingResult callback. Agora recommends you call startMediaRenderingTracing before joining a channel. @JsonKey(name: 'elapsedTime') final int? elapsedTime; - /// The time interval from calling startMediaRenderingTracing to calling joinChannel. The unit is milliseconds. A negative number means to call joinChannel after calling startMediaRenderingTracing. + /// The time interval (ms) from startMediaRenderingTracing to joinChannel. A negative number indicates that startMediaRenderingTracing is called after calling joinChannel. @JsonKey(name: 'start2JoinChannel') final int? start2JoinChannel; - /// Time interval from calling joinChannel to successfully joining the channel. The unit is milliseconds. + /// The time interval (ms) from or joinChannel to successfully joining the channel. @JsonKey(name: 'join2JoinSuccess') final int? join2JoinSuccess; - /// If the local user calls startMediaRenderingTracing before successfully joining the channel, this value is the time interval from the local user successfully joining the channel to the remote user joining the channel. The unit is milliseconds. - /// If the local user calls startMediaRenderingTracing after successfully joining the channel, the value is the time interval from calling startMediaRenderingTracing to when the remote user joins the channel. The unit is milliseconds. + /// If the local user calls startMediaRenderingTracing before successfully joining the channel, this value is the time interval (ms) from the local user successfully joining the channel to the remote user joining the channel. + /// If the local user calls startMediaRenderingTracing after successfully joining the channel, the value is the time interval (ms) from startMediaRenderingTracing to when the remote user joins the channel. /// If the local user calls startMediaRenderingTracing after the remote user joins the channel, the value is 0 and meaningless. /// In order to reduce the time of rendering the first frame for remote users, Agora recommends that the local user joins the channel when the remote user is in the channel to reduce this value. @JsonKey(name: 'joinSuccess2RemoteJoined') final int? joinSuccess2RemoteJoined; - /// If the local user calls startMediaRenderingTracing before the remote user joins the channel, this value is the time interval from when the remote user joins the channel to when the local user sets the remote view. The unit is milliseconds. - /// If the local user calls startMediaRenderingTracing after the remote user joins the channel, this value is the time interval from calling startMediaRenderingTracing to setting the remote view. The unit is milliseconds. + /// If the local user calls startMediaRenderingTracing before the remote user joins the channel, this value is the time interval (ms) from when the remote user joins the channel to when the local user sets the remote view. + /// If the local user calls startMediaRenderingTracing after the remote user joins the channel, this value is the time interval (ms) from calling startMediaRenderingTracing to setting the remote view. /// If the local user calls startMediaRenderingTracing after setting the remote view, the value is 0 and has no effect. /// In order to reduce the time of rendering the first frame for remote users, Agora recommends that the local user sets the remote view before the remote user joins the channel, or sets the remote view immediately after the remote user joins the channel to reduce this value. @JsonKey(name: 'remoteJoined2SetView') final int? remoteJoined2SetView; - /// If the local user calls startMediaRenderingTracing before the remote user joins the channel, this value is the time interval from the remote user joining the channel to subscribing to the remote video stream. The unit is milliseconds. - /// If the local user calls startMediaRenderingTracing after the remote user joins the channel, this value is the time interval from calling startMediaRenderingTracing to subscribing to the remote video stream. The unit is milliseconds. + /// If the local user calls startMediaRenderingTracing before the remote user joins the channel, this value is the time interval (ms) from the remote user joining the channel to subscribing to the remote video stream. + /// If the local user calls startMediaRenderingTracing after the remote user joins the channel, this value is the time interval (ms) from startMediaRenderingTracing to subscribing to the remote video stream. /// If the local user calls startMediaRenderingTracing after subscribing to the remote video stream, the value is 0 and has no effect. /// In order to reduce the time of rendering the first frame for remote users, Agora recommends that after the remote user joins the channel, the local user immediately subscribes to the remote video stream to reduce this value. @JsonKey(name: 'remoteJoined2UnmuteVideo') final int? remoteJoined2UnmuteVideo; - /// If the local user calls startMediaRenderingTracing before the remote user joins the channel, this value is the time interval from when the remote user joins the channel to when the local user receives the remote video stream. The unit is milliseconds. - /// If the local user calls startMediaRenderingTracing after the remote user joins the channel, this value is the time interval from calling startMediaRenderingTracing to receiving the remote video stream. The unit is milliseconds. + /// If the local user calls startMediaRenderingTracing before the remote user joins the channel, this value is the time interval (ms) from when the remote user joins the channel to when the local user receives the remote video stream. + /// If the local user calls startMediaRenderingTracing after the remote user joins the channel, this value is the time interval (ms) from startMediaRenderingTracing to receiving the remote video stream. /// If the local user calls startMediaRenderingTracing after receiving the remote video stream, the value is 0 and has no effect. /// In order to reduce the time of rendering the first frame for remote users, Agora recommends that the remote user publishes video streams immediately after joining the channel, and the local user immediately subscribes to remote video streams to reduce this value. @JsonKey(name: 'remoteJoined2PacketReceived') diff --git a/lib/src/agora_base.g.dart b/lib/src/agora_base.g.dart index 01c67905d..8df0d8488 100644 --- a/lib/src/agora_base.g.dart +++ b/lib/src/agora_base.g.dart @@ -2453,6 +2453,8 @@ const _$LocalVideoStreamErrorEnumMap = { .localVideoStreamErrorScreenCaptureWindowRecoverFromHidden: 26, LocalVideoStreamError .localVideoStreamErrorScreenCaptureWindowRecoverFromMinimized: 27, + LocalVideoStreamError.localVideoStreamReasonScreenCaptureDisplayDiscnnected: + 30, }; const _$RemoteAudioStateEnumMap = { diff --git a/lib/src/agora_media_base.dart b/lib/src/agora_media_base.dart index 3c3e9064e..f5cb4a9ed 100644 --- a/lib/src/agora_media_base.dart +++ b/lib/src/agora_media_base.dart @@ -1504,9 +1504,9 @@ class VideoFrameObserver { /// /// * [sourceType] Video source types, including cameras, screens, or media player. See VideoSourceType. /// * [videoFrame] The video frame. See VideoFrame. The default value of the video frame data format obtained through this callback is as follows: - /// Android: I420 or RGB (GLES20.GL_TEXTURE_2D) - /// iOS: I420 or CVPixelBufferRef - /// macOS: I420 or CVPixelBufferRef + /// Android: I420 + /// iOS: I420 + /// macOS: I420 /// Windows: YUV420 final void Function(VideoSourceType sourceType, VideoFrame videoFrame)? onCaptureVideoFrame; @@ -1518,9 +1518,9 @@ class VideoFrameObserver { /// The video data that this callback gets has been preprocessed, with its content cropped and rotated, and the image enhanced. /// /// * [videoFrame] The video frame. See VideoFrame. The default value of the video frame data format obtained through this callback is as follows: - /// Android: I420 or RGB (GLES20.GL_TEXTURE_2D) - /// iOS: I420 or CVPixelBufferRef - /// macOS: I420 or CVPixelBufferRef + /// Android: I420 + /// iOS: I420 + /// macOS: I420 /// Windows: YUV420 /// * [sourceType] The type of the video source. See VideoSourceType. final void Function(VideoSourceType sourceType, VideoFrame videoFrame)? @@ -1537,9 +1537,9 @@ class VideoFrameObserver { /// Due to framework limitations, this callback does not support sending processed video data back to the SDK. /// /// * [videoFrame] The video frame. See VideoFrame. The default value of the video frame data format obtained through this callback is as follows: - /// Android: I420 or RGB (GLES20.GL_TEXTURE_2D) - /// iOS: I420 or CVPixelBufferRef - /// macOS: I420 or CVPixelBufferRef + /// Android: I420 + /// iOS: I420 + /// macOS: I420 /// Windows: YUV420 /// * [remoteUid] The user ID of the remote user who sends the current video frame. /// * [channelId] The channel ID. @@ -1757,7 +1757,7 @@ class MediaRecorderConfiguration { /// Facial information observer. /// -/// You can call registerFaceInfoObserver to register or unregister the FaceInfoObserver object. +/// You can call registerFaceInfoObserver to register one FaceInfoObserver observer. class FaceInfoObserver { /// @nodoc const FaceInfoObserver({ diff --git a/lib/src/agora_rtc_engine.dart b/lib/src/agora_rtc_engine.dart index 3ea9634cb..d08bd69ee 100644 --- a/lib/src/agora_rtc_engine.dart +++ b/lib/src/agora_rtc_engine.dart @@ -1285,7 +1285,7 @@ class ImageTrackOptions { /// The channel media options. /// -/// Agora supports publishing multiple audio streams and one video stream at the same time and in the same RtcConnection. For example, publishMicrophoneTrack, publishCustomAudioTrack, and publishMediaPlayerAudioTrack can be set as true at the same time, but only one of publishCameraTrack, publishScreenCaptureVideo publishScreenTrack, publishCustomVideoTrack, or publishEncodedVideoTrack can be set as true. Agora recommends that you set member parameter values yourself according to your business scenario, otherwise the SDK will automatically assign values to member parameters. +/// Agora supports publishing multiple audio streams and one video stream at the same time and in the same RtcConnection. For example, publishMicrophoneTrack, publishCustomAudioTrack, and publishMediaPlayerAudioTrack can be set as true at the same time, but only one of publishCameraTrack, publishScreenCaptureVideo, publishScreenTrack, publishCustomVideoTrack, or publishEncodedVideoTrack can be set as true. Agora recommends that you set member parameter values yourself according to your business scenario, otherwise the SDK will automatically assign values to member parameters. @JsonSerializable(explicitToJson: true, includeIfNull: false) class ChannelMediaOptions { /// @nodoc @@ -1765,9 +1765,7 @@ class RtcEngineEventHandler { /// * [stats] The statistics of the call. See RtcStats. final void Function(RtcConnection connection, RtcStats stats)? onLeaveChannel; - /// Reports the statistics of the current call. - /// - /// The SDK triggers this callback once every two seconds after the user joins the channel. + /// Reports the statistics about the current call. /// /// * [connection] The connection information. See RtcConnection. /// * [stats] Statistics of the RTC engine. See RtcStats. @@ -1853,7 +1851,7 @@ class RtcEngineEventHandler { /// * [source] The type of the video source. See VideoSourceType. /// * [width] The width (px) of the first local video frame. /// * [height] The height (px) of the first local video frame. - /// * [elapsed] Time elapsed (ms) from the local user calling joinChannel until the SDK triggers this callback. If you call startPreview before calling joinChannel, then this parameter is the time elapsed from calling the startPreview method until the SDK triggers this callback. + /// * [elapsed] The time elapsed (ms) from the local user calling joinChannel to join the channel to when the SDK triggers this callback. If startPreviewWithoutSourceType / startPreview is called before joining the channel, this parameter indicates the time elapsed from calling startPreviewWithoutSourceType or startPreview to when this event occurred. final void Function( VideoSourceType source, int width, int height, int elapsed)? onFirstLocalVideoFrame; @@ -1861,12 +1859,12 @@ class RtcEngineEventHandler { /// Occurs when the first video frame is published. /// /// The SDK triggers this callback under one of the following circumstances: - /// The local client enables the video module and calls joinChannel successfully. + /// The local client enables the video module and calls joinChannel to join the channel successfully. /// The local client calls muteLocalVideoStream (true) and muteLocalVideoStream (false) in sequence. /// The local client calls disableVideo and enableVideo in sequence. /// /// * [connection] The connection information. See RtcConnection. - /// * [elapsed] Time elapsed (ms) from the local user calling joinChannel until the SDK triggers this callback. + /// * [elapsed] Time elapsed (ms) from the local user calling joinChannel until this callback is triggered. final void Function(VideoSourceType source, int elapsed)? onFirstLocalVideoFramePublished; @@ -2160,19 +2158,25 @@ class RtcEngineEventHandler { /// 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. When receiving this callback, you need to generate a new token on your token server and you can renew your token through one of the following ways: + /// The SDK triggers this callback if the token expires. When receiving this callback, you need to generate a new token on your token server and you can renew your token through one of the following ways: + /// In scenarios involving one channel: /// Call renewToken to pass in the new token. /// Call leaveChannel to leave the current channel and then pass in the new token when you call joinChannel to join a channel. + /// In scenarios involving mutiple channels: Call updateChannelMediaOptionsEx to pass in the new token. /// /// * [connection] The connection information. See RtcConnection. final void Function(RtcConnection connection)? onRequestToken; /// Occurs when the token expires in 30 seconds. /// - /// When the token is about to expire in 30 seconds, the SDK triggers this callback to remind the app to renew the token. Upon receiving this callback, you need to generate a new token on your server, and call renewToken to pass the new token to the SDK. In scenarios involving multiple channels, you need to call updateChannelMediaOptionsEx to pass the new token to the SDK. + /// When receiving this callback, you need to generate a new token on your token server and you can renew your token through one of the following ways: + /// In scenarios involving one channel: + /// Call renewToken to pass in the new token. + /// Call leaveChannel to leave the current channel and then pass in the new token when you call joinChannel to join a channel. + /// In scenarios involving mutiple channels: Call updateChannelMediaOptionsEx to pass in the new token. /// /// * [connection] The connection information. See RtcConnection. - /// * [token] The token that expires in 30 seconds. + /// * [token] The token that is about to expire. final void Function(RtcConnection connection, String token)? onTokenPrivilegeWillExpire; @@ -3135,11 +3139,7 @@ abstract class RtcEngine { /// Preloads a channel with token, channelId, and uid. /// - /// When audience members need to switch between different channels frequently, calling the method can help shortening the time of joining a channel, thus reducing the time it takes for audience members to hear and see the host. As it may take a while for the SDK to preload a channel, Agora recommends that you call this method as soon as possible after obtaining the channel name and user ID to join a channel. - /// When calling this method, ensure you set the user role as audience and do not set the audio scenario as audioScenarioChorus, otherwise, this method does not take effect. - /// You also need to make sure that the channel name, user ID and token passed in for preloading are the same as the values passed in when joinning the channel, otherwise, this method does not take effect. - /// One RtcEngine instance supports preloading 20 channels at most. When exceeding this limit, the latest 20 preloaded channels take effect. - /// Failing to preload a channel does not mean that you can't join a channel, nor will it increase the time of joining a channel. If you join a preloaded channel, leave it and want to rejoin the same channel, you do not need to call this method unless the token for preloading the channel expires. + /// When audience members need to switch between different channels frequently, calling the method can help shortening the time of joining a channel, thus reducing the time it takes for audience members to hear and see the host. If you join a preloaded channel, leave it and want to rejoin the same channel, you do not need to call this method unless the token for preloading the channel expires. Failing to preload a channel does not mean that you can't join a channel, nor will it increase the time of joining a channel. /// /// * [token] The token generated on your server for authentication. When the token for preloading channels expires, you can update the token based on the number of channels you preload. /// When preloading one channel, calling this method to pass in the new token. @@ -3152,7 +3152,7 @@ abstract class RtcEngine { /// All numeric characters: 0 to 9. /// Space /// "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", "," - /// * [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 returns it in the onJoinChannelSuccess callback. Your application must record and maintain the returned user ID, because the SDK does not do so. + /// * [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. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. @@ -3188,7 +3188,7 @@ abstract class RtcEngine { /// All numeric characters: 0 to 9. /// Space /// "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", "," - /// * [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 returns it in the onJoinChannelSuccess callback. Your app must record and maintain the returned user ID, because the SDK does not do so. + /// * [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. /// * [options] The channel media options. See ChannelMediaOptions. /// /// Returns @@ -3228,7 +3228,7 @@ abstract class RtcEngine { /// Renews the token. /// - /// The SDK triggers the onTokenPrivilegeWillExpire callback. onConnectionStateChanged The connectionChangedTokenExpired callback reports (9). + /// You can call this method to pass a new token to the SDK. A token will expire after a certain period of time, at which point the SDK will be unable to establish a connection with the server. /// /// * [token] The new token. /// @@ -3320,9 +3320,7 @@ abstract class RtcEngine { /// Disables the video module. /// - /// This method can be called before joining a channel or during a call to disable the video module. If it is called before joining a channel, an audio call starts when you join the channel; if called during a call, a video call switches to an audio call. Call enableVideo to enable the video module. A successful call of this method triggers the onUserEnableVideo (false) callback on the remote client. - /// This method affects the internal engine and can be called after leaving the channel. - /// This method resets the internal engine and thus might takes some time to take effect. Agora recommends using the following APIs to control the video modules separately: enableLocalVideo : Whether to enable the camera to create the local video stream. muteLocalVideoStream : Whether to publish the local video stream. muteRemoteVideoStream : Whether to subscribe to and play the remote video stream. muteAllRemoteVideoStreams : Whether to subscribe to and play all remote video streams. + /// This method is used to disable the video module. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. @@ -3330,12 +3328,7 @@ abstract class RtcEngine { /// Enables the local video preview and specifies the video source for the preview. /// - /// You can call this method to enable local video preview. Call this method after the following: - /// Call setupLocalVideo to initialize the local preview. - /// Call enableVideo to enable the video module. - /// The local preview enables the mirror mode by default. - /// After the local video preview is enabled, if you call leaveChannel to exit the channel, the local preview remains until you call stopPreview to disable it. - /// The video source type set in this method needs to be consistent with the video source type of VideoCanvas you set in setupLocalVideo. + /// This method is used to start local video preview and specify the video source that appears in the preview screen. /// /// * [sourceType] The type of the video source. See VideoSourceType. /// @@ -3346,8 +3339,6 @@ abstract class RtcEngine { /// Stops the local video preview. /// - /// After calling startPreview to start the preview, if you want to close the local video preview, call this method. Call this method before joining a channel or after leaving a channel. - /// /// * [sourceType] The type of the video source. See VideoSourceType. /// /// Returns @@ -3376,7 +3367,7 @@ abstract class RtcEngine { /// Sets the video encoder configuration. /// - /// Sets the encoder configuration for the local video. Each configuration profile corresponds to a set of video parameters, including the resolution, frame rate, and bitrate. The config specified in this method is the maximum value under ideal network conditions. If the video engine cannot render the video using the specified config due to unreliable network conditions, the parameters further down the list are considered until a successful configuration is found. 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. + /// Sets the encoder configuration for the local video. Each configuration profile corresponds to a set of video parameters, including the resolution, frame rate, and bitrate. /// /// * [config] Video profile. See VideoEncoderConfiguration. /// @@ -3551,10 +3542,7 @@ abstract class RtcEngine { /// Enables the audio module. /// - /// The audio mode is enabled by default. - /// This method enables the internal engine and can be called anytime after initialization. It is still valid after one leaves channel. - /// Calling this method will reset the entire engine, resulting in a slow response time. Instead of callling this method, you can independently control a specific audio module based on your actual needs using the following methods: enableLocalAudio : Whether to enable the microphone to create the local audio stream. muteLocalAudioStream : Whether to publish the local audio stream. muteRemoteAudioStream : Whether to subscribe and play the remote audio stream. muteAllRemoteAudioStreams : Whether to subscribe to and play all remote audio streams. - /// A successful call of this method resets enableLocalAudio, muteRemoteAudioStream, and muteAllRemoteAudioStreams. Proceed it with caution. + /// The audio module is enabled by default After calling disableAudio to disable the audio module, you can call this method to re-enable it. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. @@ -3562,8 +3550,7 @@ abstract class RtcEngine { /// Disables the audio module. /// - /// This method disables the internal engine and can be called anytime after initialization. It is still valid after one leaves channel. - /// This method resets the internal engine and takes some time to take effect. Agora recommends using the following API methods to control the audio modules separately: enableLocalAudio : Whether to enable the microphone to create the local audio stream. enableLoopbackRecording : Whether to enable loopback audio capturing. muteLocalAudioStream : Whether to publish the local audio stream. muteRemoteAudioStream : Whether to subscribe and play the remote audio stream. muteAllRemoteAudioStreams : Whether to subscribe to and play all remote audio streams. + /// The audio module is enabled by default, and you can call this method to disable the audio module. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. @@ -3571,10 +3558,6 @@ abstract class RtcEngine { /// Sets the audio profile and audio scenario. /// - /// You can call this method either before or after joining a channel. - /// Due to iOS system restrictions, some audio routes cannot be recognized in call volume mode. Therefore, if you need to use an external sound card, it is recommended to set the audio scenario to audioScenarioGameStreaming (3). In this scenario, the SDK will switch to media volume to avoid this issue. - /// In scenarios requiring high-quality audio, such as online music tutoring, Agora recommends you set profile as audioProfileMusicHighQuality (4) and scenario as audioScenarioGameStreaming (3). - /// /// * [profile] The audio profile, including the sampling rate, bitrate, encoding mode, and the number of channels. See AudioProfileType. /// * [scenario] The audio scenarios. Under different audio scenarios, the device uses different volume types. See AudioScenarioType. /// @@ -3586,9 +3569,6 @@ abstract class RtcEngine { /// Sets audio scenarios. /// - /// Due to iOS system restrictions, some audio routes cannot be recognized in call volume mode. Therefore, if you need to use an external sound card, it is recommended to set the audio scenario to audioScenarioGameStreaming (3). In this scenario, the SDK will switch to media volume to avoid this issue. - /// You can call this method either before or after joining a channel. - /// /// * [scenario] The audio scenarios. Under different audio scenarios, the device uses different volume types. See AudioScenarioType. /// /// Returns @@ -3597,9 +3577,7 @@ abstract class RtcEngine { /// Enables or disables the local audio capture. /// - /// The audio function is enabled by default when users joining a channel. This method disables or re-enables the local audio function to stop or restart local audio capturing. This method does not affect receiving the remote audio streams, and enableLocalAudio (false) is applicable to scenarios where the user wants to receive remote audio streams without sending any audio stream to other users in the channel. Once the local audio function is disabled or re-enabled, the SDK triggers the onLocalAudioStateChanged callback, which reports localAudioStreamStateStopped (0) or localAudioStreamStateRecording (1). - /// The difference between this method and muteLocalAudioStream are as follow: enableLocalAudio : Disables or re-enables the local audio capturing and processing. If you disable or re-enable local audio capturing using the enableLocalAudio method, the local user might hear a pause in the remote audio playback. muteLocalAudioStream : Sends or stops sending the local audio streams. - /// You can call this method either before or after joining a channel. Calling it before joining a channel only sets the device state, and it takes effect immediately after you join the channel. + /// The audio function is enabled by default when users joining a channel. This method disables or re-enables the local audio function to stop or restart local audio capturing. The difference between this method and muteLocalAudioStream are as follows: enableLocalAudio : Disables or re-enables the local audio capturing and processing. If you disable or re-enable local audio capturing using the enableLocalAudio method, the local user might hear a pause in the remote audio playback. muteLocalAudioStream : Sends or stops sending the local audio streams without affecting the audio capture status. /// /// * [enabled] true : (Default) Re-enable the local audio function, that is, to start the local audio capturing device (for example, the microphone). false : Disable the local audio function, that is, to stop local audio capturing. /// @@ -3797,7 +3775,7 @@ abstract class RtcEngine { /// Enables the reporting of users' volume indication. /// - /// This method enables the SDK to regularly report the volume information to the app of the local user who sends a stream and remote users (three users at most) whose instantaneous volumes are the highest. Once you call this method and users send streams in the channel, the SDK triggers the onAudioVolumeIndication callback at the time interval set in this method. You can call this method either before or after joining a channel. + /// This method enables the SDK to regularly report the volume information to the app of the local user who sends a stream and remote users (three users at most) whose instantaneous volumes are the highest. /// /// * [interval] Sets the time interval between two consecutive volume indications: /// ≤ 0: Disables the volume indication. @@ -3807,7 +3785,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableAudioVolumeIndication( {required int interval, required int smooth, required bool reportVad}); @@ -4735,10 +4712,10 @@ abstract class RtcEngine { /// Adjusts the capturing signal volume. /// - /// You can call this method either before or after joining a channel. + /// If you only need to mute the audio signal, Agora recommends that you use muteRecordingSignal instead. /// /// * [volume] The volume of the user. The value range is [0,400]. - /// 0: Mute. If you only need to mute the audio signal, Agora recommends that you use muteRecordingSignal instead. + /// 0: Mute. /// 100: (Default) The original volume. /// 400: Four times the original volume (amplifying the audio signals by four times). /// @@ -4756,11 +4733,10 @@ abstract class RtcEngine { /// 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. + /// This method is used to adjust the signal volume of all remote users mixed and played locally. If you need to adjust the signal volume of a specified remote user played locally, it is recommended that you call adjustUserPlaybackSignalVolume instead. /// /// * [volume] The volume of the user. The value range is [0,400]. - /// 0: Mute. If you only need to mute the audio signal, Agora recommends that you use muteRecordingSignal instead. + /// 0: Mute. /// 100: (Default) The original volume. /// 400: Four times the original volume (amplifying the audio signals by four times). /// @@ -4771,11 +4747,12 @@ abstract class RtcEngine { /// Adjusts the playback signal volume of a specified remote user. /// /// You can call this method to adjust the playback volume of a specified remote user. To adjust the playback volume of different remote users, call the method as many times, once for each remote user. - /// Call this method after joining a channel. - /// The playback volume here refers to the mixed volume of a specified remote user. /// /// * [uid] The user ID of the remote user. - /// * [volume] Audio mixing volume. The value ranges between 0 and 100. The default value is 100, which means the original volume. + /// * [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 /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. @@ -4851,20 +4828,18 @@ abstract class RtcEngine { /// Sets the volume of the in-ear monitor. /// - /// You can call this method either before or after joining a channel. - /// - /// * [volume] The volume of the in-ear monitor. The value range is [0,400]. + /// * [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. + /// 400: Four times the original volume (amplifying the audio signals by four times). /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. Future setInEarMonitoringVolume(int volume); - /// Adds an extension to the SDK. + /// Loads an extension. /// - /// (For Windows and Android only) + /// This method is used to add extensions external to the SDK (such as those from Extensions Marketplace and SDK extensions) to the SDK. /// /// * [path] The extension library path and name. For example: /library/libagora_segmentation_extension.dll. /// * [unloadAfterUse] Whether to uninstall the current extension when you no longer using it: true : Uninstall the extension when the RtcEngine is destroyed. false : (Rcommended) Do not uninstall the extension until the process terminates. @@ -4876,7 +4851,7 @@ abstract class RtcEngine { /// Sets the properties of the extension provider. /// - /// You can call this method to set the attributes of the extension provider and initialize the relevant parameters according to the type of the provider. Call this method after enableExtension, and before enabling the audio (enableAudio / enableLocalAudio) or the video (enableVideo / enableLocalVideo). + /// You can call this method to set the attributes of the extension provider and initialize the relevant parameters according to the type of the provider. /// /// * [provider] The name of the extension provider. /// * [key] The key of the extension. @@ -4889,9 +4864,7 @@ abstract class RtcEngine { /// Registers an extension. /// - /// After the extension is loaded, you can call this method to register the extension. - /// Before calling this method, you need to call loadExtensionProvider to load the extension first. - /// For extensions external to the SDK (such as those from Extensions Marketplace and SDK Extensions), you need to call this method before calling setExtensionProperty. + /// For extensions external to the SDK (such as those from Extensions Marketplace and SDK Extensions), you need to load them before calling this method. Extensions internal to the SDK (those included in the full SDK package) are automatically loaded and registered after the initialization of RtcEngine. /// /// * [provider] The name of the extension provider. /// * [extension] The name of the extension. @@ -4906,10 +4879,6 @@ abstract class RtcEngine { /// Enables or disables extensions. /// - /// To call this method, call it immediately after initializing the RtcEngine object. - /// If you want to enable multiple extensions, you need to call this method multiple times. - /// The data processing order of different extensions in the SDK is determined by the order in which the extensions are enabled. That is, the extension that is enabled first will process the data first. - /// /// * [provider] The name of the extension provider. /// * [extension] The name of the extension. /// * [enable] Whether to enable the extension: true : Enable the extension. false : Disable the extension. @@ -5211,7 +5180,7 @@ abstract class RtcEngine { /// Sets the default audio playback route. /// - /// This method applies to Android and iOS only. + /// This method is for Android and iOS only. /// Ensure that you call this method before joining a channel. If you need to change the audio route after joining a channel, call setEnableSpeakerphone. Most mobile phones have two audio routes: an earpiece at the top, and a speakerphone at the bottom. The earpiece plays at a lower volume, and the speakerphone at a higher volume. When setting the default audio route, you determine whether audio playback comes through the earpiece or speakerphone when no external audio device is connected. In different scenarios, the default audio routing of the system is also different. See the following: /// Voice call: Earpiece. /// Audio broadcast: Speakerphone. @@ -5226,8 +5195,8 @@ abstract class RtcEngine { /// Enables/Disables the audio route to the speakerphone. /// - /// If the default audio route of the SDK (see Set the Audio Route) or the setting in setDefaultAudioRouteToSpeakerphone cannot meet your requirements, you can call setEnableSpeakerphone to switch the current audio route. After a successful method call, the SDK triggers the onAudioRoutingChanged callback. This method only sets the audio route in the current channel and does not influence the default audio route. If the user leaves the current channel and joins another channel, the default audio route is used. - /// This method applies to Android and iOS only. + /// If the default audio route of the SDK or the setting in setDefaultAudioRouteToSpeakerphone cannot meet your requirements, you can call setEnableSpeakerphone to switch the current audio route. After a successful method call, the SDK triggers the onAudioRoutingChanged callback. For the default audio route in different scenarios, see Audio Route. This method only sets the audio route in the current channel and does not influence the default audio route. If the user leaves the current channel and joins another channel, the default audio route is used. + /// This method is for Android and iOS only. /// Call this method after joining a channel. /// If the user uses an external audio playback device such as a Bluetooth or wired headset, this method does not take effect, and the SDK plays audio through the external device. When the user uses multiple external devices, the SDK plays audio through the last connected device. /// @@ -5302,9 +5271,7 @@ abstract class RtcEngine { /// Captures the screen by specifying the display ID. /// - /// This method shares a screen or part of the screen. 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 is for Windows and macOS only. + /// Captures the video stream of a screen or a part of the screen area. This method is for Windows and macOS only. /// /// * [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. /// * [regionRect] (Optional) Sets the relative location of the region to the screen. Pass in nil to share the entire screen. See Rectangle. @@ -5319,9 +5286,9 @@ abstract class RtcEngine { /// Captures the whole or part of a screen by specifying the screen rect. /// - /// There are two ways to start screen sharing, you can choose one according to your needs: + /// You can call this method either before or after joining the channel, with the following differences: /// 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. Deprecated: This method is deprecated. Use startScreenCaptureByDisplayId instead. Agora strongly recommends using startScreenCaptureByDisplayId if you need to start screen sharing on a device connected to another display. This method shares a screen or part of the screen. You need to specify the area of the screen to be shared. This method applies to Windows only. + /// Call this method after joining a channel, and then call updateChannelMediaOptions to join a channel and set publishScreenTrack or publishSecondaryScreenTrack to true to start screen sharing. Deprecated: This method is deprecated. Use startScreenCaptureByDisplayId instead. Agora strongly recommends using startScreenCaptureByDisplayId if you need to start screen sharing on a device connected to another display. This method shares a screen or part of the screen. You need to specify the area of the screen to be shared. This method applies to Windows only. /// /// * [screenRect] Sets the relative location of the screen to the virtual screen. /// * [regionRect] 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 screen, the SDK shares only the region within it; if you set width or height as 0, the SDK shares the whole screen. @@ -5348,11 +5315,7 @@ abstract class RtcEngine { /// Captures 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 captures a window or part of the window. You need to specify the ID of the window to be captured. - /// This method applies to the macOS and Windows 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: + /// This method captures a window or part of the window. You need to specify the ID of the window to be captured. This method applies to the macOS and Windows only. 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: /// /// * [windowId] The ID of the window to be shared. /// * [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. @@ -5399,21 +5362,10 @@ abstract class RtcEngine { /// Starts screen capture. /// - /// There are two options for enabling screen sharing. You can choose the one that best suits your specific scenario: - /// Call this method before joining a channel, then call joinChannel to join channel and set publishScreenCaptureVideo to true to start screen sharing. - /// Call this method after joining a channel, then call updateChannelMediaOptions and set publishScreenCaptureVideo to true to start screen sharing. - /// This method applies to Android and iOS only. - /// On the iOS platform, screen sharing is only available on iOS 12.0 and later. - /// The billing for the screen sharing stream is based on the dimensions in ScreenVideoParameters. When you do not pass in a value, Agora bills you at 1280 × 720; when you pass a value in, Agora bills you at that value. For billing details, see. - /// If you are using the custom audio source instead of the SDK to capture audio, Agora recommends you add the keep-alive processing logic to your application to avoid screen sharing stopping when the application goes to the background. - /// This feature requires high-performance device, and Agora recommends that you use it on iPhone X and later models. - /// This method relies on the iOS screen sharing dynamic library AgoraReplayKitExtension.xcframework. If the dynamic library is deleted, screen sharing cannot be enabled normally. - /// On the Android platform, if the user has not granted the app screen capture permission, the SDK reports the onPermissionError (2) callback. - /// On Android 9 and later, to avoid the application being killed by the system after going to the background, Agora recommends you add the foreground service android.permission.FOREGROUND_SERVICE to the /app/Manifests/AndroidManifest.xml file. - /// Due to performance limitations, screen sharing is not supported on Android TV. - /// Due to system limitations, if you are using Huawei phones, do not adjust the video encoding resolution of the screen sharing stream during the screen sharing, or you could experience crashes. - /// Due to system limitations, some Xiaomi devices do not support capturing system audio during screen sharing. - /// To avoid system audio capture failure when screen sharing, Agora recommends that you set the audio application scenario to audioScenarioGameStreaming by using the setAudioScenario method before joining the channel. + /// This method is for Android and iOS only. + /// The billing for the screen sharing stream is based on the dimensions in ScreenVideoParameters : + /// When you do not pass in a value, Agora bills you at 1280 × 720. + /// When you pass in a value, Agora bills you at that value. For billing examples, see. /// /// * [captureParams] The screen sharing encoding parameters. 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 ScreenCaptureParameters2. /// @@ -5426,7 +5378,7 @@ abstract class RtcEngine { /// If the system audio is not captured when screen sharing is enabled, and then you want to update the parameter configuration and publish the system audio, you can refer to the following steps: /// Call this method, and set captureAudio to true. /// Call updateChannelMediaOptions, and set publishScreenCaptureAudio to true to publish the audio captured by the screen. - /// This method applies to Android and iOS only. + /// This method is for Android and iOS only. /// On the iOS platform, screen sharing is only available on iOS 12.0 and later. /// /// * [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 ScreenCaptureParameters2. @@ -5454,8 +5406,6 @@ abstract class RtcEngine { /// Stops screen capture. /// - /// After calling startScreenCaptureByWindowId or startScreenCaptureByDisplayId to start screen capture, call this method to stop screen capture. - /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. Future stopScreenCapture(); @@ -5473,7 +5423,7 @@ abstract class RtcEngine { /// Ensure that you call this method after leaving a channel. /// /// * [callId] The current call ID. You can get the call ID by calling getCallId. - /// * [rating] The rating of the call. The value is between 1 (the lowest score) and 5 (the highest score). If you set a value out of this range, the SDK returns the -2 (ERR_INVALID_ARGUMENT) error. + /// * [rating] The value is between 1 (the lowest score) and 5 (the highest score). /// * [description] A description of the call. The string length should be less than 800 bytes. /// /// Returns @@ -6257,15 +6207,11 @@ abstract class RtcEngine { /// true : The current device supports the specified feature. false : The current device does not support the specified feature. Future isFeatureAvailableOnDevice(FeatureType type); - /// Starts screen capture. + /// Starts screen capture from the specified video source. /// - /// This method, as well as startScreenCapture, startScreenCaptureByDisplayId, and startScreenCaptureByWindowId, can all be used to start screen capture, with the following differences: startScreenCapture only applies to Android and iOS, whereas this method only applies to Windows and iOS. startScreenCaptureByDisplayId and startScreenCaptureByWindowId only support capturing video from a single screen or window. By calling this method and specifying the sourceType parameter, you can capture multiple video streams used for local video mixing or multi-channel publishing. - /// This method applies to the macOS and Windows only. - /// If you call this method to start screen capture, Agora recommends that you call stopScreenCaptureBySourceType to stop the capture and avoid using stopScreenCapture. + /// This method applies to the macOS and Windows only. /// - /// * [sourceType] The type of the video source. See VideoSourceType. - /// Windows supports up to four screen capture video streams. - /// macOS supports only one screen capture video stream. You can only set this parameter to videoSourceScreen (2). + /// * [sourceType] The type of the video source. See VideoSourceType. On the macOS platform, this parameter can only be set to videoSourceScreen (2). /// * [config] The configuration of the captured screen. See ScreenCaptureConfiguration. /// /// Returns @@ -6274,11 +6220,9 @@ abstract class RtcEngine { {required VideoSourceType sourceType, required ScreenCaptureConfiguration config}); - /// Stops screen capture. + /// Stops screen capture from the specified video source. /// - /// After calling startScreenCaptureBySourceType to start capturing video from one or more screens, you can call this method and set the sourceType parameter to stop capturing from the specified screens. - /// This method applies to the macOS and Windows only. - /// If you call startScreenCapture, startScreenCaptureByWindowId, or startScreenCaptureByDisplayId to start screen capure, Agora recommends that you call stopScreenCapture instead to stop the capture. + /// This method applies to the macOS and Windows only. /// /// * [sourceType] The type of the video source. See VideoSourceType. /// @@ -6288,11 +6232,7 @@ abstract class RtcEngine { /// Enables the local video preview. /// - /// You can call this method to enable local video preview. Call this method after the following: - /// Call setupLocalVideo to initialize the local preview. - /// Call enableVideo to enable the video module. - /// The local preview enables the mirror mode by default. - /// After the local video preview is enabled, if you call leaveChannel to exit the channel, the local preview remains until you call stopPreview to disable it. + /// You can call this method to enable local video preview. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. diff --git a/lib/src/agora_rtc_engine_ex.dart b/lib/src/agora_rtc_engine_ex.dart index 23ea1e593..3fd1ce846 100644 --- a/lib/src/agora_rtc_engine_ex.dart +++ b/lib/src/agora_rtc_engine_ex.dart @@ -81,7 +81,7 @@ abstract class RtcEngineEx implements RtcEngine { /// Sets the video encoder configuration. /// - /// Sets the encoder configuration for the local video. Each configuration profile corresponds to a set of video parameters, including the resolution, frame rate, and bitrate. The config specified in this method is the maximum value under ideal network conditions. If the video engine cannot render the video using the specified config due to unreliable network conditions, the parameters further down the list are considered until a successful configuration is found. + /// Sets the encoder configuration for the local video. Each configuration profile corresponds to a set of video parameters, including the resolution, frame rate, and bitrate. /// /// * [config] Video profile. See VideoEncoderConfiguration. /// * [connection] The connection information. See RtcConnection. @@ -375,7 +375,10 @@ abstract class RtcEngineEx implements RtcEngine { /// The playback volume here refers to the mixed volume of a specified remote user. /// /// * [uid] The user ID of the remote user. - /// * [volume] Audio mixing volume. The value ranges between 0 and 100. The default value is 100, which means the original volume. + /// * [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). /// * [connection] The connection information. See RtcConnection. /// /// Returns diff --git a/lib/src/agora_spatial_audio.dart b/lib/src/agora_spatial_audio.dart index d626d4083..60b9ad952 100644 --- a/lib/src/agora_spatial_audio.dart +++ b/lib/src/agora_spatial_audio.dart @@ -168,7 +168,7 @@ abstract class BaseSpatialAudioEngine { /// Stops or resumes publishing the local audio stream. /// /// This method does not affect any ongoing audio recording, because it does not disable the audio capture device. - /// Call this method after joinChannel. + /// Call this method after the or joinChannel method. /// When using the spatial audio effect, if you need to set whether to stop subscribing to the audio stream of a specified user, Agora recommends calling this method instead of the muteLocalAudioStream method in RtcEngine. /// A successful call of this method triggers the onUserMuteAudio and onRemoteAudioStateChanged callbacks on the remote client. /// @@ -181,7 +181,7 @@ abstract class BaseSpatialAudioEngine { /// 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. + /// Call this method after the or joinChannel method. /// 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 RtcEngine. /// 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. /// @@ -227,7 +227,7 @@ abstract class BaseSpatialAudioEngine { /// Stops or resumes subscribing to the audio stream of a specified user. /// - /// Call this method after joinChannel. + /// Call this method after the or joinChannel method. /// When using the spatial audio effect, if you need to set whether to stop subscribing to the audio stream of a specified user, Agora recommends calling this method instead of the muteRemoteAudioStream method in RtcEngine. /// /// * [uid] The user ID. This parameter must be the same as the user ID passed in when the user joined the channel. @@ -253,7 +253,7 @@ abstract class LocalSpatialAudioEngine implements BaseSpatialAudioEngine { /// Updates the spatial position of the specified remote user. /// - /// After successfully calling this method, the SDK calculates the spatial audio parameters based on the relative position of the local and remote user. Call this method after joinChannel. + /// After successfully calling this method, the SDK calculates the spatial audio parameters based on the relative position of the local and remote user. Call this method after the or joinChannel method. /// /// * [uid] The user ID. This parameter must be the same as the user ID passed in when the user joined the channel. /// * [posInfo] The spatial position of the remote user. See RemoteVoicePositionInfo. diff --git a/lib/src/binding/event_handler_param_json.g.dart b/lib/src/binding/event_handler_param_json.g.dart index f015758cf..9755cc56f 100644 --- a/lib/src/binding/event_handler_param_json.g.dart +++ b/lib/src/binding/event_handler_param_json.g.dart @@ -1819,6 +1819,8 @@ const _$LocalVideoStreamErrorEnumMap = { .localVideoStreamErrorScreenCaptureWindowRecoverFromHidden: 26, LocalVideoStreamError .localVideoStreamErrorScreenCaptureWindowRecoverFromMinimized: 27, + LocalVideoStreamError.localVideoStreamReasonScreenCaptureDisplayDiscnnected: + 30, }; RtcEngineEventHandlerOnRemoteVideoStateChangedJson