diff --git a/android/build.gradle b/android/build.gradle index 5c4c6e5c2..4316ff609 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -47,9 +47,9 @@ dependencies { if (isDev(project)) { implementation fileTree(dir: "libs", include: ["*.jar"]) } else { - api 'io.agora.rtc:iris-rtc:4.1.1.21-banban.6' - api 'io.agora.rtc:agora-special-full:4.1.1.21' - api 'io.agora.rtc:full-screen-sharing:4.1.1.21' + api 'io.agora.rtc:iris-rtc:4.1.1.25-sp.1' + api 'io.agora.rtc:agora-special-full:4.1.1.25' + api 'io.agora.rtc:full-screen-sharing:4.1.1.25' } } diff --git a/ios/agora_rtc_engine.podspec b/ios/agora_rtc_engine.podspec index ae9315197..8e3d149a2 100644 --- a/ios/agora_rtc_engine.podspec +++ b/ios/agora_rtc_engine.podspec @@ -17,8 +17,8 @@ Pod::Spec.new do |s| s.source = { :path => '.' } s.source_files = 'Classes/**/*.{h,mm,m,swift}' s.dependency 'Flutter' - s.dependency 'AgoraIrisRTC_iOS', '4.1.1.21-banban.6' - s.dependency 'AgoraRtcEngine_Special_iOS', '4.1.1.21' + s.dependency 'AgoraIrisRTC_iOS', '4.1.1.25-sp.1' + s.dependency 'AgoraRtcEngine_Special_iOS', '4.1.1.25' # s.dependency 'AgoraRtcWrapper' s.platform = :ios, '9.0' s.swift_version = '5.0' diff --git a/lib/src/agora_base.dart b/lib/src/agora_base.dart index bc3ee9f17..9240f2690 100644 --- a/lib/src/agora_base.dart +++ b/lib/src/agora_base.dart @@ -1046,11 +1046,11 @@ enum VideoCodecType { @JsonValue(1) videoCodecVp8, - /// 2: (Default) Standard H.264. + /// 2: Standard H.264. @JsonValue(2) videoCodecH264, - /// 3: Standard H.265. + /// 3: (Default) Standard H.265. In certain scenarios, such as low resolution of the captured video stream or limited device performance, the SDK automatically adjusts to the H.264 encoding format. @JsonValue(3) videoCodecH265, @@ -1744,7 +1744,7 @@ class VideoEncoderConfiguration { @JsonKey(name: 'frameRate') final int? frameRate; - /// The encoding bitrate (Kbps) of the video. (0): (Recommended) Standard bitrate mode. In this mode, the bitrates of the live broadcasting profile is higher than that of the communication profile. (-1): Adaptive bitrate mode. In this mode, the bitrates of the live broadcasting profile equals that of the communication profile. If this mode is selected, the video frame rate of live broadcasting scenarios may be lower than the set value. + /// 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, frame rate, and bitrate, please refer to. standardBitrate (0): (Recommended) Standard bitrate mode. compatibleBitrate (-1): Adaptive bitrate mode. In general, Agora suggests that you do not use this value. @JsonKey(name: 'bitrate') final int? bitrate; @@ -1803,7 +1803,7 @@ class DataStreamConfig { /// The mode in which the video stream is sent. @JsonEnum(alwaysCreate: true) enum SimulcastStreamMode { - /// -1: By default, the low-quality video steam is not sent; the SDK automatically switches to low-quality video stream mode after it receives a request to subscribe to a low-quality video stream. + /// -1: By default, do not send the low-quality video stream until a subscription request for the low-quality video stream is received from the receiving end, then automatically start sending low-quality video stream. @JsonValue(-1) autoSimulcastStream, @@ -1926,7 +1926,7 @@ class WatermarkOptions { this.watermarkRatio, this.mode}); - /// Reserved for future use. + /// Is the watermark visible in the local preview view? true : (Default) The watermark is visible in the local preview view. false : The watermark is not visible in the local preview view. @JsonKey(name: 'visibleInPreview') final bool? visibleInPreview; @@ -2022,11 +2022,11 @@ class RtcStats { @JsonKey(name: 'rxVideoBytes') final int? rxVideoBytes; - /// Video transmission bitrate (Kbps), represented by an instantaneous value. + /// The actual bitrate (Kbps) while sending the local video stream. @JsonKey(name: 'txKBitRate') final int? txKBitRate; - /// The receiving bitrate (Kbps), represented by an instantaneous value. + /// The receiving bitrate (Kbps). @JsonKey(name: 'rxKBitRate') final int? rxKBitRate; @@ -2547,50 +2547,50 @@ extension LocalAudioStreamStateExt on LocalAudioStreamState { } } -/// Local audio state error codes. +/// @nodoc @JsonEnum(alwaysCreate: true) enum LocalAudioStreamError { - /// 0: The local audio is normal. + /// @nodoc @JsonValue(0) localAudioStreamErrorOk, - /// 1: No specified reason for the local audio failure. Remind your users to try to rejoin the channel. + /// @nodoc @JsonValue(1) localAudioStreamErrorFailure, - /// 2: No permission to use the local audio capturing device. Remind your users to grant permission. Deprecated: This enumerator is deprecated. Please use recordAudio in the onPermissionError callback instead. + /// @nodoc @JsonValue(2) localAudioStreamErrorDeviceNoPermission, - /// 3: (Android and iOS only) The local audio capture device is already in use. Remind your users to check whether another application occupies the microphone. Local audio capture automatically resumes after the microphone is idle for about five seconds. You can also try to rejoin the channel after the microphone is idle. + /// @nodoc @JsonValue(3) localAudioStreamErrorDeviceBusy, - /// 4: The local audio capture fails. + /// @nodoc @JsonValue(4) localAudioStreamErrorRecordFailure, - /// 5: The local audio encoding fails. + /// @nodoc @JsonValue(5) localAudioStreamErrorEncodeFailure, - /// 6: (Windows only) The application cannot find the local audio capture device. Remind your users to check whether the microphone is connected to the device properly in the control plane of the device or if the microphone is working properly. + /// @nodoc @JsonValue(6) localAudioStreamErrorNoRecordingDevice, - /// 7: (Windows only) The application cannot find the local audio playback device. Remind your users to check whether the speaker is connected to the device properly in the control plane of the device or if the speaker is working properly. + /// @nodoc @JsonValue(7) localAudioStreamErrorNoPlayoutDevice, - /// 8: (Android and iOS only) The local audio capture is interrupted by a system call, Siri, or alarm clock. Remind your users to end the phone call, Siri, or alarm clock if the local audio capture is required. + /// @nodoc @JsonValue(8) localAudioStreamErrorInterrupted, - /// 9: (Windows only) The ID of the local audio-capture device is invalid. Check the audio capture device ID. + /// @nodoc @JsonValue(9) localAudioStreamErrorRecordInvalidId, - /// 10: (Windows only) The ID of the local audio-playback device is invalid. Check the audio playback device ID. + /// @nodoc @JsonValue(10) localAudioStreamErrorPlayoutInvalidId, } @@ -2641,26 +2641,26 @@ extension LocalVideoStreamStateExt on LocalVideoStreamState { } } -/// Local video state error codes. +/// @nodoc @JsonEnum(alwaysCreate: true) enum LocalVideoStreamError { - /// 0: The local video is normal. + /// @nodoc @JsonValue(0) localVideoStreamErrorOk, - /// 1: No specified reason for the local video failure. + /// @nodoc @JsonValue(1) localVideoStreamErrorFailure, - /// 2: No permission to use the local video capturing device. Remind the user to grant permissions and rejoin the channel. Deprecated: This enumerator is deprecated. Please use camera in the onPermissionError callback instead. + /// @nodoc @JsonValue(2) localVideoStreamErrorDeviceNoPermission, - /// 3: The local video capturing device is in use. Remind the user to check whether another application occupies the camera. + /// @nodoc @JsonValue(3) localVideoStreamErrorDeviceBusy, - /// 4: The local video capture fails. Remind your user to check whether the video capture device is working properly, whether the camera is occupied by another application, or try to rejoin the channel. + /// @nodoc @JsonValue(4) localVideoStreamErrorCaptureFailure, @@ -2668,23 +2668,23 @@ enum LocalVideoStreamError { @JsonValue(5) localVideoStreamErrorCodecNotSupport, - /// 6: (iOS only) The app is in the background. Remind the user that video capture cannot be performed normally when the app is in the background. + /// @nodoc @JsonValue(6) localVideoStreamErrorCaptureInbackground, - /// 7: (iOS only) The current application window is running in Slide Over, Split View, or Picture in Picture mode, and another app is occupying the camera. Remind the user that the application cannot capture video properly when the app is running in Slide Over, Split View, or Picture in Picture mode and another app is occupying the camera. + /// @nodoc @JsonValue(7) localVideoStreamErrorCaptureMultipleForegroundApps, - /// 8: Fails to find a local video capture device. Remind the user to check whether the camera is connected to the device properly or the camera is working properly, and then to rejoin the channel. + /// @nodoc @JsonValue(8) localVideoStreamErrorDeviceNotFound, - /// 9: (macOS only) The video capture device currently in use is disconnected (such as being unplugged). + /// @nodoc @JsonValue(9) localVideoStreamErrorDeviceDisconnected, - /// 10: (macOS and Windows only) The SDK cannot find the video device in the video device list. Check whether the ID of the video device is valid. + /// @nodoc @JsonValue(10) localVideoStreamErrorDeviceInvalidId, @@ -2696,22 +2696,19 @@ enum LocalVideoStreamError { @JsonValue(15) localVideoStreamErrorDeviceFatalError, - /// 101: The current video capture device is unavailable due to excessive system pressure. + /// @nodoc @JsonValue(101) localVideoStreamErrorDeviceSystemPressure, - /// 11: (macOS only) The shared window is minimized when you call startScreenCaptureByWindowId to share a window. The SDK cannot share a minimized window. You can cancel the minimization of this window at the application layer, for example by maximizing this window. + /// @nodoc @JsonValue(11) localVideoStreamErrorScreenCaptureWindowMinimized, - /// 12: (macOS and Windows only) The error code indicates that a window shared by the window ID has been closed or a full-screen window shared by the window ID has exited full-screen mode. After exiting full-screen mode, remote users cannot see the shared window. To prevent remote users from seeing a black screen, Agora recommends that you immediately stop screen sharing. Common scenarios reporting this error code: - /// When the local user closes the shared window, the SDK reports this error code. - /// The local user shows some slides in full-screen mode first, and then shares the windows of the slides. After the user exits full-screen mode, the SDK reports this error code. - /// The local user watches a web video or reads a web document in full-screen mode first, and then shares the window of the web video or document. After the user exits full-screen mode, the SDK reports this error code. + /// @nodoc @JsonValue(12) localVideoStreamErrorScreenCaptureWindowClosed, - /// 13: (Windows only) The window being shared is overlapped by another window, so the overlapped area is blacked out by the SDK during window sharing. + /// @nodoc @JsonValue(13) localVideoStreamErrorScreenCaptureWindowOccluded, @@ -2723,15 +2720,15 @@ enum LocalVideoStreamError { @JsonValue(21) localVideoStreamErrorScreenCaptureFailure, - /// 22: (Windows and macOS only) No permission for screen capture. + /// @nodoc @JsonValue(22) localVideoStreamErrorScreenCaptureNoPermission, - /// 25: (Windows only) The window for the current screen capture is hidden and not visible on the current screen. + /// @nodoc @JsonValue(25) localVideoStreamErrorScreenCaptureWindowHidden, - /// 26: (Windows only) The window for screen capture has been restored from hidden state. + /// @nodoc @JsonValue(26) localVideoStreamErrorScreenCaptureWindowRecoverFromHidden, } @@ -2907,11 +2904,11 @@ enum RemoteVideoStateReason { @JsonValue(7) remoteVideoStateReasonRemoteOffline, - /// @nodoc + /// 8: The remote audio-and-video stream falls back to the audio-only stream due to poor network conditions. @JsonValue(8) remoteVideoStateReasonAudioFallback, - /// @nodoc + /// 9: The remote audio-only stream switches back to the audio-and-video stream after the network conditions improve. @JsonValue(9) remoteVideoStateReasonAudioFallbackRecovery, @@ -3298,7 +3295,7 @@ class LocalAudioStats { @JsonKey(name: 'txPacketLossRate') final int? txPacketLossRate; - /// The delay of the audio device module when playing or recording audio. + /// The audio device module delay (ms) when playing or recording audio. @JsonKey(name: 'audioDeviceDelay') final int? audioDeviceDelay; @@ -3306,11 +3303,11 @@ class LocalAudioStats { @JsonKey(name: 'audioPlayoutDelay') final int? audioPlayoutDelay; - /// @nodoc + /// The ear monitor delay (ms), which is the delay from microphone input to headphone output. @JsonKey(name: 'earMonitorDelay') final int? earMonitorDelay; - /// @nodoc + /// Acoustic echo cancellation (AEC) module estimated delay (ms), which is the signal delay between when audio is played locally before being locally captured. @JsonKey(name: 'aecEstimatedDelay') final int? aecEstimatedDelay; @@ -3365,62 +3362,62 @@ extension RtmpStreamPublishStateExt on RtmpStreamPublishState { } } -/// Error codes of the RTMP or RTMPS streaming. +/// @nodoc @JsonEnum(alwaysCreate: true) enum RtmpStreamPublishErrorType { - /// 0: The RTMP or RTMPS streaming has not started or has ended. + /// @nodoc @JsonValue(0) rtmpStreamPublishErrorOk, - /// 1: Invalid argument used. Check the parameter setting. + /// @nodoc @JsonValue(1) rtmpStreamPublishErrorInvalidArgument, - /// 2: The RTMP or RTMPS streaming is encrypted and cannot be published. + /// @nodoc @JsonValue(2) rtmpStreamPublishErrorEncryptedStreamNotAllowed, - /// 3: Timeout for the RTMP or RTMPS streaming. + /// @nodoc @JsonValue(3) rtmpStreamPublishErrorConnectionTimeout, - /// 4: An error occurs in Agora's streaming server. + /// @nodoc @JsonValue(4) rtmpStreamPublishErrorInternalServerError, - /// 5: An error occurs in the CDN server. + /// @nodoc @JsonValue(5) rtmpStreamPublishErrorRtmpServerError, - /// 6: The RTMP or RTMPS streaming publishes too frequently. + /// @nodoc @JsonValue(6) rtmpStreamPublishErrorTooOften, - /// 7: The host publishes more than 10 URLs. Delete the unnecessary URLs before adding new ones. + /// @nodoc @JsonValue(7) rtmpStreamPublishErrorReachLimit, - /// 8: The host manipulates other hosts' URLs. For example, the host updates or stops other hosts' streams. Check your app logic. + /// @nodoc @JsonValue(8) rtmpStreamPublishErrorNotAuthorized, - /// 9: Agora's server fails to find the RTMP or RTMPS streaming. + /// @nodoc @JsonValue(9) rtmpStreamPublishErrorStreamNotFound, - /// 10: The format of the RTMP or RTMPS streaming URL is not supported. Check whether the URL format is correct. + /// @nodoc @JsonValue(10) rtmpStreamPublishErrorFormatNotSupported, - /// 11: The user role is not host, so the user cannot use the CDN live streaming function. Check your application code logic. + /// @nodoc @JsonValue(11) rtmpStreamPublishErrorNotBroadcaster, - /// 13: The updateRtmpTranscoding method is called to update the transcoding configuration in a scenario where there is streaming without transcoding. Check your application code logic. + /// @nodoc @JsonValue(13) rtmpStreamPublishErrorTranscodingNoMixStream, - /// 14: Errors occurred in the host's network. + /// @nodoc @JsonValue(14) rtmpStreamPublishErrorNetDown, @@ -3428,11 +3425,11 @@ enum RtmpStreamPublishErrorType { @JsonValue(15) rtmpStreamPublishErrorInvalidAppid, - /// 16: Your project does not have permission to use streaming services. Refer to Media Push to enable the Media Push permission. + /// @nodoc @JsonValue(16) rtmpStreamPublishErrorInvalidPrivilege, - /// 100: The streaming has been stopped normally. After you stop the Media Push, the SDK returns this value. + /// @nodoc @JsonValue(100) rtmpStreamUnpublishErrorOk, } @@ -3502,19 +3499,19 @@ class RtcImage { @JsonKey(name: 'url') final String? url; - /// The x coordinate (pixel) of the image on the video frame (taking the upper left corner of the video frame as the origin). + /// The x-coordinate (px) of the image on the video frame (taking the upper left corner of the video frame as the origin). @JsonKey(name: 'x') final int? x; - /// The y coordinate (pixel) of the image on the video frame (taking the upper left corner of the video frame as the origin). + /// The y-coordinate (px) of the image on the video frame (taking the upper left corner of the video frame as the origin). @JsonKey(name: 'y') final int? y; - /// The width (pixel) of the image on the video frame. + /// The width (px) of the image on the video frame. @JsonKey(name: 'width') final int? width; - /// The height (pixel) of the image on the video frame. + /// The height (px) of the image on the video frame. @JsonKey(name: 'height') final int? height; @@ -4407,7 +4404,7 @@ class VideoCanvas { @JsonKey(name: 'uid') final int? uid; - /// @nodoc + /// The ID of the user who publishes a specific sub-video stream within the mixed video stream. @JsonKey(name: 'subviewUid') final int? subviewUid; @@ -4437,7 +4434,7 @@ class VideoCanvas { @JsonKey(name: 'cropArea') final Rectangle? cropArea; - /// (Optional) Whether the receiver enables alpha mask rendering: true : The receiver enables alpha mask rendering. false : (default) The receiver disables alpha mask rendering. Alpha mask rendering can create images with transparent effects and extract portraits from videos. When used in combination with other methods, you can implement effects such as picture-in-picture and watermarking. + /// (Optional) Whether the receiver enables alpha mask rendering: true : The receiver enables alpha mask rendering. false : (default) The receiver disables alpha mask rendering. Alpha mask rendering can create images with transparent effects and extract portraits from videos. When used in combination with other methods, you can implement effects such as portrait-in-picture and watermarking. /// This property applies to macOS only. /// The receiver can render alpha channel information only when the sender enables alpha transmission. /// To enable alpha transmission,. @@ -4703,11 +4700,11 @@ class VirtualBackgroundSource { @JsonKey(name: 'background_source_type') final BackgroundSourceType? backgroundSourceType; - /// The type of the custom background image. The color of the custom background image. The format is a hexadecimal integer defined by RGB, without the # sign, such as 0xFFB6C1 for light pink. The default value is 0xFFFFFF, which signifies white. The value range is [0x000000, 0xffffff]. If the value is invalid, the SDK replaces the original background image with a white background image. This parameter takes effect only when the type of the custom background image is backgroundColor. + /// The type of the custom background image. The color of the custom background image. The format is a hexadecimal integer defined by RGB, without the # sign, such as 0xFFB6C1 for light pink. The default value is 0xFFFFFF, which signifies white. The value range is [0x000000, 0xffffff]. If the value is invalid, the SDK replaces the original background image with a white background image. This parameter is only applicable to custom backgrounds of the following types: backgroundColor : The background image is a solid-colored image of the color passed in by the parameter. backgroundImg : If the image in source has a transparent background, the transparent background will be filled with the color passed in by the parameter. @JsonKey(name: 'color') final int? color; - /// The local absolute path of the custom background image. PNG and JPG formats are supported. If the path is invalid, the SDK replaces the original background image with a white background image. This parameter takes effect only when the type of the custom background image is backgroundImg. + /// The local absolute path of the custom background image. Supports PNG, JPG, MP4, AVI, MKV, and FLV formats. If the path is invalid, the SDK will use either the original background image or the solid color image specified by color. This parameter takes effect only when the type of the custom background image is backgroundImg or backgroundVideo. @JsonKey(name: 'source') final String? source; @@ -5597,6 +5594,8 @@ extension ChannelMediaRelayErrorExt on ChannelMediaRelayError { } /// The event code of channel media relay. +/// +/// Deprecated This class is deprecated. @JsonEnum(alwaysCreate: true) enum ChannelMediaRelayEvent { /// 0: The user disconnects from the server due to a poor network connection. @@ -6493,7 +6492,7 @@ class SpatialAudioParams { Map toJson() => _$SpatialAudioParamsToJson(this); } -/// @nodoc +/// Layout information of a specific sub-video stream within the mixed stream. @JsonSerializable(explicitToJson: true, includeIfNull: false) class VideoLayout { /// @nodoc @@ -6507,35 +6506,38 @@ class VideoLayout { this.height, this.videoState}); - /// @nodoc + /// The channel name to which the sub-video stream belongs. @JsonKey(name: 'channelId') final String? channelId; - /// @nodoc + /// User ID who published this sub-video stream. @JsonKey(name: 'uid') final int? uid; - /// @nodoc + /// Reserved for future use. @JsonKey(name: 'strUid') final String? strUid; - /// @nodoc + /// X-coordinate (px) of the sub-video stream on the mixing canvas. The relative lateral displacement of the top left corner of the video for video mixing to the origin (the top left corner of the canvas). @JsonKey(name: 'x') final int? x; - /// @nodoc + /// Y-coordinate (px) of the sub-video stream on the mixing canvas. The relative longitudinal displacement of the top left corner of the captured video to the origin (the top left corner of the canvas). @JsonKey(name: 'y') final int? y; - /// @nodoc + /// Width (px) of the sub-video stream. @JsonKey(name: 'width') final int? width; - /// @nodoc + /// Heitht (px) of the sub-video stream. @JsonKey(name: 'height') final int? height; - /// @nodoc + /// Status of the sub-video stream on the video mixing canvas. + /// 0: Normal. The sub-video stream has been rendered onto the mixing canvas. + /// 1: Placeholder image. The sub-video stream has no video frames and is displayed as a placeholder on the mixing canvas. + /// 2: Black image. The sub-video stream is replaced by a black image. @JsonKey(name: 'videoState') final int? videoState; diff --git a/lib/src/agora_media_base.dart b/lib/src/agora_media_base.dart index 6219cbce4..7a9e403f0 100644 --- a/lib/src/agora_media_base.dart +++ b/lib/src/agora_media_base.dart @@ -126,7 +126,7 @@ enum AudioRoute { @JsonValue(4) routeLoudspeaker, - /// 5: The audio route is a bluetooth headset. + /// 5: The audio route is a Bluetooth device using the HFP protocol. @JsonValue(5) routeHeadsetbluetooth, @@ -146,7 +146,7 @@ enum AudioRoute { @JsonValue(9) routeAirplay, - /// @nodoc + /// 10: The audio route is a Bluetooth device using the A2DP protocol. @JsonValue(10) routeBluetoothSpeaker, } @@ -251,7 +251,7 @@ enum MediaSourceType { @JsonValue(2) primaryCameraSource, - /// 3: The secondary camera. + /// 3: A secondary camera. @JsonValue(3) secondaryCameraSource, @@ -263,7 +263,7 @@ enum MediaSourceType { @JsonValue(5) secondaryScreenSource, - /// @nodoc + /// 6. Custom video source. @JsonValue(6) customVideoSource, @@ -687,7 +687,8 @@ class ExternalVideoFrame { this.matrix, this.metadataBuffer, this.metadataSize, - this.alphaBuffer}); + this.alphaBuffer, + this.fillAlphaBuffer}); /// The video type. See VideoBufferType. @JsonKey(name: 'type') @@ -757,6 +758,10 @@ class ExternalVideoFrame { @JsonKey(name: 'alphaBuffer', ignore: true) final Uint8List? alphaBuffer; + /// @nodoc + @JsonKey(name: 'fillAlphaBuffer') + final bool? fillAlphaBuffer; + /// @nodoc factory ExternalVideoFrame.fromJson(Map json) => _$ExternalVideoFrameFromJson(json); @@ -957,7 +962,7 @@ extension MediaPlayerSourceTypeExt on MediaPlayerSourceType { /// The frame position of the video observer. @JsonEnum(alwaysCreate: true) enum VideoModulePosition { - /// 1: The post-capturer position, which corresponds to the video data in the onCaptureVideoFrame callback. + /// 1: The location of the locally collected video data after preprocessing corresponds to the onCaptureVideoFrame callback. The observed video here has the effect of video pre-processing, which can be verified by enabling image enhancement, virtual background, or watermark. @JsonValue(1 << 0) positionPostCapturer, @@ -965,7 +970,9 @@ enum VideoModulePosition { @JsonValue(1 << 1) positionPreRenderer, - /// 4: The pre-encoder position, which corresponds to the video data in the onPreEncodeVideoFrame callback. + /// 4: The pre-encoder position, which corresponds to the video data in the onPreEncodeVideoFrame callback. The observed video here has the effects of video pre-processing and encoding pre-processing. + /// To verify the pre-processing effects of the video, you can enable image enhancement, virtual background, or watermark. + /// To verify the pre-encoding processing effect, you can set a lower frame rate (for example, 5 fps). @JsonValue(1 << 2) positionPreEncoder, } @@ -1350,16 +1357,16 @@ class VideoFrameObserver { /// Occurs each time the SDK receives a video frame captured by local devices. /// /// After you successfully register the video frame observer, the SDK triggers this callback each time it receives a video frame. In this callback, you can get the video data captured by local devices. You can then pre-process the data according to your scenarios. - /// The video data that this callback gets has not been pre-processed, and is not watermarked, cropped, rotated or beautified. + /// The video data that this callback gets has not been pre-processed such as watermarking, cropping, and rotating. /// If the video data type you get is RGBA, the SDK does not support processing the data of the alpha channel. /// Due to the limitations of Flutter, this callback does not support sending processed video data back to the SDK. /// /// * [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: texture - /// iOS: cvPixelBuffer - /// macOS: YUV 420 - /// Windows: YUV 420 + /// Android: I420 or RGB (GLES20.GL_TEXTURE_2D) + /// iOS: I420 or CVPixelBufferRef + /// macOS: I420 or CVPixelBufferRef + /// Windows: YUV420 final void Function(VideoSourceType type, VideoFrame videoFrame)? onCaptureVideoFrame; @@ -1370,10 +1377,10 @@ 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: texture - /// iOS: cvPixelBuffer - /// macOS: YUV 420 - /// Windows: YUV 420 + /// Android: I420 or RGB (GLES20.GL_TEXTURE_2D) + /// iOS: I420 or CVPixelBufferRef + /// macOS: I420 or CVPixelBufferRef + /// Windows: YUV420 /// * [sourceType] The type of the video source. See VideoSourceType. final void Function(VideoSourceType type, VideoFrame videoFrame)? onPreEncodeVideoFrame; @@ -1389,10 +1396,10 @@ class VideoFrameObserver { /// Due to the limitations of Flutter, 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: texture - /// iOS: cvPixelBuffer - /// macOS: YUV 420 - /// Windows: YUV 420 + /// Android: I420 or RGB (GLES20.GL_TEXTURE_2D) + /// iOS: I420 or CVPixelBufferRef + /// macOS: I420 or CVPixelBufferRef + /// Windows: YUV420 /// * [remoteUid] The user ID of the remote user who sends the current video frame. /// * [channelId] The channel ID. final void Function(String channelId, int remoteUid, VideoFrame videoFrame)? @@ -1505,7 +1512,7 @@ extension MediaRecorderStreamTypeExt on MediaRecorderStreamType { /// The current recording state. @JsonEnum(alwaysCreate: true) enum RecorderState { - /// -1: An error occurs during the recording. See RecorderErrorCode for the reason. + /// -1: An error occurs during the recording. See RecorderReasonCode for the reason. @JsonValue(-1) recorderStateError, @@ -1531,26 +1538,26 @@ extension RecorderStateExt on RecorderState { } } -/// The reason for the state change. +/// @nodoc @JsonEnum(alwaysCreate: true) enum RecorderErrorCode { - /// 0: No error. + /// @nodoc @JsonValue(0) recorderErrorNone, - /// 1: The SDK fails to write the recorded data to a file. + /// @nodoc @JsonValue(1) recorderErrorWriteFailed, - /// 2: The SDK does not detect any audio and video streams, or audio and video streams are interrupted for more than five seconds during recording. + /// @nodoc @JsonValue(2) recorderErrorNoStream, - /// 3: The recording duration exceeds the upper limit. + /// @nodoc @JsonValue(3) recorderErrorOverMaxDuration, - /// 4: The recording configuration changes. + /// @nodoc @JsonValue(4) recorderErrorConfigChanged, } diff --git a/lib/src/agora_media_base.g.dart b/lib/src/agora_media_base.g.dart index 77dd9e631..79139e907 100644 --- a/lib/src/agora_media_base.g.dart +++ b/lib/src/agora_media_base.g.dart @@ -179,6 +179,7 @@ ExternalVideoFrame _$ExternalVideoFrameFromJson(Map json) => ?.map((e) => (e as num).toDouble()) .toList(), metadataSize: json['metadata_size'] as int?, + fillAlphaBuffer: json['fillAlphaBuffer'] as bool?, ); Map _$ExternalVideoFrameToJson(ExternalVideoFrame instance) { @@ -204,6 +205,7 @@ Map _$ExternalVideoFrameToJson(ExternalVideoFrame instance) { writeNotNull('textureId', instance.textureId); writeNotNull('matrix', instance.matrix); writeNotNull('metadata_size', instance.metadataSize); + writeNotNull('fillAlphaBuffer', instance.fillAlphaBuffer); return val; } diff --git a/lib/src/agora_media_engine.dart b/lib/src/agora_media_engine.dart index 24ea1e3a6..c3db87880 100644 --- a/lib/src/agora_media_engine.dart +++ b/lib/src/agora_media_engine.dart @@ -102,7 +102,7 @@ abstract class MediaEngine { /// Pulls the remote audio data. /// - /// Before calling this method, you need to call setExternalAudioSink to notify the app to enable and set the external rendering. After a successful method call, the app pulls the decoded and mixed audio data for playback. + /// Before calling this method, you need to call setExternalAudioSink to notify the app to enable and set the external rendering. After a successful call of this method, the app pulls the decoded and mixed audio data for playback. /// This method only supports pulling data from custom audio source. If you need to pull the data captured by the SDK, do not call this method. /// Call this method after joining a channel. /// Once you enable the external audio sink, the app will not retrieve any audio data from the onPlaybackAudioFrame callback. @@ -156,10 +156,10 @@ abstract class MediaEngine { /// Creates a custom audio track. /// - /// To publish a custom audio source to multiple channels, see the following steps: + /// 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. - /// In ChannelMediaOptions of each channel, set publishCustomAduioTrackId to the audio track ID that you want to publish, and set publishCustomAudioTrack to true. - /// If you call pushAudioFrame, and specify trackId as the audio track ID set in step 2, you can publish the corresponding custom audio source in multiple channels. + /// 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 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. /// /// * [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. /// * [config] The configuration of the custom audio track. See AudioTrackConfig. @@ -176,7 +176,6 @@ abstract class MediaEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future destroyCustomAudioTrack(int trackId); /// Sets the external audio sink. @@ -191,7 +190,6 @@ abstract class MediaEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setExternalAudioSink( {required bool enabled, required int sampleRate, required int channels}); @@ -199,9 +197,14 @@ abstract class MediaEngine { Future enableCustomAudioLocalPlayback( {required int trackId, required bool enabled}); - /// Pushes the external raw video frame to the SDK. + /// Pushes the external raw video frame to the SDK through video tracks. /// - /// If you call createCustomVideoTrack method to get the video track ID, set the customVideoTrackId parameter to the video track ID you want to publish in the ChannelMediaOptions of each channel, and set the publishCustomVideoTrack parameter to true, you can call this method to push the unencoded external video frame to the SDK. + /// To publish a custom video source, see the following steps: + /// Call createCustomVideoTrack to create a video track and get the video track ID. + /// Call joinChannel to join the channel. In ChannelMediaOptions, set customVideoTrackId to the video track ID that you want to publish, and set publishCustomVideoTrack to true. + /// Call this method and specify videoTrackId as the video track ID set in step 2. You can then publish the corresponding custom video source in the channel. After calling this method, even if you stop pushing external video frames to the SDK, the custom video stream will still be counted as the video duration usage and incur charges. Agora recommends that you take appropriate measures based on the actual situation to avoid such video billing. + /// If you no longer need to capture external video data, you can call destroyCustomVideoTrack to destroy the custom video track. + /// If you only want to use the external video data for local preview and not publish it in the channel, you can call muteLocalVideoStream to cancel sending video stream or call updateChannelMediaOptions to set publishCustomVideoTrack to false. /// /// * [frame] The external raw video frame to be pushed. See ExternalVideoFrame. /// * [videoTrackId] The video track ID returned by calling the createCustomVideoTrack method. The default value is 0. @@ -227,7 +230,6 @@ abstract class MediaEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. void unregisterAudioFrameObserver(AudioFrameObserver observer); /// Unregisters the video frame observer. diff --git a/lib/src/agora_media_player.dart b/lib/src/agora_media_player.dart index 1190404d7..aedb14f59 100644 --- a/lib/src/agora_media_player.dart +++ b/lib/src/agora_media_player.dart @@ -18,7 +18,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future open({required String url, required int startPos}); /// Opens a media file and configures the playback scenarios. @@ -38,28 +37,24 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future play(); /// Pauses the playback. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future pause(); /// Stops playing the media track. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stop(); /// Resumes playing the media file. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future resume(); /// Seeks to a new playback position. @@ -72,7 +67,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future seek(int newPos); /// Sets the pitch of the current media resource. @@ -83,7 +77,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAudioPitch(int pitch); /// Gets the duration of the media resource. @@ -96,7 +89,7 @@ abstract class MediaPlayer { /// /// Returns /// Returns the current playback progress (ms) if the call succeeds. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future getPlayPosition(); /// Gets the number of the media streams in the media resource. @@ -105,14 +98,14 @@ abstract class MediaPlayer { /// /// Returns /// The number of the media streams in the media resource if the method call succeeds. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future getStreamCount(); /// Gets the detailed information of the media stream. /// /// Call this method after calling getStreamCount. /// - /// * [index] The index of the media stream. + /// * [index] The index of the media stream. This parameter must be less than the return value of getStreamCount. /// /// Returns /// If the call succeeds, returns the detailed information of the media stream. See PlayerStreamInfo. @@ -127,7 +120,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLoopCount(int loopCount); /// Sets the channel mode of the current audio file. @@ -141,7 +133,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setPlaybackSpeed(int speed); /// Selects the audio track used during playback. @@ -152,17 +143,32 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future selectAudioTrack(int index); /// @nodoc Future selectMultiAudioTrack( {required int playoutTrackIndex, required int publishTrackIndex}); - /// @nodoc + /// Set media player options for providing technical previews or special customization features. + /// + /// The media player supports setting options through key and value. In general, you don't need to know about the option settings. You can use the default option settings of the media player. The difference between this method and setPlayerOptionInString is that the value parameter of this method is of type Int, while the value of setPlayerOptionInString is of type String. These two methods cannot be used together. Ensure that you call this method before open or openWithMediaSource. + /// + /// * [key] The key of the option. + /// * [value] The value of the key. + /// + /// Returns + /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. Future setPlayerOptionInInt({required String key, required int value}); - /// @nodoc + /// Set media player options for providing technical previews or special customization features. + /// + /// Ensure that you call this method before open or openWithMediaSource. The media player supports setting options through key and value. In general, you don't need to know about the option settings. You can use the default option settings of the media player. The difference between this method and setPlayerOptionInInt is that the value parameter of this method is of type String, while the value of setPlayerOptionInInt is of type String. These two methods cannot be used together. + /// + /// * [key] The key of the option. + /// * [value] The value of the key. + /// + /// Returns + /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. Future setPlayerOptionInString( {required String key, required String value}); @@ -187,7 +193,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future mute(bool muted); /// Reports whether the media resource is muted. @@ -238,7 +243,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setView(int view); /// Sets the render mode of the media player. @@ -247,7 +251,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setRenderMode(RenderModeType renderMode); /// Registers a media player observer. @@ -256,7 +259,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. void registerPlayerSourceObserver(MediaPlayerSourceObserver observer); /// Releases a media player observer. @@ -265,7 +267,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. void unregisterPlayerSourceObserver(MediaPlayerSourceObserver observer); /// Registers an audio frame observer object. @@ -283,7 +284,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. void unregisterAudioFrameObserver(MediaPlayerAudioFrameObserver observer); /// Registers a video frame observer object. @@ -294,7 +294,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. void registerVideoFrameObserver(MediaPlayerVideoFrameObserver observer); /// Unregisters the video frame observer. @@ -303,7 +302,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. void unregisterVideoFrameObserver(MediaPlayerVideoFrameObserver observer); /// @nodoc @@ -324,7 +322,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAudioDualMonoMode(AudioDualMonoMode mode); /// @nodoc @@ -374,7 +371,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future switchSrc({required String src, bool syncPts = true}); /// Preloads a media resource. @@ -386,7 +382,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future preloadSrc({required String src, required int startPos}); /// Plays preloaded media resources. @@ -397,7 +392,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future playPreloadedSrc(String src); /// Unloads media resources that are preloaded. @@ -408,7 +402,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future unloadSrc(String src); /// Enables or disables the spatial audio effect for the media player. @@ -419,7 +412,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setSpatialAudioParams(SpatialAudioParams params); /// @nodoc @@ -438,7 +430,7 @@ abstract class MediaPlayerCacheManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future removeAllCaches(); /// Deletes a cached media file that is the least recently used. @@ -447,7 +439,7 @@ abstract class MediaPlayerCacheManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future removeOldCache(); /// Deletes a cached media file. @@ -458,7 +450,7 @@ abstract class MediaPlayerCacheManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future removeCacheByUri(String uri); /// Sets the storage path for the media files that you want to cache. @@ -469,7 +461,7 @@ abstract class MediaPlayerCacheManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future setCacheDir(String path); /// Sets the maximum number of media files that can be cached. @@ -478,7 +470,7 @@ abstract class MediaPlayerCacheManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future setMaxCacheFileCount(int count); /// Sets the maximum size of the aggregate storage space for cached media files. @@ -487,7 +479,7 @@ abstract class MediaPlayerCacheManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future setMaxCacheFileSize(int cacheSize); /// Sets whether to delete cached media files automatically. @@ -498,7 +490,7 @@ abstract class MediaPlayerCacheManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future enableAutoRemoveCache(bool enable); /// Gets the storage path of the cached media files. @@ -509,7 +501,7 @@ abstract class MediaPlayerCacheManager { /// /// Returns /// The call succeeds, and the SDK returns the storage path of the cached media files. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future getCacheDir(int length); /// Gets the maximum number of media files that can be cached. @@ -518,7 +510,7 @@ abstract class MediaPlayerCacheManager { /// /// Returns /// > 0: The call succeeds and returns the maximum number of media files that can be cached. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future getMaxCacheFileCount(); /// Gets the maximum size of the aggregate storage space for cached media files. @@ -527,18 +519,20 @@ abstract class MediaPlayerCacheManager { /// /// Returns /// > 0: The call succeeds and returns the maximum size (in bytes) of the aggregate storage space for cached media files. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future getMaxCacheFileSize(); /// Gets the number of media files that are cached. /// /// Returns /// ≥ 0: The call succeeds and returns the number of media files that are cached. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future getCacheFileCount(); } /// The audio frame observer for the media player. +/// +/// You can call registerAudioFrameObserver to register or unregister the MediaPlayerAudioFrameObserver object. class MediaPlayerAudioFrameObserver { /// @nodoc const MediaPlayerAudioFrameObserver({ diff --git a/lib/src/agora_media_player_source.dart b/lib/src/agora_media_player_source.dart index 4f9e73dd4..b5ead11d1 100644 --- a/lib/src/agora_media_player_source.dart +++ b/lib/src/agora_media_player_source.dart @@ -22,15 +22,16 @@ class MediaPlayerSourceObserver { /// When the state of the media player changes, the SDK triggers this callback to report the current playback state. /// /// * [state] The playback state. See MediaPlayerState. - /// * [ec] The error code. See MediaPlayerError. + /// * [reason] The reason for the changes in the media player status. See MediaPlayerReason. final void Function(MediaPlayerState state, MediaPlayerError ec)? onPlayerSourceStateChanged; - /// Reports current playback progress. + /// Reports the playback progress of the media file. /// /// When playing media files, the SDK triggers this callback every two second to report current playback progress. /// - /// * [position] The playback position (ms) of media files. + /// * [positionMs] The playback position (ms) of media files. + /// * [timeStampMs] The NTP timestamp (ms) of the current playback progress. final void Function(int positionMs, int timestampMs)? onPositionChanged; /// Reports the player events. diff --git a/lib/src/agora_media_player_types.dart b/lib/src/agora_media_player_types.dart index f38182446..71e5b8605 100644 --- a/lib/src/agora_media_player_types.dart +++ b/lib/src/agora_media_player_types.dart @@ -85,70 +85,70 @@ extension MediaPlayerStateExt on MediaPlayerState { } } -/// Error codes of the media player. +/// @nodoc @JsonEnum(alwaysCreate: true) enum MediaPlayerError { - /// 0: No error. + /// @nodoc @JsonValue(0) playerErrorNone, - /// -1: Invalid arguments. + /// @nodoc @JsonValue(-1) playerErrorInvalidArguments, - /// -2: Internal error. + /// @nodoc @JsonValue(-2) playerErrorInternal, - /// -3: No resource. + /// @nodoc @JsonValue(-3) playerErrorNoResource, - /// -4: Invalid media resource. + /// @nodoc @JsonValue(-4) playerErrorInvalidMediaSource, - /// -5: The media stream type is unknown. + /// @nodoc @JsonValue(-5) playerErrorUnknownStreamType, - /// -6: The object is not initialized. + /// @nodoc @JsonValue(-6) playerErrorObjNotInitialized, - /// -7: The codec is not supported. + /// @nodoc @JsonValue(-7) playerErrorCodecNotSupported, - /// -8: Invalid renderer. + /// @nodoc @JsonValue(-8) playerErrorVideoRenderFailed, - /// -9: An error with the internal state of the player occurs. + /// @nodoc @JsonValue(-9) playerErrorInvalidState, - /// -10: The URL of the media resource cannot be found. + /// @nodoc @JsonValue(-10) playerErrorUrlNotFound, - /// -11: Invalid connection between the player and the Agora Server. + /// @nodoc @JsonValue(-11) playerErrorInvalidConnectionState, - /// -12: The playback buffer is insufficient. + /// @nodoc @JsonValue(-12) playerErrorSrcBufferUnderflow, - /// -13: The playback is interrupted. + /// @nodoc @JsonValue(-13) playerErrorInterrupted, - /// -14: The SDK does not support the method being called. + /// @nodoc @JsonValue(-14) playerErrorNotSupported, - /// -15: The authentication information of the media resource is expired. + /// @nodoc @JsonValue(-15) playerErrorTokenExpired, @@ -156,7 +156,7 @@ enum MediaPlayerError { @JsonValue(-16) playerErrorIpExpired, - /// -17: An unknown error. + /// @nodoc @JsonValue(-17) playerErrorUnknown, } @@ -479,7 +479,7 @@ class PlayerUpdatedInfo { /// @nodoc const PlayerUpdatedInfo({this.playerId, this.deviceId, this.cacheStatistics}); - /// The ID of a media player. + /// @nodoc @JsonKey(name: 'playerId') final String? playerId; @@ -487,7 +487,7 @@ class PlayerUpdatedInfo { @JsonKey(name: 'deviceId') final String? deviceId; - /// The statistics about the media file being cached. If you call the openWithMediaSource method and set enableCache as true, the statistics about the media file being cached is updated every second after the media file is played. See CacheStatistics. + /// @nodoc @JsonKey(name: 'cacheStatistics') final CacheStatistics? cacheStatistics; @@ -536,7 +536,7 @@ class MediaSource { @JsonKey(name: 'enableCache') final bool? enableCache; - /// @nodoc + /// Whether to allow the selection of different audio tracks when playing this media file: true : Allow to select different audio tracks. false : (Default) Do not allow to select different audio tracks. If you need to set different audio tracks for local playback and publishing to the channel, you need to set this parameter to true, and then call the selectMultiAudioTrack method to select the audio track. @JsonKey(name: 'enableMultiAudioTrack') final bool? enableMultiAudioTrack; diff --git a/lib/src/agora_music_content_center.dart b/lib/src/agora_music_content_center.dart index 3aba8092a..3ae4681aa 100644 --- a/lib/src/agora_music_content_center.dart +++ b/lib/src/agora_music_content_center.dart @@ -329,7 +329,19 @@ class MusicContentCenterEventHandler { final void Function(String requestId, int songCode, String lyricUrl, MusicContentCenterStatusCode errorCode)? onLyricResult; - /// @nodoc + /// 音乐资源的详细信息回调。 + /// + /// 当你调用 getSongSimpleInfo 获取某一音乐资源的详细信息后,SDK 会触发该回调。 + /// + /// * [reason] 音乐内容中心的请求状态码,详见 MusicContentCenterStateReason 。 + /// * [requestId] The request ID. 本次请求的唯一标识。 + /// * [songCode] The code of the music, which is an unique identifier of the music. + /// * [simpleInfo] 音乐资源的相关信息,包含下列内容: + /// 副歌片段的开始和结束的时间(ms) + /// 副歌片段的歌词下载地址 + /// 副歌片段时长(ms) + /// 歌曲名称 + /// 歌手名 final void Function(String requestId, int songCode, String simpleInfo, MusicContentCenterStatusCode errorCode)? onSongSimpleInfoResult; diff --git a/lib/src/agora_rhythm_player.dart b/lib/src/agora_rhythm_player.dart index 3eed312a5..3ee92f335 100644 --- a/lib/src/agora_rhythm_player.dart +++ b/lib/src/agora_rhythm_player.dart @@ -38,26 +38,26 @@ extension RhythmPlayerStateTypeExt on RhythmPlayerStateType { } } -/// Virtual Metronome error message. +/// @nodoc @JsonEnum(alwaysCreate: true) enum RhythmPlayerErrorType { - /// (0): The beat files are played normally without errors. + /// @nodoc @JsonValue(0) rhythmPlayerErrorOk, - /// 1: A general error; no specific reason. + /// @nodoc @JsonValue(1) rhythmPlayerErrorFailed, - /// 801: There is an error when opening the beat files. + /// @nodoc @JsonValue(801) rhythmPlayerErrorCanNotOpen, - /// 802: There is an error when playing the beat files. + /// @nodoc @JsonValue(802) rhythmPlayerErrorCanNotPlay, - /// (803): The duration of the beat file exceeds the limit. The maximum duration is 1.2 seconds. + /// @nodoc @JsonValue(803) rhythmPlayerErrorFileOverDurationLimit, } diff --git a/lib/src/agora_rtc_engine.dart b/lib/src/agora_rtc_engine.dart index 25fd3f57b..4fd5c3f9f 100644 --- a/lib/src/agora_rtc_engine.dart +++ b/lib/src/agora_rtc_engine.dart @@ -275,18 +275,18 @@ extension AudioReverbTypeExt on AudioReverbType { } } -/// @nodoc +/// Options for handling audio and video stream fallback when network conditions are weak. @JsonEnum(alwaysCreate: true) enum StreamFallbackOptions { - /// @nodoc + /// 0: No fallback processing is performed on audio and video streams, the quality of the audio and video streams cannot be guaranteed. @JsonValue(0) streamFallbackOptionDisabled, - /// @nodoc + /// 1: Only receive low-quality (low resolution, low bitrate) video stream. @JsonValue(1) streamFallbackOptionVideoStreamLow, - /// @nodoc + /// 2: When the network conditions are weak, try to receive the low-quality video stream first. If the video cannot be displayed due to extremely weak network environment, then fall back to receiving audio-only stream. @JsonValue(2) streamFallbackOptionAudioOnly, } @@ -1304,11 +1304,11 @@ class ChannelMediaOptions { @JsonKey(name: 'publishSecondaryCameraTrack') final bool? publishSecondaryCameraTrack; - /// Whether to publish the video captured by the third camera: true : Publish the video captured by the third camera. false : Do not publish the video captured by the third camera. This method is for Windows and macOS only. + /// Whether to publish the video captured by the third camera: true : Publish the video captured by the third camera. false : Do not publish the video captured by the third camera. This is for Windows and macOS only. @JsonKey(name: 'publishThirdCameraTrack') final bool? publishThirdCameraTrack; - /// Whether to publish the video captured by the fourth camera: true : Publish the video captured by the fourth camera. false : Do not publish the video captured by the fourth camera. This method is for Windows and macOS only. + /// Whether to publish the video captured by the fourth camera: true : Publish the video captured by the fourth camera. false : Do not publish the video captured by the fourth camera. This is for Windows and macOS only. @JsonKey(name: 'publishFourthCameraTrack') final bool? publishFourthCameraTrack; @@ -1324,7 +1324,7 @@ class ChannelMediaOptions { @JsonKey(name: 'publishScreenCaptureAudio') final bool? publishScreenCaptureAudio; - /// Whether to publish the video captured from the screen: true : Publish the video captured from the screen. false : Do not publish the video captured from the screen. This method is for Windows and macOS only. + /// Whether to publish the video captured from the screen: true : Publish the video captured from the screen. false : Do not publish the video captured from the screen. This is for Windows and macOS only. @JsonKey(name: 'publishScreenTrack') final bool? publishScreenTrack; @@ -1332,11 +1332,11 @@ class ChannelMediaOptions { @JsonKey(name: 'publishSecondaryScreenTrack') final bool? publishSecondaryScreenTrack; - /// Whether to publish the video captured from the third screen: true : Publish the captured video from the third screen. false : Do not publish the video captured from the third screen. This method is for Windows and macOS only. + /// Whether to publish the video captured from the third screen: true : Publish the captured video from the third screen. false : Do not publish the video captured from the third screen. This is for Windows and macOS only. @JsonKey(name: 'publishThirdScreenTrack') final bool? publishThirdScreenTrack; - /// Whether to publish the video captured from the fourth screen: true : Publish the captured video from the fourth screen. false : Do not publish the video captured from the fourth screen. This method is for Windows and macOS only. + /// Whether to publish the video captured from the fourth screen: true : Publish the captured video from the fourth screen. false : Do not publish the video captured from the fourth screen. This is for Windows and macOS only. @JsonKey(name: 'publishFourthScreenTrack') final bool? publishFourthScreenTrack; @@ -1669,6 +1669,10 @@ class LeaveChannelOptions { } /// The SDK uses the RtcEngineEventHandler interface to send event notifications to your app. Your app can get those notifications through methods that inherit this interface. +/// +/// All methods in this interface have default (empty) implementation. You can choose to inherit events related to your app scenario. +/// In the callbacks, avoid implementing time-consuming tasks or calling APIs that may cause thread blocking (such as sendMessage). Otherwise, the SDK may not work properly. +/// The SDK no longer catches exceptions in the code logic that developers implement themselves in RtcEngineEventHandler class. You need to handle this exception yourself, otherwise the app may crash when the exception occurs. class RtcEngineEventHandler { /// @nodoc const RtcEngineEventHandler({ @@ -1767,6 +1771,7 @@ class RtcEngineEventHandler { this.onVideoRenderingTracingResult, this.onLocalVideoTranscoderError, this.onTranscodedStreamLayoutInfo, + this.onAudioMetadataReceived, }); /// Occurs when a user joins a channel. @@ -1799,7 +1804,7 @@ class RtcEngineEventHandler { /// Reports an error during SDK runtime. /// - /// This callback indicates that an error (concerning network or media) occurs during SDK runtime. In most cases, the SDK cannot fix the issue and resume running. The SDK requires the application to take action or informs the user about the issue. + /// This callback indicates that an error (concerning network or media) occurs during SDK runtime. In most cases, the SDK cannot fix the issue and resume running. The SDK requires the app to take action or informs the user about the issue. /// /// * [err] Error code. See ErrorCodeType. /// * [msg] The error message. @@ -1840,7 +1845,7 @@ class RtcEngineEventHandler { /// Occurs when a user leaves a channel. /// - /// This callback notifies the app that the user leaves the channel by calling leaveChannel. From this callback, the app can get information such as the call duration and quality statistics. + /// 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. /// /// * [connection] The connection information. See RtcConnection. /// * [stats] The statistics of the call. See RtcStats. @@ -1858,9 +1863,9 @@ class RtcEngineEventHandler { /// /// This callback notifies the application that the system's audio device state is changed. For example, a headset is unplugged from the device. This method is for Windows and macOS only. /// - /// * [deviceState] Media device states. /// * [deviceId] The device ID. /// * [deviceType] The device type. See MediaDeviceType. + /// * [deviceState] The device state. See MediaDeviceStateType. final void Function(String deviceId, MediaDeviceType deviceType, MediaDeviceStateType deviceState)? onAudioDeviceStateChanged; @@ -1872,7 +1877,6 @@ class RtcEngineEventHandler { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. final void Function(int position)? onAudioMixingPositionChanged; /// Occurs when the playback of the local music file finishes. @@ -1893,7 +1897,7 @@ class RtcEngineEventHandler { /// /// * [deviceId] The device ID. /// * [deviceType] Media device types. See MediaDeviceType. - /// * [deviceState] Media device states. + /// * [deviceState] Media device states. See MediaDeviceStateType. final void Function(String deviceId, MediaDeviceType deviceType, MediaDeviceStateType deviceState)? onVideoDeviceStateChanged; @@ -1977,21 +1981,21 @@ class RtcEngineEventHandler { /// * [uid] The ID of the user whose video size or rotation changes. (The uid for the local user is 0. The video is the local user's video preview). /// * [width] The width (pixels) of the video stream. /// * [height] The height (pixels) of the video stream. - /// * [rotation] The rotation information. The value range is [0,360). + /// * [rotation] The rotation information. The value range is [0,360). On the iOS platform, the parameter value is always 0. final void Function(RtcConnection connection, VideoSourceType sourceType, int uid, int width, int height, int rotation)? onVideoSizeChanged; /// Occurs when the local video stream state changes. /// - /// When the state of the local video stream changes (including the state of the video capture and encoding), the SDK triggers this callback to report the current state. This callback indicates the state of the local video stream, including camera capturing and video encoding, and allows you to troubleshoot issues when exceptions occur. The SDK triggers the onLocalVideoStateChanged callback with the state code of localVideoStreamStateFailed and error code of localVideoStreamErrorCaptureFailure in the following situations: + /// When the state of the local video stream changes (including the state of the video capture and encoding), the SDK triggers this callback to report the current state. This callback indicates the state of the local video stream, including camera capturing and video encoding, and allows you to troubleshoot issues when exceptions occur. The SDK triggers the onLocalVideoStateChanged callback with the state code of localVideoStreamStateFailed and error code of localVideoStreamReasonCaptureFailure in the following situations: /// The app switches to the background, and the system gets the camera resource. - /// If your app runs in the background on a device running Android 9 or later, you cannot access the camera. - /// If your app runs in the background on a device running Android 6 or later, the camera is occupied by a third-party app. Once the camera is released, the SDK triggers the onLocalVideoStateChanged (localVideoStreamStateCapturing, localVideoStreamErrorOk) callback. - /// The camera starts normally, but does not output video frames for four consecutive seconds. When the camera outputs the captured video frames, if the video frames are the same for 15 consecutive frames, the SDK triggers the onLocalVideoStateChanged callback with the state code of localVideoStreamStateCapturing and error code of localVideoStreamErrorCaptureFailure. Note that the video frame duplication detection is only available for video frames with a resolution greater than 200 × 200, a frame rate greater than or equal to 10 fps, and a bitrate less than 20 Kbps. For some device models, the SDK does not trigger this callback when the state of the local video changes while the local video capturing device is in use, so you have to make your own timeout judgment. + /// For Android 9 and later versions, after an app is in the background for a period, the system automatically revokes camera permissions. + /// For Android 6 and later versions, if the camera is held by a third-party app for a certain duration and then released, the SDK triggers this callback and reports the onLocalVideoStateChanged (localVideoStreamStateCapturing, localVideoStreamReasonOk) callback. + /// The camera starts normally, but does not output video frames for four consecutive seconds. When the camera outputs the captured video frames, if the video frames are the same for 15 consecutive frames, the SDK triggers the onLocalVideoStateChanged callback with the state code of localVideoStreamStateCapturing and error code of localVideoStreamReasonCaptureFailure. Note that the video frame duplication detection is only available for video frames with a resolution greater than 200 × 200, a frame rate greater than or equal to 10 fps, and a bitrate less than 20 Kbps. For some device models, the SDK does not trigger this callback when the state of the local video changes while the local video capturing device is in use, so you have to make your own timeout judgment. /// /// * [source] The type of the video source. See VideoSourceType. /// * [state] The state of the local video, see LocalVideoStreamState. - /// * [error] The detailed error information, see LocalVideoStreamError. + /// * [reason] The reasons for changes in local video state. See LocalVideoStreamReason. final void Function(VideoSourceType source, LocalVideoStreamState state, LocalVideoStreamError error)? onLocalVideoStateChanged; @@ -2195,7 +2199,7 @@ class RtcEngineEventHandler { /// When the state of the virtual metronome changes, the SDK triggers this callback to report the current state of the virtual metronome. This callback indicates the state of the local audio stream and enables you to troubleshoot issues when audio exceptions occur. This callback is for Android and iOS only. /// /// * [state] For the current virtual metronome status, see RhythmPlayerStateType. - /// * [errorCode] For the error codes and error messages related to virtual metronome errors, see RhythmPlayerErrorType. + /// * [errorCode] For the error codes and error messages related to virtual metronome errors, see RhythmPlayerReason. final void Function( RhythmPlayerStateType state, RhythmPlayerErrorType errorCode)? onRhythmPlayerStateChanged; @@ -2243,7 +2247,7 @@ class RtcEngineEventHandler { /// * [connection] The connection information. See RtcConnection. /// * [remoteUid] The ID of the remote user sending the message. /// * [streamId] The stream ID of the received message. - /// * [code] The error code. + /// * [code] ErrorCodeType The error code. /// * [missed] The number of lost messages. /// * [cached] Number of incoming cached messages when the data stream is interrupted. final void Function(RtcConnection connection, int remoteUid, int streamId, @@ -2315,7 +2319,7 @@ class RtcEngineEventHandler { /// /// * [connection] The connection information. See RtcConnection. /// * [state] The state of the local audio. See LocalAudioStreamState. - /// * [error] Local audio state error codes. See LocalAudioStreamError. + /// * [reason] Reasons for local audio state changes. See LocalAudioStreamReason. final void Function(RtcConnection connection, LocalAudioStreamState state, LocalAudioStreamError error)? onLocalAudioStateChanged; @@ -2394,7 +2398,7 @@ class RtcEngineEventHandler { /// Reports the volume change of the audio device or app. /// - /// Occurs when the volume on the playback device, audio capture device, or the volume in the application changes. This callback is for Windows and macOS only. + /// Occurs when the volume on the playback device, audio capture device, or the volume of the app changes. This callback is for Windows and macOS only. /// /// * [deviceType] The device type. See MediaDeviceType. /// * [volume] The volume value. The range is [0, 255]. @@ -2408,7 +2412,7 @@ class RtcEngineEventHandler { /// /// * [url] The URL address where the state of the Media Push changes. /// * [state] The current state of the Media Push. See RtmpStreamPublishState. - /// * [errCode] The detailed error information for the Media Push. See RtmpStreamPublishErrorType. + /// * [reason] Reasons for the changes in the Media Push status. See RtmpStreamPublishReason. final void Function(String url, RtmpStreamPublishState state, RtmpStreamPublishErrorType errCode)? onRtmpStreamingStateChanged; @@ -2421,7 +2425,7 @@ class RtcEngineEventHandler { /// Occurs when the publisher's transcoding is updated. /// - /// When the LiveTranscoding class in the method updates, the SDK triggers the onTranscodingUpdated callback to report the update information. If you call the method to set the LiveTranscoding class for the first time, the SDK does not trigger this callback. + /// When the LiveTranscoding class in the startRtmpStreamWithTranscoding method updates, the SDK triggers the onTranscodingUpdated callback to report the update information. If you call the startRtmpStreamWithTranscoding method to set the LiveTranscoding class for the first time, the SDK does not trigger this callback. final void Function()? onTranscodingUpdated; /// Occurs when the local audio route changes. @@ -2452,7 +2456,14 @@ class RtcEngineEventHandler { final void Function(bool isFallbackOrRecover)? onLocalPublishFallbackToAudioOnly; - /// @nodoc + /// Occurs when the remote media stream falls back to the audio-only stream due to poor network conditions or switches back to the video stream after the network conditions improve. + /// + /// If you call setRemoteSubscribeFallbackOption and set option to streamFallbackOptionAudioOnly, the SDK triggers this callback in the following situations: + /// The downstream network condition is poor, and the subscribed video stream is downgraded to audio-only stream. + /// The downstream network condition has improved, and the subscribed stream has been restored to video stream. Once the remote media stream switches to the low-quality video stream due to weak network conditions, you can monitor the stream switch between a high-quality and low-quality stream in the onRemoteVideoStats callback. + /// + /// * [uid] The user ID of the remote user. + /// * [isFallbackOrRecover] true : The subscribed media stream falls back to audio-only due to poor network conditions. false : The subscribed media stream switches back to the video stream after the network conditions improve. final void Function(int uid, bool isFallbackOrRecover)? onRemoteSubscribeFallbackToAudioOnly; @@ -2666,7 +2677,12 @@ class RtcEngineEventHandler { TranscodingVideoStream stream, VideoTranscoderError error)? onLocalVideoTranscoderError; - /// @nodoc + /// Occurs when the local user receives a mixed video stream carrying layout information. + /// + /// When the local user receives a mixed video stream sent by the video mixing server for the first time, or when there is a change in the layout information of the mixed stream, the SDK triggers this callback, reporting the layout information of each sub-video stream within the mixed video stream. This callback is for Android and iOS only. + /// + /// * [connection] The connection information. See RtcConnection. + /// final void Function( RtcConnection connection, int uid, @@ -2674,6 +2690,11 @@ class RtcEngineEventHandler { int height, int layoutCount, List layoutlist)? onTranscodedStreamLayoutInfo; + + /// @nodoc + final void Function( + RtcConnection connection, int uid, Uint8List metadata, int length)? + onAudioMetadataReceived; } /// Video device management methods. @@ -2696,7 +2717,6 @@ abstract class VideoDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setDevice(String deviceIdUTF8); /// Retrieves the current video capture device. @@ -2770,7 +2790,7 @@ class RtcEngineContext { @JsonKey(name: 'license') final String? license; - /// The audio scenarios. See AudioScenarioType. Under different audio scenarios, the device uses different volume types. + /// The audio scenarios. Under different audio scenarios, the device uses different volume types. See AudioScenarioType. @JsonKey(name: 'audioScenario') final AudioScenarioType? audioScenario; @@ -2780,7 +2800,7 @@ class RtcEngineContext { /// The SDK log files are: agorasdk.log, agorasdk.1.log, agorasdk.2.log, agorasdk.3.log, and agorasdk.4.log. /// The API call log files are: agoraapi.log, agoraapi.1.log, agoraapi.2.log, agoraapi.3.log, and agoraapi.4.log. - /// The default size for each SDK log file is 1,024 KB; the default size for each API call log file is 2,048 KB. These log files are encoded in UTF-8. + /// The default size of each SDK log file and API log file is 2,048 KB. These log files are encoded in UTF-8. /// The SDK writes the latest logs in agorasdk.log or agoraapi.log. /// When agorasdk.log is full, the SDK processes the log files in the following order: /// Delete the agorasdk.4.log file (if any). @@ -2915,30 +2935,30 @@ class Metadata { Map toJson() => _$MetadataToJson(this); } -/// The CDN streaming error. +/// @nodoc @JsonEnum(alwaysCreate: true) enum DirectCdnStreamingError { - /// 0: No error. + /// @nodoc @JsonValue(0) directCdnStreamingErrorOk, - /// 1: A general error; no specific reason. You can try to push the media stream again. + /// @nodoc @JsonValue(1) directCdnStreamingErrorFailed, - /// 2: An error occurs when pushing audio streams. For example, the local audio capture device is not working properly, is occupied by another process, or does not get the permission required. + /// @nodoc @JsonValue(2) directCdnStreamingErrorAudioPublication, - /// 3: An error occurs when pushing video streams. For example, the local video capture device is not working properly, is occupied by another process, or does not get the permission required. + /// @nodoc @JsonValue(3) directCdnStreamingErrorVideoPublication, - /// 4: Fails to connect to the CDN. + /// @nodoc @JsonValue(4) directCdnStreamingErrorNetConnect, - /// 5: The URL is already being used. Use a new URL for streaming. + /// @nodoc @JsonValue(5) directCdnStreamingErrorBadName, } @@ -3045,7 +3065,7 @@ class DirectCdnStreamingEventHandler { /// When the host directly pushes streams to the CDN, if the streaming state changes, the SDK triggers this callback to report the changed streaming state, error codes, and other information. You can troubleshoot issues by referring to this callback. /// /// * [state] The current CDN streaming state. See DirectCdnStreamingState. - /// * [error] The CDN streaming error. See DirectCdnStreamingError. + /// * [reason] Reasons for changes in the status of CDN streaming. See DirectCdnStreamingReason. /// * [message] The information about the changed streaming state. final void Function( DirectCdnStreamingState state, @@ -3194,7 +3214,11 @@ abstract class RtcEngine { /// If the call timeouts, please modify the call logic and do not invoke the method in the main thread. Future> queryCodecCapability(int size); - /// @nodoc + /// Queries device score. + /// + /// Returns + /// When the method call succeeds, it returns a value in the range of [0,100], indicating the current device's score. The larger the value, the stronger the device capability. Most devices are rated between 60 and 100. When the method call fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. + /// < 0: Failure. Future queryDeviceScore(); /// Preloads a channel with token, channelId, and uid. @@ -3271,9 +3295,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is invalid. For example, the token is invalid. You need to pass in a valid parameter and join the channel again. - /// -7: The RtcEngine object has not been initialized. You need to initialize the RtcEngine object before calling this method. Future updatePreloadChannelToken(String token); /// Joins a channel with media options. @@ -3291,7 +3312,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 returns it in the onJoinChannelSuccess callback. Your app must record and maintain the returned user ID, because the SDK does not do so. /// * [options] The channel media options. See ChannelMediaOptions. /// /// Returns @@ -3316,10 +3337,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The value of a member in the ChannelMediaOptions structure is invalid. For example, the token or the user ID is invalid. You need to fill in a valid parameter. - /// -7: The RtcEngine object has not been initialized. You need to initialize the RtcEngine object before calling this method. - /// -8: The internal state of the RtcEngine object is wrong. The possible reason is that the user is not in the channel. Agora recommends that you use the onConnectionStateChanged callback to determine whether the user exists in the channel. If you receive the connectionStateDisconnected (1) or connectionStateFailed (5) state, the user is not in the channel. You need to call joinChannel to join a channel before calling this method. Future updateChannelMediaOptions(ChannelMediaOptions options); /// Sets channel options and leaves the channel. @@ -3331,21 +3348,16 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future leaveChannel({LeaveChannelOptions? options}); /// Renews the token. /// - /// The SDK triggers the onTokenPrivilegeWillExpire callback. - /// The onConnectionStateChanged callback reports connectionChangedTokenExpired (9). + /// The SDK triggers the onTokenPrivilegeWillExpire callback. onConnectionStateChanged The connectionChangedTokenExpired callback reports (9). /// /// * [token] The new token. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is invalid. For example, the token is invalid. You need to fill in a valid parameter. - /// -7: The RtcEngine object has not been initialized. You need to initialize the RtcEngine object before calling this method. Future renewToken(String token); /// Sets the channel profile. @@ -3375,11 +3387,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -1: A general error occurs (no specified reason). - /// -2: The parameter is invalid. - /// -5: The request is rejected. - /// -7: The SDK is not initialized. Future setClientRole( {required ClientRoleType role, ClientRoleOptions? options}); @@ -3401,8 +3408,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -5(ERR_REFUSED): Failed to stop the echo test. The echo test may not be running. Future stopEchoTest(); /// Enables or disables multi-camera capture. @@ -3415,7 +3420,7 @@ abstract class RtcEngine { /// Call stopCameraCapture. /// Call this method with enabled set to false. You can call this method before and after startPreview to enable multi-camera capture: /// If it is enabled before startPreview, the local video preview shows the image captured by the two cameras at the same time. - /// If it is enabled after startPreview, the SDK stops the current camera capture first, and then enables the primary camera and the second camera. The local video preview appears black for a short time, and then automatically returns to normal. When using this function, ensure that the system version is 13.0 or later. The minimum iOS device types that support multi-camera capture are as follows: + /// If it is enabled after startPreview, the SDK stops the current camera capture first, and then enables the primary camera and the second camera. The local video preview appears black for a short time, and then automatically returns to normal. This method applies to iOS only. When using this function, ensure that the system version is 13.0 or later. The minimum iOS device types that support multi-camera capture are as follows: /// iPhone XR /// iPhone XS /// iPhone XS Max @@ -3426,7 +3431,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableMultiCamera( {required bool enabled, required CameraCapturerConfiguration config}); @@ -3439,7 +3443,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableVideo(); /// Disables the video module. @@ -3450,7 +3453,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future disableVideo(); /// Enables the local video preview and specifies the video source for the preview. @@ -3466,7 +3468,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future startPreview( {VideoSourceType sourceType = VideoSourceType.videoSourceCameraPrimary}); @@ -3484,9 +3485,7 @@ abstract class RtcEngine { /// Starts the last mile network probe test. /// - /// This method starts the last-mile network probe test before joining a channel to get the uplink and downlink last mile network statistics, including the bandwidth, packet loss, jitter, and round-trip time (RTT). Once this method is enabled, the SDK returns the following callbacks: onLastmileQuality : The SDK triggers this callback within two seconds depending on the network conditions. This callback rates the network conditions and is more closely linked to the user experience. onLastmileProbeResult : The SDK triggers this callback within 30 seconds depending on the network conditions. This callback returns the real-time statistics of the network conditions and is more objective. This method applies to the following scenarios: - /// Before a user joins a channel, call this method to check the uplink network quality. - /// In a live streaming channel, call this method to check the uplink network quality before an audience member switches to a host. + /// This method starts the last-mile network probe test before joining a channel to get the uplink and downlink last mile network statistics, including the bandwidth, packet loss, jitter, and round-trip time (RTT). Once this method is enabled, the SDK returns the following callbacks: onLastmileQuality : The SDK triggers this callback within two seconds depending on the network conditions. This callback rates the network conditions and is more closely linked to the user experience. onLastmileProbeResult : The SDK triggers this callback within 30 seconds depending on the network conditions. This callback returns the real-time statistics of the network conditions and is more objective. This method must be called before joining the channel, and is used to judge and predict whether the current uplink network quality is good enough. /// Do not call other methods before receiving the onLastmileQuality and onLastmileProbeResult callbacks. Otherwise, the callbacks may be interrupted. /// A host should not call this method after joining a channel (when in a call). /// @@ -3494,25 +3493,22 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future startLastmileProbeTest(LastmileProbeConfig config); /// Stops the last mile network probe test. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopLastmileProbeTest(); /// Sets the video encoder configuration. /// - /// Sets the encoder configuration for the local video. You can call this method either before or after joining a channel. If the user does not need to reset the video encoding properties after joining the channel, Agora recommends calling this method before enableVideo to reduce the time to render the first video frame. + /// 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. /// /// * [config] Video profile. See VideoEncoderConfiguration. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setVideoEncoderConfiguration(VideoEncoderConfiguration config); /// Sets the image enhancement options. @@ -3530,10 +3526,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -4: The current device does not support this feature. Possible reasons include: - /// The current device capabilities do not meet the requirements for image enhancement. Agora recommends you replace it with a high-performance device. - /// The current device version is lower than Android 5.0 and does not support this feature. Agora recommends you replace the device or upgrade the operating system. Future setBeautyEffectOptions( {required bool enabled, required BeautyOptions options, @@ -3555,7 +3547,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLowlightEnhanceOptions( {required bool enabled, required LowlightEnhanceOptions options, @@ -3577,7 +3568,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setVideoDenoiserOptions( {required bool enabled, required VideoDenoiserOptions options, @@ -3599,7 +3589,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setColorEnhanceOptions( {required bool enabled, required ColorEnhanceOptions options, @@ -3634,8 +3623,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -4: The device capabilities do not meet the requirements for the virtual background feature. Agora recommends you try it on devices with higher performance. Future enableVirtualBackground( {required bool enabled, required VirtualBackgroundSource backgroundSource, @@ -3644,7 +3631,7 @@ abstract class RtcEngine { /// Initializes the video view of a remote user. /// - /// This method initializes the video view of a remote stream on the local device. It affects only the video view that the local user sees. Call this method to bind the remote video stream to a video view and to set the rendering and mirror modes of the video view. You need to specify the ID of the remote user in this method. If the remote user ID is unknown to the application, set it after the app receives the onUserJoined callback. To unbind the remote user from the view, set the view parameter to NULL. Once the remote user leaves the channel, the SDK unbinds the remote user. + /// This method initializes the video view of a remote stream on the local device. It affects only the video view that the local user sees. Call this method to bind the remote video stream to a video view and to set the rendering and mirror modes of the video view. You need to specify the ID of the remote user in this method. If the remote user ID is unknown to the application, set it after the app receives the onUserJoined callback. To unbind the remote user from the view, set the view parameter to NULL. Once the remote user leaves the channel, the SDK unbinds the remote user. In the scenarios of custom layout for mixed videos on the mobile end, you can call this method and set a separate view for rendering each sub-video stream of the mixed video stream. /// To update the rendering or mirror mode of the remote video view during a call, use the setRemoteRenderMode method. /// If you use the Agora recording function, the recording client joins the channel as a placeholder client, triggering the onUserJoined callback. Do not bind the placeholder client to the app view because the placeholder client does not send any video streams. If your app does not recognize the placeholder client, bind the remote user to the view when the SDK triggers the onFirstRemoteVideoDecoded callback. /// @@ -3657,7 +3644,7 @@ abstract class RtcEngine { /// Initializes the local video view. /// - /// This method initializes the video view of a local stream on the local device. It affects only the video view that the local user sees, not the published local video stream. Call this method to bind the local video stream to a video view (view) and to set the rendering and mirror modes of the video view. After initialization, call this method to set the local video and then join the channel. The local video still binds to the view after you leave the channel. To unbind the local video from the view, set the view parameter as NULL. + /// This method initializes the video view of a local stream on the local device. It affects only the video view that the local user sees, not the published local video stream. Call this method to bind the local video stream to a video view (view) and to set the rendering and mirror modes of the video view. After initialization, call this method to set the local video and then join the channel. The local video still binds to the view after you leave the channel. To unbind the local video from the view, set the view parameter as NULL. In real-time interactive scenarios, if you need to simultaneously view multiple preview frames in the local video preview, and each frame is at a different observation position along the video link, you can repeatedly call this method to set different view s and set different observation positions for each view. For example, by setting the video source to the camera and then configuring two view s with position setting to positionPostCapturerOrigin and positionPostCapturer, you can simultaneously preview the raw, unprocessed video frame and the video frame that has undergone preprocessing (image enhancement effects, virtual background, watermark) in the local video preview. /// You can call this method either before or after joining a channel. /// To update the rendering or mirror mode of the local video view during a call, use the setLocalRenderMode method. /// @@ -3677,7 +3664,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableAudio(); /// Disables the audio module. @@ -3687,33 +3673,32 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future disableAudio(); /// 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. See AudioScenarioType. Under different audio scenarios, the device uses different volume types. + /// * [scenario] The audio scenarios. Under different audio scenarios, the device uses different volume types. See AudioScenarioType. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAudioProfile( {required AudioProfileType profile, AudioScenarioType scenario = AudioScenarioType.audioScenarioDefault}); /// Sets audio scenarios. /// - /// 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. + /// You can call this method either before or after joining a channel. /// - /// * [scenario] The audio scenarios. See AudioScenarioType. Under different audio scenarios, the device uses different volume types. + /// * [scenario] The audio scenarios. Under different audio scenarios, the device uses different volume types. See AudioScenarioType. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAudioScenario(AudioScenarioType scenario); /// Enables or disables the local audio capture. @@ -3726,7 +3711,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableLocalAudio(bool enabled); /// Stops or resumes publishing the local audio stream. @@ -3737,7 +3721,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteLocalAudioStream(bool mute); /// Stops or resumes subscribing to the audio streams of all remote users. @@ -3750,7 +3733,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteAllRemoteAudioStreams(bool mute); /// @nodoc @@ -3765,7 +3747,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteRemoteAudioStream({required int uid, required bool mute}); /// Stops or resumes publishing the local video stream. @@ -3778,12 +3759,11 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteLocalVideoStream(bool mute); /// Enables/Disables the local video capture. /// - /// This method disables or re-enables the local video capture, and does not affect receiving the remote video stream. After calling enableVideo, the local video capture is enabled by default. You can call enableLocalVideo (false) to disable the local video capture. If you want to re-enable the local video capture, call enableLocalVideo (true). After the local video capturer is successfully disabled or re-enabled, the SDK triggers the onRemoteVideoStateChanged callback on the remote client. + /// This method disables or re-enables the local video capture, and does not affect receiving the remote video stream. After calling enableVideo, the local video capture is enabled by default. If you call enableLocalVideo (false) to disable local video capture within the channel, it also simultaneously stops publishing the video stream within the channel. If you want to restart video catpure, you can call enableLocalVideo (true) and then call updateChannelMediaOptions to set the options parameter to publish the locally captured video stream in the channel. After the local video capturer is successfully disabled or re-enabled, the SDK triggers the onRemoteVideoStateChanged callback on the remote client. /// You can call this method either before or after joining a channel. /// This method enables the internal engine and is valid after leaving the channel. /// @@ -3791,7 +3771,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableLocalVideo(bool enabled); /// Stops or resumes subscribing to the video streams of all remote users. @@ -3804,7 +3783,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteAllRemoteVideoStreams(bool mute); /// @nodoc @@ -3822,16 +3800,15 @@ abstract class RtcEngine { /// < 0: Failure. Future muteRemoteVideoStream({required int uid, required bool mute}); - /// Sets the stream type of the remote video. + /// Sets the video stream type to subscribe to. /// - /// Under limited network conditions, if the publisher has not disabled the dual-stream mode using enableDualStreamMode (false), the receiver can choose to receive either the high-quality video stream or the low-quality video stream. The high-quality video stream has a higher resolution and bitrate, and the low-quality video stream has a lower resolution and bitrate. By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. This method allows the app to adjust the corresponding video stream type based on the size of the video window to reduce the bandwidth and resources. The aspect ratio of the low-quality video stream is the same as the high-quality video stream. Once the resolution of the high-quality video stream is set, the system automatically sets the resolution, frame rate, and bitrate of the low-quality video stream. By default, the SDK enables the low-quality video stream auto mode on the sending end (it does not actively send the low-quality video stream). The host identity receiver can initiate a low-quality video stream application at the receiving end by calling this method (the call to this method by the audience receiver does not take effect). After receiving the application, the sending end automatically switches to the low-quality video stream mode. You can call this method either before or after joining a channel. If you call both setRemoteVideoStreamType and setRemoteDefaultVideoStreamType, the setting of setRemoteVideoStreamType takes effect. + /// Under limited network conditions, if the publisher does not disable the dual-stream mode using enableDualStreamMode (false), the receiver can choose to receive either the high-quality video stream, or the low-quality video stream. The high-quality video stream has a higher resolution and bitrate, while the low-quality video stream has a lower resolution and bitrate. By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. The SDK will dynamically adjust the size of the corresponding video stream based on the size of the video window to save bandwidth and computing resources. The default aspect ratio of the low-quality video stream is the same as that of the high-quality video stream. According to the current aspect ratio of the high-quality video stream, the system will automatically allocate the resolution, frame rate, and bitrate of the low-quality video stream. The SDK defaults to enabling low-quality video stream adaptive mode (autoSimulcastStream) on the sender side, which means the sender does not actively send low-quality video stream. The receiver can initiate a low-quality video stream request by calling this method, and the sender will automatically start sending low-quality video stream upon receiving the request. You can call this method either before or after joining a channel. If you call both setRemoteVideoStreamType and setRemoteDefaultVideoStreamType, the setting of setRemoteVideoStreamType takes effect. /// /// * [uid] The user ID. - /// * [streamType] The video stream type: VideoStreamType. + /// * [streamType] The video stream type, see VideoStreamType. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setRemoteVideoStreamType( {required int uid, required VideoStreamType streamType}); @@ -3851,21 +3828,19 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setRemoteVideoSubscriptionOptions( {required int uid, required VideoSubscriptionOptions options}); - /// Sets the default stream type of subscrption for remote video streams. + /// Sets the default video stream type to subscribe to. /// - /// By default, the SDK enables the low-quality video stream auto mode on the sending end (it does not actively send the low-quality video stream). The host identity receiver can initiate a low-quality video stream application at the receiving end by calling this method (the call to this method by the audience receiver does not take effect). After receiving the application, the sending end automatically switches to the low-quality video stream mode. Under limited network conditions, if the publisher has not disabled the dual-stream mode using enableDualStreamMode (false), the receiver can choose to receive either the high-quality video stream or the low-video stream. The high-quality video stream has a higher resolution and bitrate, and the low-quality video stream has a lower resolution and bitrate. By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. This method allows the app to adjust the corresponding video stream type based on the size of the video window to reduce the bandwidth and resources. The aspect ratio of the low-quality video stream is the same as the high-quality video stream. Once the resolution of the high-quality video stream is set, the system automatically sets the resolution, frame rate, and bitrate of the low-quality video stream. + /// The SDK defaults to enabling low-quality video stream adaptive mode (autoSimulcastStream) on the sender side, which means the sender does not actively send low-quality video stream. The receiver can initiate a low-quality video stream request by calling this method, and the sender will automatically start sending low-quality video stream upon receiving the request. By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. The SDK will dynamically adjust the size of the corresponding video stream based on the size of the video window to save bandwidth and computing resources. The default aspect ratio of the low-quality video stream is the same as that of the high-quality video stream. According to the current aspect ratio of the high-quality video stream, the system will automatically allocate the resolution, frame rate, and bitrate of the low-quality video stream. Under limited network conditions, if the publisher does not disable the dual-stream mode using enableDualStreamMode (false), the receiver can choose to receive either the high-quality video stream, or the low-quality video stream. The high-quality video stream has a higher resolution and bitrate, while the low-quality video stream has a lower resolution and bitrate. /// Call this method before joining a channel. The SDK does not support changing the default subscribed video stream type after joining a channel. - /// If you call both this method and setRemoteVideoStreamType, the SDK applies the settings in the setRemoteVideoStreamType method. + /// If you call both this method and setRemoteVideoStreamType, the setting of setRemoteVideoStreamType takes effect. /// /// * [streamType] The default video-stream type. See VideoStreamType. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setRemoteDefaultVideoStreamType(VideoStreamType streamType); /// Set the blocklist of subscriptions for audio streams. @@ -3881,7 +3856,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setSubscribeAudioBlocklist( {required List uidList, required int uidNumber}); @@ -3898,7 +3872,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setSubscribeAudioAllowlist( {required List uidList, required int uidNumber}); @@ -3915,7 +3888,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setSubscribeVideoBlocklist( {required List uidList, required int uidNumber}); @@ -3932,7 +3904,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setSubscribeVideoAllowlist( {required List uidList, required int uidNumber}); @@ -3942,7 +3913,7 @@ abstract class RtcEngine { /// /// * [interval] Sets the time interval between two consecutive volume indications: /// ≤ 0: Disables the volume indication. - /// > 0: Time interval (ms) between two consecutive volume indications. The lowest value is 50. + /// > 0: Time interval (ms) between two consecutive volume indications. Ensure this parameter is set to a value greater than 10, otherwise you will not receive the onAudioVolumeIndication callback. Agora recommends that this value is set as greater than 100. /// * [smooth] The smoothing factor that sets the sensitivity of the audio volume indicator. The value ranges between 0 and 10. The recommended value is 3. The greater the value, the more sensitive the indicator. /// * [reportVad] true : Enables the voice activity detection of the local user. Once it is enabled, the vad parameter of the onAudioVolumeIndication callback reports the voice activity status of the local user. false : (Default) Disables the voice activity detection of the local user. Once it is disabled, the vad parameter of the onAudioVolumeIndication callback does not report the voice activity status of the local user, except for the scenario where the engine automatically detects the voice activity of the local user. /// @@ -3962,7 +3933,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future startAudioRecording(AudioRecordingConfiguration config); /// Registers an encoded audio observer. @@ -3983,7 +3953,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopAudioRecording(); /// Creates a media player instance. @@ -4003,9 +3972,9 @@ abstract class RtcEngine { /// Starts playing the music file. /// /// This method mixes the specified local or online audio file with the audio from the microphone, or replaces the microphone's audio with the specified local or remote audio file. A successful method call triggers the onAudioMixingStateChanged (audioMixingStatePlaying) callback. When the audio mixing file playback finishes, the SDK triggers the onAudioMixingStateChanged (audioMixingStateStopped) callback on the local client. - /// For the audio file formats supported by this method, see What formats of audio files does the Agora RTC SDK support. /// You can call this method either before or after joining a channel. If you need to call startAudioMixing multiple times, ensure that the time interval between calling this method is more than 500 ms. /// If the local music file does not exist, the SDK does not support the file format, or the the SDK cannot access the music file URL, the SDK reports 701. + /// For the audio file formats supported by this method, see What formats of audio files does the Agora RTC SDK support. /// /// * [filePath] File path: /// Android: The file path, which needs to be accurate to the file name and suffix. Agora supports URL addresses, absolute paths, or file paths that start with /assets/. You might encounter permission issues if you use an absolute path to access a local file, so Agora recommends using a URI address instead. For example : content://com.android.providers.media.documents/document/audio%3A14441 @@ -4019,13 +3988,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -1: A general error occurs (no specified reason). - /// -2: The parameter is invalid. - /// -3: The SDK is not ready. - /// The audio module is disabled. - /// The program is not complete. - /// The initialization of RtcEngine fails. Reinitialize the RtcEngine. Future startAudioMixing( {required String filePath, required bool loopback, @@ -4038,7 +4000,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopAudioMixing(); /// Pauses playing and mixing the music file. @@ -4047,7 +4008,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future pauseAudioMixing(); /// Resumes playing and mixing the music file. @@ -4056,7 +4016,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future resumeAudioMixing(); /// Selects the audio track used during playback. @@ -4069,7 +4028,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future selectAudioTrack(int index); /// Gets the index of audio tracks of the current music file. @@ -4090,7 +4048,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future adjustAudioMixingVolume(int volume); /// Adjusts the volume of audio mixing for publishing. @@ -4101,7 +4058,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future adjustAudioMixingPublishVolume(int volume); /// Retrieves the audio mixing volume for publishing. @@ -4121,7 +4077,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future adjustAudioMixingPlayoutVolume(int volume); /// Retrieves the audio mixing volume for local playback. @@ -4160,7 +4115,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAudioMixingPosition(int pos); /// Sets the channel mode of the current audio file. @@ -4173,7 +4127,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAudioMixingDualMonoMode(AudioMixingDualMonoMode mode); /// Sets the pitch of the local music file. @@ -4184,7 +4137,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAudioMixingPitch(int pitch); /// Retrieves the volume of the audio effects. @@ -4204,14 +4156,11 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setEffectsVolume(int volume); /// Preloads a specified audio effect file into the memory. /// - /// To ensure smooth communication, It is recommended that you limit the size of the audio effect file. You can call this method to preload the audio effect before calling joinChannel. - /// This method does not support online audio effect files. - /// For the audio file formats supported by this method, see What formats of audio files does the Agora RTC SDK support. + /// To ensure smooth communication, It is recommended that you limit the size of the audio effect file. You can call this method to preload the audio effect before calling joinChannel. For the audio file formats supported by this method, see What formats of audio files does the Agora RTC SDK support. /// /// * [soundId] The audio effect ID. The ID of each audio effect file is unique. /// * [filePath] File path: @@ -4222,7 +4171,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future preloadEffect( {required int soundId, required String filePath, int startPos = 0}); @@ -4275,7 +4223,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future playAllEffects( {required int loopCount, required double pitch, @@ -4299,7 +4246,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setVolumeOfEffect({required int soundId, required int volume}); /// Pauses a specified audio effect file. @@ -4308,14 +4254,12 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future pauseEffect(int soundId); /// Pauses all audio effects. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future pauseAllEffects(); /// Resumes playing a specified audio effect. @@ -4324,14 +4268,12 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future resumeEffect(int soundId); /// Resumes playing all audio effect files. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future resumeAllEffects(); /// Stops playing a specified audio effect. @@ -4340,14 +4282,12 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopEffect(int soundId); /// Stops playing all audio effects. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopAllEffects(); /// Releases a specified preloaded audio effect from the memory. @@ -4356,14 +4296,12 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future unloadEffect(int soundId); /// Releases a specified preloaded audio effect from the memory. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future unloadAllEffects(); /// Retrieves the duration of the audio effect file. @@ -4389,7 +4327,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setEffectPosition({required int soundId, required int pos}); /// Retrieves the playback position of the audio effect file. @@ -4411,7 +4348,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableSoundPositionIndication(bool enabled); /// Sets the 2D position (the position on the horizontal plane) of the remote user's voice. @@ -4430,7 +4366,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setRemoteVoicePosition( {required int uid, required double pan, required double gain}); @@ -4444,7 +4379,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableSpatialAudio(bool enabled); /// Sets the spatial audio effect parameters of the remote user. @@ -4456,7 +4390,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setRemoteUserSpatialAudioParams( {required int uid, required SpatialAudioParams params}); @@ -4473,7 +4406,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setVoiceBeautifierPreset(VoiceBeautifierPreset preset); /// Sets an SDK preset audio effect. @@ -4490,7 +4422,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAudioEffectPreset(AudioEffectPreset preset); /// Sets a preset voice beautifier effect. @@ -4530,7 +4461,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAudioEffectParameters( {required AudioEffectPreset preset, required int param1, @@ -4550,7 +4480,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setVoiceBeautifierParameters( {required VoiceBeautifierPreset preset, required int param1, @@ -4570,7 +4499,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLocalVoicePitch(double pitch); /// Sets the local voice equalization effect. @@ -4582,7 +4510,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLocalVoiceEqualization( {required AudioEqualizationBandFrequency bandFrequency, required int bandGain}); @@ -4596,7 +4523,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLocalVoiceReverb( {required AudioReverbType reverbKey, required int value}); @@ -4608,8 +4534,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -1: A general error occurs (no specified reason). Future setHeadphoneEQPreset(HeadphoneEqualizerPreset preset); /// Sets the low- and high-frequency parameters of the headphone equalizer. @@ -4621,8 +4545,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -1: A general error occurs (no specified reason). Future setHeadphoneEQParameters( {required int lowGain, required int highGain}); @@ -4634,7 +4556,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLogFile(String filePath); /// Sets the log output level of the SDK. @@ -4645,7 +4566,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLogFilter(LogFilterType filter); /// Sets the output log level of the SDK. @@ -4656,7 +4576,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLogLevel(LogLevel level); /// Sets the log file size. @@ -4664,7 +4583,7 @@ abstract class RtcEngine { /// Deprecated: Use the logConfig parameter in initialize instead. By default, the SDK generates five SDK log files and five API call log files with the following rules: /// The SDK log files are: agorasdk.log, agorasdk.1.log, agorasdk.2.log, agorasdk.3.log, and agorasdk.4.log. /// The API call log files are: agoraapi.log, agoraapi.1.log, agoraapi.2.log, agoraapi.3.log, and agoraapi.4.log. - /// The default size for each SDK log file is 1,024 KB; the default size for each API call log file is 2,048 KB. These log files are encoded in UTF-8. + /// The default size of each SDK log file and API log file is 2,048 KB. These log files are encoded in UTF-8. /// The SDK writes the latest logs in agorasdk.log or agoraapi.log. /// When agorasdk.log is full, the SDK processes the log files in the following order: /// Delete the agorasdk.4.log file (if any). @@ -4678,7 +4597,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLogFileSize(int fileSizeInKBytes); /// @nodoc @@ -4689,13 +4607,13 @@ abstract class RtcEngine { /// After initializing the local video view, you can call this method to update its rendering and mirror modes. It affects only the video view that the local user sees, not the published local video stream. /// Ensure that you have called the setupLocalVideo method to initialize the local video view before calling this method. /// During a call, you can call this method as many times as necessary to update the display mode of the local video view. + /// This method only takes effect on the primary camera (primaryCameraSource). In scenarios involving custom video capture or the use of alternative video sources, you need to use setupLocalVideo instead of this method. /// /// * [renderMode] The local video display mode. See RenderModeType. /// * [mirrorMode] The mirror mode of the local video view. See VideoMirrorModeType. If you use a front camera, the SDK enables the mirror mode by default; if you use a rear camera, the SDK disables the mirror mode by default. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLocalRenderMode( {required RenderModeType renderMode, VideoMirrorModeType mirrorMode = @@ -4727,10 +4645,9 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLocalVideoMirrorMode(VideoMirrorModeType mirrorMode); - /// Enables or disables the dual-stream mode on the sender and sets the low-quality video stream. + /// Sets the dual-stream mode on the sender side and the low-quality video stream. /// /// Deprecated: This method is deprecated as of v4.2.0. Use setDualStreamMode instead. You can call this method to enable or disable the dual-stream mode on the publisher side. Dual streams are a pairing of a high-quality video stream and a low-quality video stream: /// High-quality video stream: High bitrate, high resolution. @@ -4740,18 +4657,17 @@ abstract class RtcEngine { /// You can call this method either before or after joining a channel. /// /// * [enabled] Whether to enable dual-stream mode: true : Enable dual-stream mode. false : (Default) Disable dual-stream mode. - /// * [streamConfig] The configuration of the low-quality video stream. See SimulcastStreamConfig. + /// * [streamConfig] The configuration of the low-quality video stream. See SimulcastStreamConfig. When setting mode to disableSimulcastStream, setting streamConfig will not take effect. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableDualStreamMode( {required bool enabled, SimulcastStreamConfig? streamConfig}); - /// Sets dual-stream mode configuration on the sender, and sets the low-quality video stream. + /// Sets dual-stream mode configuration on the sender side. /// - /// The SDK enables the low-quality video stream auto mode on the sender side by default (it does not actively sending low-quality video streams). The host identity receiver can initiate a low-quality video stream application at the receiving end by calling setRemoteVideoStreamType. After receiving the application, the sending end automatically switches to the low-quality video stream mode. - /// If you want to modify this behavior, you can call this method and modify the mode to disableSimulcastStream (never send low-quality video streams) or enableSimulcastStream (always send low-quality video streams). + /// The SDK defaults to enabling low-quality video stream adaptive mode (autoSimulcastStream) on the sender side, which means the sender does not actively send low-quality video stream. The receiver can initiate a low-quality video stream request by calling setRemoteVideoStreamType, and the sender then automatically starts sending low-quality video stream upon receiving the request. + /// If you want to modify this behavior, you can call this method and set mode to disableSimulcastStream (never send low-quality video streams) or enableSimulcastStream (always send low-quality video streams). /// If you want to restore the default behavior after making changes, you can call this method again with mode set to autoSimulcastStream. The difference and connection between this method and enableDualStreamMode is as follows: /// When calling this method and setting mode to disableSimulcastStream, it has the same effect as calling and setting enabled to false. /// When calling this method and setting mode to enableSimulcastStream, it has the same effect as calling and setting enabled to true. @@ -4762,11 +4678,18 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setDualStreamMode( {required SimulcastStreamMode mode, SimulcastStreamConfig? streamConfig}); - /// @nodoc + /// Sets whether to enable the local playback of external audio source. + /// + /// Ensure you have called the createCustomAudioTrack method to create a custom audio track before calling this method. After calling this method to enable the local playback of external audio source, if you need to stop local playback, you can call this method again and set enabled to false. You can call adjustCustomAudioPlayoutVolume to adjust the local playback volume of the custom audio track. + /// + /// * [trackId] The audio track ID. Set this parameter to the custom audio track ID returned in createCustomAudioTrack. + /// * [enabled] Whether to play the external audio source: true : Play the external audio source. false : (Default) Do not play the external source. + /// + /// Returns + /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. Future enableCustomAudioLocalPlayback( {required int trackId, required bool enabled}); @@ -4832,7 +4755,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setMixedAudioFrameParameters( {required int sampleRate, required int channel, @@ -4863,11 +4785,10 @@ abstract class RtcEngine { /// Sets the audio data format reported by onPlaybackAudioFrameBeforeMixing. /// /// * [sampleRate] The sample rate (Hz) of the audio data, which can be set as 8000, 16000, 32000, 44100, or 48000. - /// * [channel] The number of channels of the external audio source, which can be set as 1 (Mono) or 2 (Stereo). + /// * [channel] The number of channels of the audio data, which can be set as 1 (Mono) or 2 (Stereo). /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setPlaybackAudioFrameBeforeMixingParameters( {required int sampleRate, required int channel}); @@ -4879,8 +4800,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: Invalid parameters. Future enableAudioSpectrumMonitor({int intervalInMS = 100}); /// Disables audio spectrum monitoring. @@ -4889,7 +4808,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future disableAudioSpectrumMonitor(); /// Register an audio spectrum observer. @@ -4908,7 +4826,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. void unregisterAudioSpectrumObserver(AudioSpectrumObserver observer); /// Adjusts the capturing signal volume. @@ -4922,7 +4839,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future adjustRecordingSignalVolume(int volume); /// Whether to mute the recording signal. @@ -4931,7 +4847,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteRecordingSignal(bool mute); /// Adjusts the playback signal volume of all remote users. @@ -4946,7 +4861,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future adjustPlaybackSignalVolume(int volume); /// Adjusts the playback signal volume of a specified remote user. @@ -4960,14 +4874,20 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future adjustUserPlaybackSignalVolume( {required int uid, required int volume}); /// @nodoc Future setLocalPublishFallbackOption(StreamFallbackOptions option); - /// @nodoc + /// Sets the fallback option for the subscribed video stream based on the network conditions. + /// + /// An unstable network affects the audio and video quality in a video call or interactive live video streaming. If option is set as streamFallbackOptionVideoStreamLow or streamFallbackOptionAudioOnly, the SDK automatically switches the video from a high-quality stream to a low-quality stream or disables the video when the downlink network conditions cannot support both audio and video to guarantee the quality of the audio. Meanwhile, the SDK continuously monitors network quality and resumes subscribing to audio and video streams when the network quality improves. When the subscribed video stream falls back to an audio-only stream, or recovers from an audio-only stream to an audio-video stream, the SDK triggers the onRemoteSubscribeFallbackToAudioOnly callback. Ensure that you call this method before joining a channel. + /// + /// * [option] Fallback options for the subscribed stream. See StreamFallbackOptions. + /// + /// Returns + /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. Future setRemoteSubscribeFallbackOption(StreamFallbackOptions option); /// Enables loopback audio capturing. @@ -4983,7 +4903,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableLoopbackRecording( {required bool enabled, String? deviceName}); @@ -5020,15 +4939,15 @@ abstract class RtcEngine { /// Sets the volume of the in-ear monitor. /// - /// This method applies to Android and iOS only. - /// Users must use wired earphones to hear their own voices. - /// You can call this method either before or after joining a channel. + /// You can call this method either before or after joining a channel. /// - /// * [volume] The volume of the in-ear monitor. The value ranges between 0 and 100. The default value is 100. + /// * [volume] The volume of the in-ear monitor. The value range is [0,400]. + /// 0: Mute. + /// 100: (Default) The original volume. + /// 400: Four times the original volume. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setInEarMonitoringVolume(int volume); /// Adds an extension to the SDK. @@ -5040,7 +4959,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future loadExtensionProvider( {required String path, bool unloadAfterUse = false}); @@ -5054,7 +4972,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setExtensionProviderProperty( {required String provider, required String key, required String value}); @@ -5070,7 +4987,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future registerExtension( {required String provider, required String extension, @@ -5091,8 +5007,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -3: The extension library is not loaded. Agora recommends that you check the storage location or the name of the dynamic library. Future enableExtension( {required String provider, required String extension, @@ -5113,7 +5027,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setExtensionProperty( {required String provider, required String extension, @@ -5142,7 +5055,7 @@ abstract class RtcEngine { /// Sets the camera capture configuration. /// /// This method is for Android and iOS only. - /// This method must be called after the camera is turned on, such as calling after startPreview and enableVideo. + /// Call this method before enabling local camera capture, such as before calling startPreview and joinChannel. /// /// * [config] The camera capture configuration. See CameraCapturerConfiguration. /// @@ -5152,12 +5065,12 @@ abstract class RtcEngine { Future setCameraCapturerConfiguration( CameraCapturerConfiguration config); - /// Creates a customized video track. + /// Creates a custom video track. /// - /// When you need to publish multiple custom captured videos in the channel, you can refer to the following steps: + /// To publish a custom video source, see the following steps: /// Call this method to create a video track and get the video track ID. - /// In each channel's ChannelMediaOptions, set the customVideoTrackId parameter to the ID of the video track you want to publish, and set publishCustomVideoTrack to true. - /// If you call pushVideoFrame, and specify customVideoTrackId as the videoTrackId set in step 2, you can publish the corresponding custom video source in multiple channels. + /// Call joinChannel to join the channel. In ChannelMediaOptions, set customVideoTrackId to the video track ID that you want to publish, and set publishCustomVideoTrack to true. + /// Call pushVideoFrame and specify videoTrackId as the video track ID set in step 2. You can then publish the corresponding custom video source in the channel. /// /// Returns /// If the method call is successful, the video track ID is returned as the unique identifier of the video track. @@ -5173,7 +5086,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future destroyCustomVideoTrack(int videoTrackId); /// @nodoc @@ -5186,7 +5098,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future switchCamera(); /// Checks whether the device supports camera zoom. @@ -5211,7 +5122,7 @@ abstract class RtcEngine { /// /// This method must be called after the camera is successfully enabled, that is, after the SDK triggers the onLocalVideoStateChanged callback and returns the local video state as localVideoStreamStateCapturing (1). /// This method is for Android and iOS only. - /// The app enables the front camera by default. If your front camera does not support enabling the flash, this method returns false. If you want to check whether the rear camera supports the flash function, call switchCamera before this method. + /// The app enables the front camera by default. If your front camera does not support flash, this method returns false. If you want to check whether the rear camera supports the flash function, call switchCamera before this method. /// On iPads with system version 15, even if isCameraTorchSupported returns true, you might fail to successfully enable the flash by calling setCameraTorchOn due to system issues. /// /// Returns @@ -5259,7 +5170,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableFaceDetection(bool enabled); /// Gets the maximum zoom ratio supported by the camera. @@ -5282,7 +5192,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setCameraFocusPositionInPreview( {required double positionX, required double positionY}); @@ -5295,7 +5204,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setCameraTorchOn(bool isOn); /// Enables the camera auto-face focus function. @@ -5308,7 +5216,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setCameraAutoFocusFaceModeEnabled(bool enabled); /// Checks whether the device supports manual exposure. @@ -5331,7 +5238,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setCameraExposurePosition( {required double positionXinView, required double positionYinView}); @@ -5358,7 +5264,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setCameraExposureFactor(double factor); /// Checks whether the device supports auto exposure. @@ -5379,19 +5284,21 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setCameraAutoExposureFaceModeEnabled(bool enabled); /// Sets the default audio playback route. /// /// This method applies to 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. + /// 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. + /// Video call: Speakerphone. + /// Video broadcast: Speakerphone. You can call this method to change the default audio route. After a successful method call, the SDK triggers the onAudioRoutingChanged callback. The system audio route changes when an external audio device, such as a headphone or a Bluetooth audio device, is connected. See Audio Route for detailed change principles. /// /// * [defaultToSpeaker] Whether to set the speakerphone as the default audio route: true : Set the speakerphone as the default audio route. false : Set the earpiece as the default audio route. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setDefaultAudioRouteToSpeakerphone(bool defaultToSpeaker); /// Enables/Disables the audio route to the speakerphone. @@ -5405,7 +5312,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setEnableSpeakerphone(bool speakerOn); /// Checks whether the speakerphone is enabled. @@ -5442,7 +5348,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAudioSessionOperationRestriction( AudioSessionOperationRestriction restriction); @@ -5458,9 +5363,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is invalid. - /// -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. Future startScreenCaptureByDisplayId( {required int displayId, required Rectangle regionRect, @@ -5478,9 +5380,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is invalid. - /// -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. Future startScreenCaptureByScreenRect( {required Rectangle screenRect, required Rectangle regionRect, @@ -5512,9 +5411,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is invalid. - /// -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. Future startScreenCaptureByWindowId( {required int windowId, required Rectangle regionRect, @@ -5528,9 +5424,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is invalid. - /// -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. Future setScreenCaptureContentHint(VideoContentHint contentHint); /// Updates the screen capturing region. @@ -5541,9 +5434,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is invalid. - /// -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. Future updateScreenCaptureRegion(Rectangle regionRect); /// Updates the screen capturing parameters. @@ -5555,9 +5445,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is invalid. - /// -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. Future updateScreenCaptureParameters( ScreenCaptureParameters captureParams); @@ -5583,8 +5470,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is null. Future startScreenCapture(ScreenCaptureParameters2 captureParams); /// Starts screen capture. @@ -5616,9 +5501,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is invalid. - /// -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. Future updateScreenCapture(ScreenCaptureParameters2 captureParams); /// Queries the highest frame rate supported by the device during screen sharing. @@ -5636,7 +5518,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setScreenCaptureScenario(ScreenScenarioType screenScenario); /// Stops screen capture. @@ -5645,7 +5526,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopScreenCapture(); /// Stops screen capture. @@ -5658,7 +5538,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopScreenCaptureBySourceType(VideoSourceType sourceType); /// Retrieves the call ID. @@ -5679,9 +5558,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2 (ERR_INVALID_ARGUMENT). - /// -3 (ERR_NOT_READY). Future rate( {required String callId, required int rating, @@ -5696,13 +5572,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is invalid. - /// - 3: The SDK is not ready. Possible reasons include the following: - /// The initialization of RtcEngine fails. Reinitialize the RtcEngine. - /// No user has joined the channel when the method is called. Please check your code logic. - /// The user has not left the channel when the rate or complain method is called. Please check your code logic. - /// The audio module is disabled. The program is not complete. Future complain({required String callId, required String description}); /// Starts pushing media streams to a CDN without transcoding. @@ -5715,10 +5584,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The URL is null or the string length is 0. - /// -7: The SDK is not initialized before calling this method. - /// -19: The Media Push URL is already in use, use another URL instead. Future startRtmpStreamWithoutTranscoding(String url); /// Starts Media Push and sets the transcoding configuration. @@ -5733,10 +5598,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The URL is null or the string length is 0. - /// -7: The SDK is not initialized before calling this method. - /// -19: The Media Push URL is already in use, use another URL instead. Future startRtmpStreamWithTranscoding( {required String url, required LiveTranscoding transcoding}); @@ -5748,7 +5609,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future updateRtmpTranscoding(LiveTranscoding transcoding); /// Stops pushing media streams to a CDN. @@ -5759,7 +5619,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopRtmpStream(String url); /// Starts the local video mixing. @@ -5779,7 +5638,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future startLocalVideoTranscoder(LocalTranscoderConfiguration config); /// Updates the local video mixing configuration. @@ -5790,7 +5648,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future updateLocalTranscoderConfiguration( LocalTranscoderConfiguration config); @@ -5825,7 +5682,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopCameraCapture(VideoSourceType type); /// Sets the rotation angle of the captured video. @@ -5839,7 +5695,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setCameraDeviceOrientation( {required VideoSourceType type, required VideoOrientation orientation}); @@ -5864,7 +5719,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. void registerEventHandler(RtcEngineEventHandler eventHandler); /// Removes the specified callback handler. @@ -5896,7 +5750,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setEncryptionMode(String encryptionMode); /// Enables built-in encryption with an encryption password before users join a channel. @@ -5909,7 +5762,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setEncryptionSecret(String secret); /// Enables or disables the built-in encryption. @@ -5921,10 +5773,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: An invalid parameter is used. Set the parameter with a valid value. - /// -4: The built-in encryption mode is incorrect or the SDK fails to load the external encryption library. Check the enumeration or reload the external encryption library. - /// -7: The SDK is not initialized. Initialize the RtcEngine instance before calling this method. Future enableEncryption( {required bool enabled, required EncryptionConfig config}); @@ -5955,7 +5803,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future sendStreamMessage( {required int streamId, required Uint8List data, required int length}); @@ -5969,7 +5816,6 @@ abstract class RtcEngine { /// If you only want to add a watermark to the media push, you can call this method or the method. /// This method supports adding a watermark image in the PNG file format only. Supported pixel formats of the PNG image are RGBA, RGB, Palette, Gray, and Alpha_gray. /// If the dimensions of the PNG image differ from your settings in this method, the image will be cropped or zoomed to conform to your settings. - /// If you have enabled the local video preview by calling the startPreview method, you can use the visibleInPreview member to set whether or not the watermark is visible in the preview. /// If you have enabled the mirror mode for the local video, the watermark on the local video is also mirrored. To avoid mirroring the watermark, Agora recommends that you do not use the mirror and watermark functions for the local video at the same time. You can implement the watermark function in your application layer. /// /// * [watermarkUrl] The local file path of the watermark image to be added. This method supports adding a watermark image from the local absolute or relative file path. @@ -5977,7 +5823,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future addVideoWatermark( {required String watermarkUrl, required WatermarkOptions options}); @@ -5985,7 +5830,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future clearVideoWatermarks(); /// @nodoc @@ -6002,7 +5846,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableWebSdkInteroperability(bool enabled); /// Reports customized messages. @@ -6075,7 +5918,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future registerLocalUserAccount( {required String appId, required String userAccount}); @@ -6139,7 +5981,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future joinChannelWithUserAccountEx( {required String token, required String channelId, @@ -6218,7 +6059,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future pauseAllChannelMediaRelay(); /// Resumes the media stream relay to all target channels. @@ -6238,7 +6078,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setDirectCdnStreamingAudioConfiguration( AudioProfileType profile); @@ -6250,7 +6089,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setDirectCdnStreamingVideoConfiguration( VideoEncoderConfiguration config); @@ -6264,7 +6102,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future startDirectCdnStreaming( {required DirectCdnStreamingEventHandler eventHandler, required String publishUrl, @@ -6274,7 +6111,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopDirectCdnStreaming(); /// @nodoc @@ -6294,8 +6130,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -22: Cannot find audio effect files. Please set the correct paths for sound1 and sound2. Future startRhythmPlayer( {required String sound1, required String sound2, @@ -6307,7 +6141,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopRhythmPlayer(); /// Configures the virtual metronome. @@ -6320,7 +6153,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future configRhythmPlayer(AgoraRhythmPlayerConfig config); /// Takes a snapshot of a video stream. @@ -6339,7 +6171,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future takeSnapshot({required int uid, required String filePath}); /// Enables or disables video screenshot and upload. @@ -6351,13 +6182,12 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableContentInspect( {required bool enabled, required ContentInspectConfig config}); /// Adjusts the volume of the custom audio track played remotely. /// - /// Ensure you have called the createCustomAudioTrack method to create a custom audio track before calling this method. If you want to change the volume of the audio to be published, you need to call this method again. + /// Ensure you have called the createCustomAudioTrack method to create a custom audio track before calling this method. If you want to change the volume of the audio played remotely, you need to call this method again. /// /// * [trackId] The audio track ID. Set this parameter to the custom audio track ID returned in createCustomAudioTrack. /// * [volume] The volume of the audio source. The value can range from 0 to 100. 0 means mute; 100 means the original volume. @@ -6392,9 +6222,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is invalid. - /// -7: The SDK is not initialized. Future setCloudProxy(CloudProxyType proxyType); /// @nodoc @@ -6408,7 +6235,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAdvancedAudioOptions( {required AdvancedAudioOptions options, int sourceType = 0}); @@ -6463,7 +6289,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setParameters(String parameters); /// Enables tracing the video frame rendering process. @@ -6474,8 +6299,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -7: The method is called before RtcEngine is initialized. Future startMediaRenderingTracing(); /// Enables audio and video frame instant rendering. @@ -6486,8 +6309,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -7: The method is called before RtcEngine is initialized. Future enableInstantMediaRendering(); /// Gets the current NTP (Network Time Protocol) time. @@ -6508,6 +6329,10 @@ 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); + /// @nodoc + Future sendAudioMetadata( + {required Uint8List metadata, required int length}); + /// Gets the AudioDeviceManager object to manage audio devices. /// /// Returns @@ -6575,7 +6400,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. void unregisterAudioEncodedFrameObserver(AudioEncodedFrameObserver observer); /// Gets the C++ handle of the Native SDK. @@ -6615,7 +6439,7 @@ extension QualityReportFormatTypeExt on QualityReportFormatType { /// Media device states. @JsonEnum(alwaysCreate: true) enum MediaDeviceStateType { - /// @nodoc + /// 0: The device is ready for use. @JsonValue(0) mediaDeviceStateIdle, diff --git a/lib/src/agora_rtc_engine_ex.dart b/lib/src/agora_rtc_engine_ex.dart index 5bf5086f1..d05b914df 100644 --- a/lib/src/agora_rtc_engine_ex.dart +++ b/lib/src/agora_rtc_engine_ex.dart @@ -32,7 +32,7 @@ abstract class RtcEngineEx implements RtcEngine { /// You can call this method multiple times to join more than one channel. /// If you are already in a channel, you cannot rejoin it with the same user ID. /// If you want to join the same channel from different devices, ensure that the user IDs are different for all devices. - /// Ensure that the app ID you use to generate the token is the same as the app ID used when creating the RtcEngine instance. + /// Ensure that the App ID you use to generate the token is the same as the App ID used when creating the RtcEngine instance. /// /// * [token] The token generated on your server for authentication. If you need to join different channels at the same time or switch between channels, Agora recommends using a wildcard token so that you don't need to apply for a new token every time joining a channel. /// * [connection] The connection information. See RtcConnection. @@ -64,7 +64,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future leaveChannelEx( {required RtcConnection connection, LeaveChannelOptions? options}); @@ -75,24 +74,19 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The value of a member in the ChannelMediaOptions structure is invalid. For example, the token or the user ID is invalid. You need to fill in a valid parameter. - /// -7: The RtcEngine object has not been initialized. You need to initialize the RtcEngine object before calling this method. - /// -8: The internal state of the RtcEngine object is wrong. The possible reason is that the user is not in the channel. Agora recommends that you use the onConnectionStateChanged callback to determine whether the user exists in the channel. If you receive the connectionStateDisconnected (1) or connectionStateFailed (5) state, the user is not in the channel. You need to call joinChannel to join a channel before calling this method. Future updateChannelMediaOptionsEx( {required ChannelMediaOptions options, required RtcConnection connection}); - /// Sets the encoder configuration for the local video. + /// Sets the video encoder configuration. /// - /// 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. 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. /// /// * [config] Video profile. See VideoEncoderConfiguration. /// * [connection] The connection information. See RtcConnection. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setVideoEncoderConfigurationEx( {required VideoEncoderConfiguration config, required RtcConnection connection}); @@ -118,7 +112,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteRemoteAudioStreamEx( {required int uid, required bool mute, @@ -140,17 +133,16 @@ abstract class RtcEngineEx implements RtcEngine { required bool mute, required RtcConnection connection}); - /// Sets the stream type of the remote video. + /// Sets the video stream type to subscribe to. /// - /// Under limited network conditions, if the publisher has not disabled the dual-stream mode using enableDualStreamModeEx (false), the receiver can choose to receive either the high-quality video stream or the low-quality video stream. The high-quality video stream has a higher resolution and bitrate, and the low-quality video stream has a lower resolution and bitrate. By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. This method allows the app to adjust the corresponding video stream type based on the size of the video window to reduce the bandwidth and resources. The aspect ratio of the low-quality video stream is the same as the high-quality video stream. Once the resolution of the high-quality video stream is set, the system automatically sets the resolution, frame rate, and bitrate of the low-quality video stream. The SDK enables the low-quality video stream auto mode on the sender by default (not actively sending low-quality video streams). The host at the receiving end can call this method to initiate a low-quality video stream stream request on the receiving end, and the sender automatically switches to the low-quality video stream mode after receiving the request. + /// The SDK defaults to enabling low-quality video stream adaptive mode (autoSimulcastStream) on the sender side, which means the sender does not actively send low-quality video stream. The receiver can initiate a low-quality video stream request by calling this method, and the sender will automatically start sending low-quality video stream upon receiving the request. By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. The SDK will dynamically adjust the size of the corresponding video stream based on the size of the video window to save bandwidth and computing resources. The default aspect ratio of the low-quality video stream is the same as that of the high-quality video stream. According to the current aspect ratio of the high-quality video stream, the system will automatically allocate the resolution, frame rate, and bitrate of the low-quality video stream. Under limited network conditions, if the publisher does not disable the dual-stream mode using enableDualStreamModeEx (false), the receiver can choose to receive either the high-quality video stream, or the low-quality video stream. The high-quality video stream has a higher resolution and bitrate, while the low-quality video stream has a lower resolution and bitrate. /// /// * [uid] The user ID. - /// * [streamType] The video stream type: VideoStreamType. + /// * [streamType] The video stream type, see VideoStreamType. /// * [connection] The connection information. See RtcConnection. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setRemoteVideoStreamTypeEx( {required int uid, required VideoStreamType streamType, @@ -165,7 +157,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteLocalAudioStreamEx( {required bool mute, required RtcConnection connection}); @@ -179,7 +170,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteLocalVideoStreamEx( {required bool mute, required RtcConnection connection}); @@ -194,7 +184,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteAllRemoteAudioStreamsEx( {required bool mute, required RtcConnection connection}); @@ -207,7 +196,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteAllRemoteVideoStreamsEx( {required bool mute, required RtcConnection connection}); @@ -225,7 +213,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setSubscribeAudioBlocklistEx( {required List uidList, required int uidNumber, @@ -245,7 +232,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setSubscribeAudioAllowlistEx( {required List uidList, required int uidNumber, @@ -265,7 +251,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setSubscribeVideoBlocklistEx( {required List uidList, required int uidNumber, @@ -285,7 +270,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setSubscribeVideoAllowlistEx( {required List uidList, required int uidNumber, @@ -301,7 +285,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setRemoteVideoSubscriptionOptionsEx( {required int uid, required VideoSubscriptionOptions options, @@ -323,7 +306,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setRemoteVoicePositionEx( {required int uid, required double pan, @@ -370,7 +352,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableLoopbackRecordingEx( {required RtcConnection connection, required bool enabled, @@ -396,7 +377,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future adjustUserPlaybackSignalVolumeEx( {required int uid, required int volume, @@ -448,7 +428,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future sendStreamMessageEx( {required int streamId, required Uint8List data, @@ -473,7 +452,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future addVideoWatermarkEx( {required String watermarkUrl, required WatermarkOptions options, @@ -485,7 +463,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future clearVideoWatermarkEx(RtcConnection connection); /// Agora supports reporting and analyzing customized messages. @@ -505,7 +482,7 @@ abstract class RtcEngineEx implements RtcEngine { /// /// * [interval] Sets the time interval between two consecutive volume indications: /// ≤ 0: Disables the volume indication. - /// > 0: Time interval (ms) between two consecutive volume indications. The lowest value is 50. + /// > 0: Time interval (ms) between two consecutive volume indications. Ensure this parameter is set to a value greater than 10, otherwise you will not receive the onAudioVolumeIndication callback. Agora recommends that this value is set as greater than 100. /// * [smooth] The smoothing factor that sets the sensitivity of the audio volume indicator. The value ranges between 0 and 10. The recommended value is 3. The greater the value, the more sensitive the indicator. /// * [reportVad] true : Enables the voice activity detection of the local user. Once it is enabled, the vad parameter of the onAudioVolumeIndication callback reports the voice activity status of the local user. false : (Default) Disables the voice activity detection of the local user. Once it is disabled, the vad parameter of the onAudioVolumeIndication callback does not report the voice activity status of the local user, except for the scenario where the engine automatically detects the voice activity of the local user. /// * [connection] The connection information. See RtcConnection. @@ -530,10 +507,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The URL is null or the string length is 0. - /// -7: The SDK is not initialized before calling this method. - /// -19: The Media Push URL is already in use, use another URL instead. Future startRtmpStreamWithoutTranscodingEx( {required String url, required RtcConnection connection}); @@ -551,10 +524,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The URL is null or the string length is 0. - /// -7: The SDK is not initialized before calling this method. - /// -19: The Media Push URL is already in use, use another URL instead. Future startRtmpStreamWithTranscodingEx( {required String url, required LiveTranscoding transcoding, @@ -569,7 +538,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future updateRtmpTranscodingEx( {required LiveTranscoding transcoding, required RtcConnection connection}); @@ -582,7 +550,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopRtmpStreamEx( {required String url, required RtcConnection connection}); @@ -644,7 +611,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future pauseAllChannelMediaRelayEx(RtcConnection connection); /// Resumes the media stream relay to all target channels. @@ -680,12 +646,11 @@ abstract class RtcEngineEx implements RtcEngine { /// Low-quality video stream: Low bitrate, low resolution. This method is applicable to all types of streams from the sender, including but not limited to video streams collected from cameras, screen sharing streams, and custom-collected video streams. /// /// * [enabled] Whether to enable dual-stream mode: true : Enable dual-stream mode. false : (Default) Disable dual-stream mode. - /// * [streamConfig] The configuration of the low-quality video stream. See SimulcastStreamConfig. + /// * [streamConfig] The configuration of the low-quality video stream. See SimulcastStreamConfig. When setting mode to disableSimulcastStream, setting streamConfig will not take effect. /// * [connection] The connection information. See RtcConnection. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableDualStreamModeEx( {required bool enabled, required SimulcastStreamConfig streamConfig, @@ -693,18 +658,19 @@ abstract class RtcEngineEx implements RtcEngine { /// Sets the dual-stream mode on the sender side. /// - /// The SDK enables the low-quality video stream auto mode on the sender by default, which is equivalent to calling this method and setting the mode to autoSimulcastStream. If you want to modify this behavior, you can call this method and modify the mode to disableSimulcastStream (never send low-quality video streams) or enableSimulcastStream (always send low-quality video streams). The difference and connection between this method and enableDualStreamModeEx is as follows: + /// The SDK defaults to enabling low-quality video stream adaptive mode (autoSimulcastStream) on the sender side, which means the sender does not actively send low-quality video stream. The receiver can initiate a low-quality video stream request by calling setRemoteVideoStreamTypeEx, and the sender will automatically start sending low-quality video stream upon receiving the request. + /// If you want to modify this behavior, you can call this method and set mode to disableSimulcastStream (never send low-quality video streams) or enableSimulcastStream (always send low-quality video streams). + /// If you want to restore the default behavior after making changes, you can call this method again with mode set to autoSimulcastStream. The difference and connection between this method and enableDualStreamModeEx is as follows: /// When calling this method and setting mode to disableSimulcastStream, it has the same effect as enableDualStreamModeEx (false). /// When calling this method and setting mode to enableSimulcastStream, it has the same effect as enableDualStreamModeEx (true). /// Both methods can be called before and after joining a channel. If both methods are used, the settings in the method called later takes precedence. /// /// * [mode] The mode in which the video stream is sent. See SimulcastStreamMode. - /// * [streamConfig] The configuration of the low-quality video stream. See SimulcastStreamConfig. + /// * [streamConfig] The configuration of the low-quality video stream. See SimulcastStreamConfig. When setting mode to disableSimulcastStream, setting streamConfig will not take effect. /// * [connection] The connection information. See RtcConnection. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setDualStreamModeEx( {required SimulcastStreamMode mode, required SimulcastStreamConfig streamConfig, @@ -730,7 +696,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future takeSnapshotEx( {required RtcConnection connection, required int uid, @@ -746,7 +711,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableContentInspectEx( {required bool enabled, required ContentInspectConfig config, @@ -761,6 +725,14 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future startMediaRenderingTracingEx(RtcConnection connection); + + /// @nodoc + Future sendAudioMetadataEx( + {required RtcConnection connection, + required Uint8List metadata, + required int length}); + + /// @nodoc + Future getCallIdEx(RtcConnection connection); } diff --git a/lib/src/agora_spatial_audio.dart b/lib/src/agora_spatial_audio.dart index d680db82e..5f5e6e6dd 100644 --- a/lib/src/agora_spatial_audio.dart +++ b/lib/src/agora_spatial_audio.dart @@ -7,11 +7,11 @@ class RemoteVoicePositionInfo { /// @nodoc const RemoteVoicePositionInfo({this.position, this.forward}); - /// The coordinates in the world coordinate system. This parameter is an array of length 3, and the three values represent the front, right, and top coordinates in turn. + /// @nodoc @JsonKey(name: 'position') final List? position; - /// The unit vector of the x axis in the coordinate system. This parameter is an array of length 3, and the three values represent the front, right, and top coordinates in turn. + /// @nodoc @JsonKey(name: 'forward') final List? forward; @@ -103,7 +103,6 @@ abstract class BaseSpatialAudioEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setMaxAudioRecvCount(int maxCount); /// Sets the audio reception range of the local user. @@ -114,7 +113,6 @@ abstract class BaseSpatialAudioEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAudioRecvRange(double range); /// Sets the length (in meters) of the game engine distance per unit. @@ -125,21 +123,19 @@ abstract class BaseSpatialAudioEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setDistanceUnit(double unit); /// Updates the spatial position of the local user. /// /// Under the LocalSpatialAudioEngine class, this method needs to be used with updateRemotePosition. The SDK calculates the relative position between the local and remote users according to this method and the parameter settings in updateRemotePosition, and then calculates the user's spatial audio effect parameters. /// - /// * [position] The coordinates in the world coordinate system. This parameter is an array of length 3, and the three values represent the front, right, and top coordinates in turn. - /// * [axisForward] The unit vector of the x axis in the coordinate system. This parameter is an array of length 3, and the three values represent the front, right, and top coordinates in turn. + /// + /// /// * [axisRight] The unit vector of the y axis in the coordinate system. This parameter is an array of length 3, and the three values represent the front, right, and top coordinates in turn. /// * [axisUp] The unit vector of the z axis in the coordinate system. This parameter is an array of length 3, and the three values represent the front, right, and top coordinates in turn. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future updateSelfPosition( {required List position, required List axisForward, @@ -163,7 +159,6 @@ abstract class BaseSpatialAudioEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future updatePlayerPositionInfo( {required int playerId, required RemoteVoicePositionInfo positionInfo}); @@ -181,7 +176,6 @@ abstract class BaseSpatialAudioEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteLocalAudioStream(bool mute); /// Stops or resumes subscribing to the audio streams of all remote users. @@ -195,7 +189,6 @@ abstract class BaseSpatialAudioEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteAllRemoteAudioStreams(bool mute); /// Sets the sound insulation area. @@ -205,12 +198,11 @@ abstract class BaseSpatialAudioEngine { /// If the user or media player is in the same sound insulation area, it is not affected by SpatialAudioZone, and the sound attenuation effect is determined by the attenuation parameter in setPlayerAttenuation or setRemoteAudioAttenuation. If you do not call setPlayerAttenuation or setRemoteAudioAttenuation, the default sound attenuation coefficient of the SDK is 0.5, which simulates the attenuation of the sound in the real environment. /// If the sound source and the receiver belong to two sound insulation areas, the receiver cannot hear the sound source. If this method is called multiple times, the last sound insulation area set takes effect. /// - /// * [zones] Sound insulation area settings. See SpatialAudioZone. On the Windows platform, it is necessary to ensure that the number of members in the zones array is equal to the value of zoneCount; otherwise, it may cause a crash. + /// * [zones] Sound insulation area settings. See SpatialAudioZone. When you set this parameter to NULL, it means clearing all sound insulation zones. On the Windows platform, it is necessary to ensure that the number of members in the zones array is equal to the value of zoneCount; otherwise, it may cause a crash. /// * [zoneCount] The number of sound insulation areas. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setZones( {required List zones, required int zoneCount}); @@ -228,7 +220,6 @@ abstract class BaseSpatialAudioEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setPlayerAttenuation( {required int playerId, required double attenuation, @@ -244,7 +235,6 @@ abstract class BaseSpatialAudioEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteRemoteAudioStream({required int uid, required bool mute}); } @@ -259,7 +249,6 @@ abstract class LocalSpatialAudioEngine implements BaseSpatialAudioEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future initialize(); /// Updates the spatial position of the specified remote user. @@ -271,7 +260,6 @@ abstract class LocalSpatialAudioEngine implements BaseSpatialAudioEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future updateRemotePosition( {required int uid, required RemoteVoicePositionInfo posInfo}); @@ -289,7 +277,6 @@ abstract class LocalSpatialAudioEngine implements BaseSpatialAudioEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future removeRemotePosition(int uid); /// @nodoc @@ -302,7 +289,6 @@ abstract class LocalSpatialAudioEngine implements BaseSpatialAudioEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future clearRemotePositions(); /// @nodoc @@ -322,7 +308,6 @@ abstract class LocalSpatialAudioEngine implements BaseSpatialAudioEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setRemoteAudioAttenuation( {required int uid, required double attenuation, required bool forceSet}); } diff --git a/lib/src/audio_device_manager.dart b/lib/src/audio_device_manager.dart index 47319d9a8..423fddf31 100644 --- a/lib/src/audio_device_manager.dart +++ b/lib/src/audio_device_manager.dart @@ -50,7 +50,6 @@ abstract class AudioDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setPlaybackDevice(String deviceId); /// Retrieves the audio playback device associated with the device ID. @@ -69,10 +68,20 @@ abstract class AudioDeviceManager { /// An AudioDeviceInfo object, which contains the ID and device name of the audio devices. Future getPlaybackDeviceInfo(); - /// @nodoc + /// Sets the volume of the audio playback device. + /// + /// This method applies to Windows only. + /// + /// * [volume] The volume of the audio playback device. The value range is [0,255]. + /// + /// Returns + /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. Future setPlaybackDeviceVolume(int volume); - /// @nodoc + /// Retrieves the volume of the audio playback device. + /// + /// Returns + /// The volume of the audio playback device. The value range is [0,255]. Future getPlaybackDeviceVolume(); /// Sets the audio capture device. @@ -83,7 +92,6 @@ abstract class AudioDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setRecordingDevice(String deviceId); /// Gets the current audio recording device. @@ -110,10 +118,14 @@ abstract class AudioDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setRecordingDeviceVolume(int volume); - /// @nodoc + /// Retrieves the volume of the audio recording device. + /// + /// This method applies to Windows only. + /// + /// Returns + /// The volume of the audio recording device. The value range is [0,255]. Future getRecordingDeviceVolume(); /// Sets the loopback device. @@ -127,7 +139,6 @@ abstract class AudioDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLoopbackDevice(String deviceId); /// Gets the current loopback device. @@ -144,7 +155,6 @@ abstract class AudioDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setPlaybackDeviceMute(bool mute); /// Retrieves whether the audio playback device is muted. @@ -161,9 +171,7 @@ abstract class AudioDeviceManager { /// Starts the audio playback device test. /// - /// This method tests whether the audio playback device works properly. Once a user starts the test, the SDK plays an audio file specified by the user. If the user can hear the audio, the playback device works properly. After calling this method, the SDK triggers the onAudioVolumeIndication callback every 100 ms, reporting uid = 1 and the volume information of the playback device. - /// Ensure that you call this method before joining a channel. - /// This method is for Windows and macOS only. + /// This method tests whether the audio device for local playback works properly. Once a user starts the test, the SDK plays an audio file specified by the user. If the user can hear the audio, the playback device works properly. After calling this method, the SDK triggers the onAudioVolumeIndication callback every 100 ms, reporting uid = 1 and the volume information of the playback device. The difference between this method and the startEchoTest method is that the former checks if the local audio playback device is working properly, while the latter can check the audio and video devices and network conditions. Ensure that you call this method before joining a channel. After the test is completed, call stopPlaybackDeviceTest to stop the test before joining a channel. /// /// * [testAudioFilePath] The path of the audio file. The data format is string in UTF-8. /// Supported file formats: wav, mp3, m4a, and aac. @@ -171,42 +179,34 @@ abstract class AudioDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future startPlaybackDeviceTest(String testAudioFilePath); /// Stops the audio playback device test. /// - /// This method stops the audio playback device test. You must call this method to stop the test after calling the startPlaybackDeviceTest method. - /// This method is for Windows and macOS only. - /// Ensure that you call this method before joining a channel. + /// This method stops the audio playback device test. You must call this method to stop the test after calling the startPlaybackDeviceTest method. Ensure that you call this method before joining a channel. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopPlaybackDeviceTest(); - /// Starts the audio capture device test. + /// Starts the audio capturing device test. /// - /// This method tests whether the audio capture device works properly. After calling this method, the SDK triggers the onAudioVolumeIndication callback at the time interval set in this method, which reports uid = 0 and the volume information of the capturing device. - /// This method is for Windows and macOS only. - /// Ensure that you call this method before joining a channel. + /// This method tests whether the audio capturing device works properly. After calling this method, the SDK triggers the onAudioVolumeIndication callback at the time interval set in this method, which reports uid = 0 and the volume information of the capturing device. The difference between this method and the startEchoTest method is that the former checks if the local audio capturing device is working properly, while the latter can check the audio and video devices and network conditions. Ensure that you call this method before joining a channel. After the test is completed, call stopRecordingDeviceTest to stop the test before joining a channel. /// - /// * [indicationInterval] The time interval (ms) at which the SDK triggers the onAudioVolumeIndication callback. Agora recommends setting a value greater than 200 ms. This value must not be less than 10 ms; otherwise, you can not receive the onAudioVolumeIndication callback. + /// * [indicationInterval] The interval (ms) for triggering the onAudioVolumeIndication callback. This value should be set to greater than 10, otherwise, you will not receive the onAudioVolumeIndication callback and the SDK returns the error code -2. Agora recommends that you set this value to 100. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. /// < 0: Failure. + /// -2: Invalid parameters. Check your parameter settings. Future startRecordingDeviceTest(int indicationInterval); - /// Stops the audio capture device test. + /// Stops the audio capturing device test. /// - /// This method stops the audio capture device test. You must call this method to stop the test after calling the startRecordingDeviceTest method. - /// This method is for Windows and macOS only. - /// Ensure that you call this method before joining a channel. + /// This method stops the audio capturing device test. You must call this method to stop the test after calling the startRecordingDeviceTest method. Ensure that you call this method before joining a channel. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopRecordingDeviceTest(); /// Starts an audio device loopback test. @@ -222,7 +222,6 @@ abstract class AudioDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future startAudioDeviceLoopbackTest(int indicationInterval); /// Stops the audio device loopback test. @@ -234,7 +233,6 @@ abstract class AudioDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopAudioDeviceLoopbackTest(); /// Sets the audio playback device used by the SDK to follow the system default audio playback device. @@ -245,7 +243,6 @@ abstract class AudioDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future followSystemPlaybackDevice(bool enable); /// Sets the audio recording device used by the SDK to follow the system default audio recording device. @@ -256,7 +253,6 @@ abstract class AudioDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future followSystemRecordingDevice(bool enable); /// Sets whether the loopback device follows the system default playback device. @@ -267,7 +263,6 @@ abstract class AudioDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future followSystemLoopbackDevice(bool enable); /// Releases all the resources occupied by the AudioDeviceManager object. diff --git a/lib/src/binding/agora_base_event_impl.dart b/lib/src/binding/agora_base_event_impl.dart index 4aea517d9..d39cdadcd 100644 --- a/lib/src/binding/agora_base_event_impl.dart +++ b/lib/src/binding/agora_base_event_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; diff --git a/lib/src/binding/agora_media_base_event_impl.dart b/lib/src/binding/agora_media_base_event_impl.dart index c947032c4..15159b5a9 100644 --- a/lib/src/binding/agora_media_base_event_impl.dart +++ b/lib/src/binding/agora_media_base_event_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; diff --git a/lib/src/binding/agora_media_engine_impl.dart b/lib/src/binding/agora_media_engine_impl.dart index 8033bb7c1..ced5f0b9b 100644 --- a/lib/src/binding/agora_media_engine_impl.dart +++ b/lib/src/binding/agora_media_engine_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable, annotate_overrides +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import, annotate_overrides import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; diff --git a/lib/src/binding/agora_media_player_event_impl.dart b/lib/src/binding/agora_media_player_event_impl.dart index f9cbc0647..fca282d20 100644 --- a/lib/src/binding/agora_media_player_event_impl.dart +++ b/lib/src/binding/agora_media_player_event_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; diff --git a/lib/src/binding/agora_media_player_impl.dart b/lib/src/binding/agora_media_player_impl.dart index af34cc1ae..8aca707c1 100644 --- a/lib/src/binding/agora_media_player_impl.dart +++ b/lib/src/binding/agora_media_player_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable, annotate_overrides +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import, annotate_overrides import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; @@ -25,7 +25,7 @@ class MediaPlayerImpl implements MediaPlayer { @override int getMediaPlayerId() { // Implementation template -// final apiType = '${isOverrideClassName ? className : 'MediaPlayer'}_getMediaPlayerId'; +// final apiType = '${isOverrideClassName ? className : 'MediaPlayer'}_() const'; // final param = createParams({// // }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { diff --git a/lib/src/binding/agora_media_player_source_event_impl.dart b/lib/src/binding/agora_media_player_source_event_impl.dart index 0c79ad9ef..b78ad9e16 100644 --- a/lib/src/binding/agora_media_player_source_event_impl.dart +++ b/lib/src/binding/agora_media_player_source_event_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; diff --git a/lib/src/binding/agora_media_recorder_impl.dart b/lib/src/binding/agora_media_recorder_impl.dart index b8c0b42b3..5727f6b7a 100644 --- a/lib/src/binding/agora_media_recorder_impl.dart +++ b/lib/src/binding/agora_media_recorder_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable, annotate_overrides +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import, annotate_overrides import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; diff --git a/lib/src/binding/agora_music_content_center_event_impl.dart b/lib/src/binding/agora_music_content_center_event_impl.dart index 0a34dc9cd..9517b9d1b 100644 --- a/lib/src/binding/agora_music_content_center_event_impl.dart +++ b/lib/src/binding/agora_music_content_center_event_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; diff --git a/lib/src/binding/agora_music_content_center_impl.dart b/lib/src/binding/agora_music_content_center_impl.dart index e515da71a..087d48308 100644 --- a/lib/src/binding/agora_music_content_center_impl.dart +++ b/lib/src/binding/agora_music_content_center_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable, annotate_overrides +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import, annotate_overrides import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; @@ -24,7 +24,8 @@ class MusicChartCollectionImpl implements MusicChartCollection { @override Future getCount() async { - final apiType = ''; + final apiType = + '${isOverrideClassName ? className : 'MusicChartCollection'}_getCount'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -38,7 +39,8 @@ class MusicChartCollectionImpl implements MusicChartCollection { @override Future get(int index) async { - final apiType = ''; + final apiType = + '${isOverrideClassName ? className : 'MusicChartCollection'}_get'; final param = createParams({'index': index}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -71,7 +73,7 @@ class MusicCollectionImpl implements MusicCollection { @override int getCount() { // Implementation template -// final apiType = ''; +// final apiType = '${isOverrideClassName ? className : 'MusicCollection'}_getCount'; // final param = createParams({// // }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -86,7 +88,7 @@ class MusicCollectionImpl implements MusicCollection { @override int getTotal() { // Implementation template -// final apiType = ''; +// final apiType = '${isOverrideClassName ? className : 'MusicCollection'}_getTotal'; // final param = createParams({// // }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -101,7 +103,7 @@ class MusicCollectionImpl implements MusicCollection { @override int getPage() { // Implementation template -// final apiType = ''; +// final apiType = '${isOverrideClassName ? className : 'MusicCollection'}_getPage'; // final param = createParams({// // }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -116,7 +118,7 @@ class MusicCollectionImpl implements MusicCollection { @override int getPageSize() { // Implementation template -// final apiType = ''; +// final apiType = '${isOverrideClassName ? className : 'MusicCollection'}_getPageSize'; // final param = createParams({// // }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -131,7 +133,7 @@ class MusicCollectionImpl implements MusicCollection { @override Music getMusic(int index) { // Implementation template -// final apiType = ''; +// final apiType = '${isOverrideClassName ? className : 'MusicCollection'}_getMusic'; // final param = createParams({// 'index':index// }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -329,7 +331,7 @@ class MusicContentCenterImpl implements MusicContentCenter { 'musicChartId': musicChartId, 'page': page, 'pageSize': pageSize, - 'jsonOption': jsonOption + if (jsonOption != null) 'jsonOption': jsonOption }); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -358,7 +360,7 @@ class MusicContentCenterImpl implements MusicContentCenter { 'keyWord': keyWord, 'page': page, 'pageSize': pageSize, - 'jsonOption': jsonOption + if (jsonOption != null) 'jsonOption': jsonOption }); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); diff --git a/lib/src/binding/agora_rtc_engine_event_impl.dart b/lib/src/binding/agora_rtc_engine_event_impl.dart index 35670535c..8812a97f3 100644 --- a/lib/src/binding/agora_rtc_engine_event_impl.dart +++ b/lib/src/binding/agora_rtc_engine_event_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; @@ -1853,6 +1853,29 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { rtcEngineEventHandler.onTranscodedStreamLayoutInfo!( connection, uid, width, height, layoutCount, layoutlist); return true; + + case 'onAudioMetadataReceivedEx': + if (rtcEngineEventHandler.onAudioMetadataReceived == null) { + return true; + } + final jsonMap = jsonDecode(eventData); + RtcEngineEventHandlerOnAudioMetadataReceivedJson paramJson = + RtcEngineEventHandlerOnAudioMetadataReceivedJson.fromJson(jsonMap); + paramJson = paramJson.fillBuffers(buffers); + RtcConnection? connection = paramJson.connection; + int? uid = paramJson.uid; + Uint8List? metadata = paramJson.metadata; + int? length = paramJson.length; + if (connection == null || + uid == null || + metadata == null || + length == null) { + return true; + } + connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onAudioMetadataReceived!( + connection, uid, metadata, length); + return true; } return false; } diff --git a/lib/src/binding/agora_rtc_engine_ex_impl.dart b/lib/src/binding/agora_rtc_engine_ex_impl.dart index 1c8eb0618..7a610fd5a 100644 --- a/lib/src/binding/agora_rtc_engine_ex_impl.dart +++ b/lib/src/binding/agora_rtc_engine_ex_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable, annotate_overrides +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import, annotate_overrides import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; @@ -519,7 +519,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { final param = createParams({ 'connection': connection.toJson(), 'enabled': enabled, - 'deviceName': deviceName + if (deviceName != null) 'deviceName': deviceName }); final List buffers = []; buffers.addAll(connection.collectBufferList()); @@ -1216,4 +1216,49 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { throw AgoraRtcException(code: result); } } + + @override + Future sendAudioMetadataEx( + {required RtcConnection connection, + required Uint8List metadata, + required int length}) async { + final apiType = + '${isOverrideClassName ? className : 'RtcEngineEx'}_sendAudioMetadataEx'; + final param = + createParams({'connection': connection.toJson(), 'length': length}); + final List buffers = []; + buffers.addAll(connection.collectBufferList()); + buffers.add(metadata); + final callApiResult = await irisMethodChannel.invokeMethod( + IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); + if (callApiResult.irisReturnCode < 0) { + throw AgoraRtcException(code: callApiResult.irisReturnCode); + } + final rm = callApiResult.data; + final result = rm['result']; + if (result < 0) { + throw AgoraRtcException(code: result); + } + } + + @override + Future getCallIdEx(RtcConnection connection) async { + final apiType = + '${isOverrideClassName ? className : 'RtcEngineEx'}_getCallIdEx'; + final param = createParams({'connection': connection.toJson()}); + final List buffers = []; + buffers.addAll(connection.collectBufferList()); + final callApiResult = await irisMethodChannel.invokeMethod( + IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); + if (callApiResult.irisReturnCode < 0) { + throw AgoraRtcException(code: callApiResult.irisReturnCode); + } + final rm = callApiResult.data; + final result = rm['result']; + if (result < 0) { + throw AgoraRtcException(code: result); + } + final getCallIdExJson = RtcEngineExGetCallIdExJson.fromJson(rm); + return getCallIdExJson.callId; + } } diff --git a/lib/src/binding/agora_rtc_engine_impl.dart b/lib/src/binding/agora_rtc_engine_impl.dart index 8b982bc6e..135629e64 100644 --- a/lib/src/binding/agora_rtc_engine_impl.dart +++ b/lib/src/binding/agora_rtc_engine_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable, annotate_overrides +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import, annotate_overrides import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; @@ -2697,7 +2697,8 @@ class RtcEngineImpl implements RtcEngine { {required bool enabled, String? deviceName}) async { final apiType = '${isOverrideClassName ? className : 'RtcEngine'}_enableLoopbackRecording'; - final param = createParams({'enabled': enabled, 'deviceName': deviceName}); + final param = createParams( + {'enabled': enabled, if (deviceName != null) 'deviceName': deviceName}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { @@ -4962,6 +4963,26 @@ class RtcEngineImpl implements RtcEngine { return result as bool; } + @override + Future sendAudioMetadata( + {required Uint8List metadata, required int length}) async { + final apiType = + '${isOverrideClassName ? className : 'RtcEngine'}_sendAudioMetadata'; + final param = createParams({'length': length}); + final List buffers = []; + buffers.add(metadata); + final callApiResult = await irisMethodChannel.invokeMethod( + IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); + if (callApiResult.irisReturnCode < 0) { + throw AgoraRtcException(code: callApiResult.irisReturnCode); + } + final rm = callApiResult.data; + final result = rm['result']; + if (result < 0) { + throw AgoraRtcException(code: result); + } + } + @override AudioDeviceManager getAudioDeviceManager() { // Implementation template diff --git a/lib/src/binding/agora_spatial_audio_impl.dart b/lib/src/binding/agora_spatial_audio_impl.dart index 6905a64df..4697ee3ea 100644 --- a/lib/src/binding/agora_spatial_audio_impl.dart +++ b/lib/src/binding/agora_spatial_audio_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable, annotate_overrides +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import, annotate_overrides import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; diff --git a/lib/src/binding/audio_device_manager_impl.dart b/lib/src/binding/audio_device_manager_impl.dart index d59978c29..d56bec591 100644 --- a/lib/src/binding/audio_device_manager_impl.dart +++ b/lib/src/binding/audio_device_manager_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable, annotate_overrides +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import, annotate_overrides import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; diff --git a/lib/src/binding/call_api_event_handler_buffer_ext.dart b/lib/src/binding/call_api_event_handler_buffer_ext.dart index 0693e1f8c..8c8777229 100644 --- a/lib/src/binding/call_api_event_handler_buffer_ext.dart +++ b/lib/src/binding/call_api_event_handler_buffer_ext.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable, prefer_is_empty +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import, prefer_is_empty import 'package:agora_rtc_engine/src/binding_forward_export.dart'; extension VideoDimensionsBufferExt on VideoDimensions { @@ -824,7 +824,8 @@ extension ExternalVideoFrameBufferExt on ExternalVideoFrame { matrix: matrix, metadataBuffer: metadataBuffer, metadataSize: metadataSize, - alphaBuffer: alphaBuffer); + alphaBuffer: alphaBuffer, + fillAlphaBuffer: fillAlphaBuffer); } List collectBufferList() { diff --git a/lib/src/binding/call_api_impl_params_json.dart b/lib/src/binding/call_api_impl_params_json.dart index 1bd0788ea..e83062acb 100644 --- a/lib/src/binding/call_api_impl_params_json.dart +++ b/lib/src/binding/call_api_impl_params_json.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import import 'package:agora_rtc_engine/src/binding_forward_export.dart'; part 'call_api_impl_params_json.g.dart'; @@ -355,6 +355,17 @@ class RtcEngineExGetUserInfoByUidExJson { _$RtcEngineExGetUserInfoByUidExJsonToJson(this); } +@JsonSerializable(explicitToJson: true) +class RtcEngineExGetCallIdExJson { + const RtcEngineExGetCallIdExJson(this.callId); + + @JsonKey(name: 'callId') + final String callId; + factory RtcEngineExGetCallIdExJson.fromJson(Map json) => + _$RtcEngineExGetCallIdExJsonFromJson(json); + Map toJson() => _$RtcEngineExGetCallIdExJsonToJson(this); +} + @JsonSerializable(explicitToJson: true) class AudioDeviceManagerGetPlaybackDeviceJson { const AudioDeviceManagerGetPlaybackDeviceJson(this.deviceId); diff --git a/lib/src/binding/call_api_impl_params_json.g.dart b/lib/src/binding/call_api_impl_params_json.g.dart index b32cf52a5..f4f5da458 100644 --- a/lib/src/binding/call_api_impl_params_json.g.dart +++ b/lib/src/binding/call_api_impl_params_json.g.dart @@ -368,6 +368,18 @@ Map _$RtcEngineExGetUserInfoByUidExJsonToJson( 'userInfo': instance.userInfo.toJson(), }; +RtcEngineExGetCallIdExJson _$RtcEngineExGetCallIdExJsonFromJson( + Map json) => + RtcEngineExGetCallIdExJson( + json['callId'] as String, + ); + +Map _$RtcEngineExGetCallIdExJsonToJson( + RtcEngineExGetCallIdExJson instance) => + { + 'callId': instance.callId, + }; + AudioDeviceManagerGetPlaybackDeviceJson _$AudioDeviceManagerGetPlaybackDeviceJsonFromJson( Map json) => diff --git a/lib/src/binding/event_handler_param_json.dart b/lib/src/binding/event_handler_param_json.dart index 099cbcc0b..b651db037 100644 --- a/lib/src/binding/event_handler_param_json.dart +++ b/lib/src/binding/event_handler_param_json.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable, prefer_is_empty +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import, prefer_is_empty import 'package:agora_rtc_engine/src/binding_forward_export.dart'; part 'event_handler_param_json.g.dart'; @@ -4250,6 +4250,48 @@ extension RtcEngineEventHandlerOnTranscodedStreamLayoutInfoJsonBufferExt } } +@JsonSerializable(explicitToJson: true) +class RtcEngineEventHandlerOnAudioMetadataReceivedJson { + const RtcEngineEventHandlerOnAudioMetadataReceivedJson( + {this.connection, this.uid, this.metadata, this.length}); + + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'uid') + final int? uid; + @JsonKey(name: 'metadata', ignore: true) + final Uint8List? metadata; + @JsonKey(name: 'length') + final int? length; + factory RtcEngineEventHandlerOnAudioMetadataReceivedJson.fromJson( + Map json) => + _$RtcEngineEventHandlerOnAudioMetadataReceivedJsonFromJson(json); + Map toJson() => + _$RtcEngineEventHandlerOnAudioMetadataReceivedJsonToJson(this); +} + +extension RtcEngineEventHandlerOnAudioMetadataReceivedJsonBufferExt + on RtcEngineEventHandlerOnAudioMetadataReceivedJson { + RtcEngineEventHandlerOnAudioMetadataReceivedJson fillBuffers( + List bufferList) { + if (bufferList.isEmpty) return this; + Uint8List? metadata; + if (bufferList.length > 0) { + metadata = bufferList[0]; + } + return RtcEngineEventHandlerOnAudioMetadataReceivedJson( + connection: connection, uid: uid, metadata: metadata, length: length); + } + + List collectBufferList() { + final bufferList = []; + if (metadata != null) { + bufferList.add(metadata!); + } + return bufferList; + } +} + @JsonSerializable(explicitToJson: true) class MetadataObserverOnMetadataReceivedJson { const MetadataObserverOnMetadataReceivedJson({this.metadata}); diff --git a/lib/src/binding/event_handler_param_json.g.dart b/lib/src/binding/event_handler_param_json.g.dart index f1abcf15b..6a895881d 100644 --- a/lib/src/binding/event_handler_param_json.g.dart +++ b/lib/src/binding/event_handler_param_json.g.dart @@ -3060,6 +3060,26 @@ Map 'layoutlist': instance.layoutlist?.map((e) => e.toJson()).toList(), }; +RtcEngineEventHandlerOnAudioMetadataReceivedJson + _$RtcEngineEventHandlerOnAudioMetadataReceivedJsonFromJson( + Map json) => + RtcEngineEventHandlerOnAudioMetadataReceivedJson( + connection: json['connection'] == null + ? null + : RtcConnection.fromJson( + json['connection'] as Map), + uid: json['uid'] as int?, + length: json['length'] as int?, + ); + +Map _$RtcEngineEventHandlerOnAudioMetadataReceivedJsonToJson( + RtcEngineEventHandlerOnAudioMetadataReceivedJson instance) => + { + 'connection': instance.connection?.toJson(), + 'uid': instance.uid, + 'length': instance.length, + }; + MetadataObserverOnMetadataReceivedJson _$MetadataObserverOnMetadataReceivedJsonFromJson( Map json) => diff --git a/macos/agora_rtc_engine.podspec b/macos/agora_rtc_engine.podspec index 13a957878..e037924c4 100644 --- a/macos/agora_rtc_engine.podspec +++ b/macos/agora_rtc_engine.podspec @@ -16,8 +16,8 @@ A new flutter plugin project. s.source_files = 'Classes/**/*.{h,mm}', 'Classes/File.swift' s.dependency 'FlutterMacOS' # s.dependency 'AgoraRtcWrapper' - s.dependency 'AgoraRtcEngine_macOS', '4.1.0' - s.dependency 'AgoraIrisRTC_macOS', '4.1.1.21-banban.6' + s.dependency 'AgoraRtcEngine_Special_macOS', '4.1.1.25' + s.dependency 'AgoraIrisRTC_macOS', '4.1.1.25-sp.1' s.platform = :osx, '10.11' s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } diff --git a/pubspec.yaml b/pubspec.yaml index d406805e0..87a50adda 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: agora_rtc_engine description: >- Flutter plugin of Agora RTC SDK, allow you to simply integrate Agora Video Calling or Live Video Streaming to your app with just a few lines of code. -version: 6.1.1-sp.41121.b.3 +version: 6.1.1-sp.41125 homepage: https://www.agora.io repository: https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/tree/main environment: diff --git a/scripts/artifacts_version.sh b/scripts/artifacts_version.sh index 50c8222c4..89374b7d2 100644 --- a/scripts/artifacts_version.sh +++ b/scripts/artifacts_version.sh @@ -1,6 +1,6 @@ set -e -export IRIS_CDN_URL_ANDROID="https://download.agora.io/sdk/release/iris_4.1.1.21-banban.6_DCG_Android_Video_20231201_1205.zip" -export IRIS_CDN_URL_IOS="https://download.agora.io/sdk/release/iris_4.1.1.21-banban.6_DCG_iOS_Video_20231201_1205.zip" -export IRIS_CDN_URL_MACOS="https://download.agora.io/sdk/release/iris_4.1.1.21-banban.6_DCG_Mac_Video_20231201_1205.zip" -export IRIS_CDN_URL_WINDOWS="https://download.agora.io/sdk/release/iris_4.1.1.21-banban.6_DCG_Windows_Video_20231201_1205.zip" +export IRIS_CDN_URL_ANDROID="https://download.agora.io/sdk/release/iris_4.1.1.25-sp.1_DCG_Android_Video_20240118_1208.zip" +export IRIS_CDN_URL_IOS="https://download.agora.io/sdk/release/iris_4.1.1.25-sp.1_DCG_iOS_Video_20240118_1210.zip" +export IRIS_CDN_URL_MACOS="https://download.agora.io/sdk/release/iris_4.1.1.25-sp.1_DCG_Mac_Video_20240118_1208.zip" +export IRIS_CDN_URL_WINDOWS="https://download.agora.io/sdk/release/iris_4.1.1.25-sp.1_DCG_Windows_Video_20240118_1208.zip" diff --git a/test_shard/fake_test_app/integration_test/generated/mediaengine_fake_test.generated.dart b/test_shard/fake_test_app/integration_test/generated/mediaengine_fake_test.generated.dart index b2f024d2c..d4c7717f2 100644 --- a/test_shard/fake_test_app/integration_test/generated/mediaengine_fake_test.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/mediaengine_fake_test.generated.dart @@ -671,6 +671,7 @@ void mediaEngineSmokeTestCases() { Uint8List frameMetadataBuffer = Uint8List.fromList([1, 2, 3, 4, 5]); const int frameMetadataSize = 10; Uint8List frameAlphaBuffer = Uint8List.fromList([1, 2, 3, 4, 5]); + const bool frameFillAlphaBuffer = true; final ExternalVideoFrame frame = ExternalVideoFrame( type: frameType, format: frameFormat, @@ -689,6 +690,7 @@ void mediaEngineSmokeTestCases() { metadataBuffer: frameMetadataBuffer, metadataSize: frameMetadataSize, alphaBuffer: frameAlphaBuffer, + fillAlphaBuffer: frameFillAlphaBuffer, ); const int videoTrackId = 10; await mediaEngine.pushVideoFrame( diff --git a/test_shard/fake_test_app/integration_test/generated/rtcengine_fake_test.generated.dart b/test_shard/fake_test_app/integration_test/generated/rtcengine_fake_test.generated.dart index 3726dd52e..bdfb2acc9 100644 --- a/test_shard/fake_test_app/integration_test/generated/rtcengine_fake_test.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/rtcengine_fake_test.generated.dart @@ -8543,6 +8543,7 @@ void rtcEngineSmokeTestCases() { RtmpStreamPublishErrorType errCode) {}, onRtmpStreamingEvent: (String url, RtmpStreamingEvent eventCode) {}, onTranscodingUpdated: () {}, + onAudioRoutingChanged: (int routing) {}, onChannelMediaRelayStateChanged: (ChannelMediaRelayState state, ChannelMediaRelayError code) {}, onChannelMediaRelayEvent: (ChannelMediaRelayEvent code) {}, @@ -8602,6 +8603,8 @@ void rtcEngineSmokeTestCases() { (TranscodingVideoStream stream, VideoTranscoderError error) {}, onTranscodedStreamLayoutInfo: (RtcConnection connection, int uid, int width, int height, int layoutCount, List layoutlist) {}, + onAudioMetadataReceived: (RtcConnection connection, int uid, + Uint8List metadata, int length) {}, ); rtcEngine.registerEventHandler( eventHandler, @@ -8761,6 +8764,7 @@ void rtcEngineSmokeTestCases() { RtmpStreamPublishErrorType errCode) {}, onRtmpStreamingEvent: (String url, RtmpStreamingEvent eventCode) {}, onTranscodingUpdated: () {}, + onAudioRoutingChanged: (int routing) {}, onChannelMediaRelayStateChanged: (ChannelMediaRelayState state, ChannelMediaRelayError code) {}, onChannelMediaRelayEvent: (ChannelMediaRelayEvent code) {}, @@ -8820,6 +8824,8 @@ void rtcEngineSmokeTestCases() { (TranscodingVideoStream stream, VideoTranscoderError error) {}, onTranscodedStreamLayoutInfo: (RtcConnection connection, int uid, int width, int height, int layoutCount, List layoutlist) {}, + onAudioMetadataReceived: (RtcConnection connection, int uid, + Uint8List metadata, int length) {}, ); rtcEngine.unregisterEventHandler( eventHandler, @@ -10923,6 +10929,45 @@ void rtcEngineSmokeTestCases() { }, ); + testWidgets( + 'sendAudioMetadata', + (WidgetTester tester) async { + final irisTester = IrisTester(); + final debugApiEngineIntPtr = irisTester.createDebugApiEngine(); + setMockIrisMethodChannelNativeHandle(debugApiEngineIntPtr); + + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + + try { + Uint8List metadata = Uint8List.fromList([1, 2, 3, 4, 5]); + const int length = 10; + await rtcEngine.sendAudioMetadata( + metadata: metadata, + length: length, + ); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint('[sendAudioMetadata] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await rtcEngine.release(); + }, + ); + testWidgets( 'getAudioDeviceManager', (WidgetTester tester) async { @@ -11059,6 +11104,40 @@ void rtcEngineSmokeTestCases() { }, ); + testWidgets( + 'getMediaRecorder', + (WidgetTester tester) async { + final irisTester = IrisTester(); + final debugApiEngineIntPtr = irisTester.createDebugApiEngine(); + setMockIrisMethodChannelNativeHandle(debugApiEngineIntPtr); + + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + + try { + rtcEngine.getMediaRecorder(); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint('[getMediaRecorder] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await rtcEngine.release(); + }, + ); + testWidgets( 'getLocalSpatialAudioEngine', (WidgetTester tester) async { diff --git a/test_shard/fake_test_app/integration_test/generated/rtcengine_rtcengineeventhandler_testcases.generated.dart b/test_shard/fake_test_app/integration_test/generated/rtcengine_rtcengineeventhandler_testcases.generated.dart index be84d7154..98353865f 100644 --- a/test_shard/fake_test_app/integration_test/generated/rtcengine_rtcengineeventhandler_testcases.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/rtcengine_rtcengineeventhandler_testcases.generated.dart @@ -4594,6 +4594,62 @@ void generatedTestCases() { timeout: const Timeout(Duration(minutes: 1)), ); + testWidgets( + 'onAudioRoutingChanged', + (WidgetTester tester) async { + final irisTester = IrisTester(); + final debugApiEngineIntPtr = irisTester.getDebugApiEngineNativeHandle(); + setMockIrisMethodChannelNativeHandle(debugApiEngineIntPtr); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: 'app_id', + areaCode: AreaCode.areaCodeGlob.value(), + )); + + final onAudioRoutingChangedCompleter = Completer(); + final theRtcEngineEventHandler = RtcEngineEventHandler( + onAudioRoutingChanged: (int routing) { + onAudioRoutingChangedCompleter.complete(true); + }, + ); + + rtcEngine.registerEventHandler( + theRtcEngineEventHandler, + ); + +// Delay 500 milliseconds to ensure the registerEventHandler call completed. + await Future.delayed(const Duration(milliseconds: 500)); + + { + const int routing = 10; + + final eventJson = { + 'routing': routing, + }; + + irisTester.fireEvent('RtcEngineEventHandler_onAudioRoutingChanged', + params: eventJson); + irisTester.fireEvent('RtcEngineEventHandlerEx_onAudioRoutingChanged', + params: eventJson); + } + + final eventCalled = await onAudioRoutingChangedCompleter.future; + expect(eventCalled, isTrue); + + { + rtcEngine.unregisterEventHandler( + theRtcEngineEventHandler, + ); + } +// Delay 500 milliseconds to ensure the unregisterEventHandler call completed. + await Future.delayed(const Duration(milliseconds: 500)); + + await rtcEngine.release(); + }, + timeout: const Timeout(Duration(minutes: 1)), + ); + testWidgets( 'onChannelMediaRelayStateChanged', (WidgetTester tester) async { @@ -6398,5 +6454,73 @@ void generatedTestCases() { }, timeout: const Timeout(Duration(minutes: 1)), ); + + testWidgets( + 'onAudioMetadataReceived', + (WidgetTester tester) async { + final irisTester = IrisTester(); + final debugApiEngineIntPtr = irisTester.getDebugApiEngineNativeHandle(); + setMockIrisMethodChannelNativeHandle(debugApiEngineIntPtr); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: 'app_id', + areaCode: AreaCode.areaCodeGlob.value(), + )); + + final onAudioMetadataReceivedCompleter = Completer(); + final theRtcEngineEventHandler = RtcEngineEventHandler( + onAudioMetadataReceived: (RtcConnection connection, int uid, + Uint8List metadata, int length) { + onAudioMetadataReceivedCompleter.complete(true); + }, + ); + + rtcEngine.registerEventHandler( + theRtcEngineEventHandler, + ); + +// Delay 500 milliseconds to ensure the registerEventHandler call completed. + await Future.delayed(const Duration(milliseconds: 500)); + + { + const String connectionChannelId = "hello"; + const int connectionLocalUid = 10; + const RtcConnection connection = RtcConnection( + channelId: connectionChannelId, + localUid: connectionLocalUid, + ); + const int uid = 10; + Uint8List metadata = Uint8List.fromList([1, 2, 3, 4, 5]); + const int length = 10; + + final eventJson = { + 'connection': connection.toJson(), + 'uid': uid, + 'metadata': metadata.toList(), + 'length': length, + }; + + irisTester.fireEvent('RtcEngineEventHandler_onAudioMetadataReceived', + params: eventJson); + irisTester.fireEvent('RtcEngineEventHandlerEx_onAudioMetadataReceived', + params: eventJson); + } + + final eventCalled = await onAudioMetadataReceivedCompleter.future; + expect(eventCalled, isTrue); + + { + rtcEngine.unregisterEventHandler( + theRtcEngineEventHandler, + ); + } +// Delay 500 milliseconds to ensure the unregisterEventHandler call completed. + await Future.delayed(const Duration(milliseconds: 500)); + + await rtcEngine.release(); + }, + timeout: const Timeout(Duration(minutes: 1)), + ); } diff --git a/test_shard/fake_test_app/integration_test/generated/rtcengineex_fake_test.generated.dart b/test_shard/fake_test_app/integration_test/generated/rtcengineex_fake_test.generated.dart index 0ee317bc7..f357c58fc 100644 --- a/test_shard/fake_test_app/integration_test/generated/rtcengineex_fake_test.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/rtcengineex_fake_test.generated.dart @@ -2417,5 +2417,95 @@ void rtcEngineExSmokeTestCases() { }, // skip: !(), ); + + testWidgets( + 'sendAudioMetadataEx', + (WidgetTester tester) async { + final irisTester = IrisTester(); + final debugApiEngineIntPtr = irisTester.createDebugApiEngine(); + setMockIrisMethodChannelNativeHandle(debugApiEngineIntPtr); + + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngineEx rtcEngineEx = createAgoraRtcEngineEx(); + await rtcEngineEx.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + + try { + const String connectionChannelId = "hello"; + const int connectionLocalUid = 10; + const RtcConnection connection = RtcConnection( + channelId: connectionChannelId, + localUid: connectionLocalUid, + ); + Uint8List metadata = Uint8List.fromList([1, 2, 3, 4, 5]); + const int length = 10; + await rtcEngineEx.sendAudioMetadataEx( + connection: connection, + metadata: metadata, + length: length, + ); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint('[sendAudioMetadataEx] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await rtcEngineEx.release(); + }, +// skip: !(), + ); + + testWidgets( + 'getCallIdEx', + (WidgetTester tester) async { + final irisTester = IrisTester(); + final debugApiEngineIntPtr = irisTester.createDebugApiEngine(); + setMockIrisMethodChannelNativeHandle(debugApiEngineIntPtr); + + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngineEx rtcEngineEx = createAgoraRtcEngineEx(); + await rtcEngineEx.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + + try { + const String connectionChannelId = "hello"; + const int connectionLocalUid = 10; + const RtcConnection connection = RtcConnection( + channelId: connectionChannelId, + localUid: connectionLocalUid, + ); + await rtcEngineEx.getCallIdEx( + connection, + ); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint('[getCallIdEx] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await rtcEngineEx.release(); + }, +// skip: !(), + ); } diff --git a/tool/terra/terra_config_main.yaml b/tool/terra/terra_config_main.yaml index 8519fd898..916310a0b 100644 --- a/tool/terra/terra_config_main.yaml +++ b/tool/terra/terra_config_main.yaml @@ -3,27 +3,27 @@ parsers: package: '@agoraio-extensions/terra-legacy-cxx-parser' args: language: dart - nativeSdkVersion: 4.1.1.21 + nativeSdkVersion: 4.1.1.25 includeHeaderDirs: - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.21/include' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.25/include' parseFiles: include: - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.21/include/*.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.25/include/*.h' exclude: - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.21/include/AgoraRefPtr.h' - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.21/include/time_utils.h' - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.21/include/AgoraOptional.h' - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.21/include/AgoraRefPtr.h' - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.21/include/IAgoraH265Transcoder.h' - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.21/include/IAgoraMediaComponentFactory.h' - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.21/include/IAgoraParameter.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.25/include/AgoraRefPtr.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.25/include/time_utils.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.25/include/AgoraOptional.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.25/include/AgoraRefPtr.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.25/include/IAgoraH265Transcoder.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.25/include/IAgoraMediaComponentFactory.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.25/include/IAgoraParameter.h' customHeaders: - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.21/custom_headers/*.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.25/custom_headers/*.h' legacyRenders: - DartSyntaxRender - DartEventHandlerParamJsonRender - DartCallApiIrisMethodChannelRender - - DartEventHandlerIrisMethodChannelRender + - DartEventHandlerIrisMethodChannelBefore430Render - DartStructToJsonSerializableRender - DartCallApiEventHandlerBufferExtRender - DartForwardExportRender diff --git a/tool/terra/yarn.lock b/tool/terra/yarn.lock index 06a854563..7454dd3c6 100644 --- a/tool/terra/yarn.lock +++ b/tool/terra/yarn.lock @@ -7,26 +7,26 @@ __metadata: "@agoraio-extensions/cxx-parser@git@github.com:AgoraIO-Extensions/terra.git#head=main&workspace=cxx-parser": version: 0.1.9 - resolution: "@agoraio-extensions/cxx-parser@git@github.com:AgoraIO-Extensions/terra.git#workspace=cxx-parser&commit=016edf9cd207de6fe9ac9df8defe4ad570ac2214" + resolution: "@agoraio-extensions/cxx-parser@git@github.com:AgoraIO-Extensions/terra.git#workspace=cxx-parser&commit=e86dee96d3da161ea66f96161e9f2fb99f144bc2" dependencies: glob: "npm:^10.3.4" yaml: "npm:^2.1.3" peerDependencies: "@agoraio-extensions/terra-core": "*" - checksum: 61ce4c76eabb98aa7841afa0b0ed2a16d1132a1a9bf9037ce2f52e7a2ab8ad0b1789cafee3e3255b6f4125a182fe65619069a4edaf84777cc02be7803754ae63 + checksum: c922cdb60293fd647a3a2ff7cd4da09c47045fab80bfacf587379778eb8a68bda8d0e8734bfdfeb3568702483c1569d7dac16d4eaa7d62cf9575f39a7ffb2d45 languageName: node linkType: hard "@agoraio-extensions/terra-core@git@github.com:AgoraIO-Extensions/terra.git#head=main&workspace=terra-core": version: 0.1.5 - resolution: "@agoraio-extensions/terra-core@git@github.com:AgoraIO-Extensions/terra.git#workspace=terra-core&commit=016edf9cd207de6fe9ac9df8defe4ad570ac2214" - checksum: 673c3b6246e097d180d40a899fdce23fdad80aa92f2b593173baba2aecc5d103a2d74ac346486c6a2349a1016ade82d48dd618c0860e6a29c680f471d1aea06a + resolution: "@agoraio-extensions/terra-core@git@github.com:AgoraIO-Extensions/terra.git#workspace=terra-core&commit=e86dee96d3da161ea66f96161e9f2fb99f144bc2" + checksum: d7113225ab004b2ff09de3c3718262925dc335f5ffb8ac2800bb96bfb2ad67a307063a425bd14654356d804586a785efe3856462e1087472463eb233a6793e44 languageName: node linkType: hard "@agoraio-extensions/terra-legacy-cxx-parser@git@github.com:AgoraIO-Extensions/terra-legacy-cxx-parser.git#head=main": version: 0.1.5 - resolution: "@agoraio-extensions/terra-legacy-cxx-parser@git@github.com:AgoraIO-Extensions/terra-legacy-cxx-parser.git#commit=008f1b84aee777364b006684914917393c78356b" + resolution: "@agoraio-extensions/terra-legacy-cxx-parser@git@github.com:AgoraIO-Extensions/terra-legacy-cxx-parser.git#commit=609a370eabfcc9569ef9e72d4b9d290202fa513c" dependencies: "@agoraio-extensions/cxx-parser": "git@github.com:AgoraIO-Extensions/terra.git#head=main&workspace=cxx-parser" "@agoraio-extensions/terra-core": "git@github.com:AgoraIO-Extensions/terra.git#head=main&workspace=terra-core" @@ -38,13 +38,13 @@ __metadata: ts-node: "npm:^10.9.1" typescript: "npm:^5.1.6" yaml: "npm:^2.1.3" - checksum: c7af47edb4f36ed3b6fb1f20b04465c88ef1553fd7fb859c86f796a2dada3f9ddf1432115a1379a5a1d0e6e2609f6eb77cd823f83279a859c357b61d46d810c3 + checksum: 87b9a078cd2201f107c2f73232db820d47a150f2c7c44414ae2a45a08aa1fd9722fda050059fa22e2c4fa6a589936f9b84fba3c0b1d010aec94477de91fa7b93 languageName: node linkType: hard "@agoraio-extensions/terra@git@github.com:AgoraIO-Extensions/terra.git#head=main&workspace=terra": version: 0.1.5 - resolution: "@agoraio-extensions/terra@git@github.com:AgoraIO-Extensions/terra.git#workspace=terra&commit=016edf9cd207de6fe9ac9df8defe4ad570ac2214" + resolution: "@agoraio-extensions/terra@git@github.com:AgoraIO-Extensions/terra.git#workspace=terra&commit=e86dee96d3da161ea66f96161e9f2fb99f144bc2" dependencies: commander: "npm:^9.4.1" mustache: "npm:^4.2.0" @@ -53,18 +53,18 @@ __metadata: "@agoraio-extensions/terra-core": "*" bin: terra: ./bin/terra - checksum: f86bfecb341fec2016aa0f2b7f65f4fce8f0e5eeb481929cd7d99088e13bc2443ea24f8445982d56ea24cad253cfd83e81d0f98e5ffd5d3a757367905d1d2cf9 + checksum: d63492c162aea0e42a39b56287fd502be9bbb92e49fb3ee6b070a4deaff6bd2568d5f96afc12af85a0f337665af385198da80133bb59283fe5bc8d5b6ef733b7 languageName: node linkType: hard "@agoraio-extensions/terra_shared_configs@git@github.com:AgoraIO-Extensions/terra_shared_configs.git#head=main": version: 1.0.2 - resolution: "@agoraio-extensions/terra_shared_configs@git@github.com:AgoraIO-Extensions/terra_shared_configs.git#commit=e8b4bae6f85662cd3775050161d812ad4adba319" + resolution: "@agoraio-extensions/terra_shared_configs@git@github.com:AgoraIO-Extensions/terra_shared_configs.git#commit=234f2fb265ed99fff7fbfccc112fde176af85d1f" dependencies: "@agoraio-extensions/cxx-parser": "git@github.com:AgoraIO-Extensions/terra.git#head=main&workspace=cxx-parser" "@agoraio-extensions/terra-core": "git@github.com:AgoraIO-Extensions/terra.git#head=main&workspace=terra-core" mustache: "npm:^4.2.0" - checksum: e1dc38d612b3bc672ce27d9613b1129a42b59b4838a963355e5608f94b2927b9f00de472c1d65dcf040553788149ff1ebe1fa978e74f0a98488c0523b785d4e6 + checksum: 1487663d9e2595750c766df40179fdb8905d02f9f93ae9a53655e65d21a1d3d90fb64f95c0a4896bea18b9341decac3923fcdc9f42ac3fac00e7ebe5a9059a31 languageName: node linkType: hard diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt index 37975164f..fbf050d03 100644 --- a/windows/CMakeLists.txt +++ b/windows/CMakeLists.txt @@ -12,8 +12,8 @@ project(${PROJECT_NAME} LANGUAGES CXX) # not be changed set(PLUGIN_NAME "agora_rtc_engine_plugin") -set(IRIS_SDK_DOWNLOAD_URL "https://download.agora.io/sdk/release/iris_4.1.1.21-banban.6_DCG_Windows_Video_20231201_1205.zip") -set(IRIS_SDK_DOWNLOAD_NAME "iris_4.1.1.21-banban.6_DCG_Windows") +set(IRIS_SDK_DOWNLOAD_URL "https://download.agora.io/sdk/release/iris_4.1.1.25-sp.1_DCG_Windows_Video_20240118_1208.zip") +set(IRIS_SDK_DOWNLOAD_NAME "iris_4.1.1.25-sp.1_DCG_Windows") set(RTC_SDK_DOWNLOAD_NAME "Agora_Native_SDK_for_Windows_FULL") set(IRIS_SDK_VERSION "v3_6_2_fix.1")