diff --git a/lib/src/agora_base.dart b/lib/src/agora_base.dart index 9b8e38370..1f3711390 100644 --- a/lib/src/agora_base.dart +++ b/lib/src/agora_base.dart @@ -458,6 +458,10 @@ enum ErrorCodeType { /// 1501: Permission to access the camera is not granted. Check whether permission to access the camera permission is granted. @JsonValue(1501) errVdmCameraNotAuthorized, + + /// @nodoc + @JsonValue(2007) + errAdmApplicationLoopback, } /// @nodoc @@ -1774,7 +1778,7 @@ class VideoEncoderConfiguration { @JsonKey(name: 'frameRate') final int? frameRate; - /// The encoding bitrate (Kbps) of the video. : (Recommended) Standard bitrate mode. In this mode, the bitrates of the live broadcasting profile is higher than that of the communication profile. : 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. (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. @JsonKey(name: 'bitrate') final int? bitrate; @@ -2654,7 +2658,7 @@ enum LocalAudioStreamError { @JsonValue(2) localAudioStreamErrorDeviceNoPermission, - /// 3: (Android and iOS only) The local audio capture device is used. 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. + /// 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. @JsonValue(3) localAudioStreamErrorDeviceBusy, @@ -2810,6 +2814,26 @@ enum LocalVideoStreamError { /// @nodoc @JsonValue(22) localVideoStreamErrorScreenCaptureNoPermission, + + /// @nodoc + @JsonValue(23) + localVideoStreamErrorScreenCapturePaused, + + /// @nodoc + @JsonValue(24) + localVideoStreamErrorScreenCaptureResumed, + + /// @nodoc + @JsonValue(25) + localVideoStreamErrorScreenCaptureWindowHidden, + + /// @nodoc + @JsonValue(26) + localVideoStreamErrorScreenCaptureWindowRecoverFromHidden, + + /// @nodoc + @JsonValue(27) + localVideoStreamErrorScreenCaptureWindowRecoverFromMinimized, } /// @nodoc @@ -4198,7 +4222,7 @@ enum ConnectionChangedReasonType { @JsonValue(13) connectionChangedClientIpAddressChanged, - /// 14: Timeout for the keep-alive of the connection between the SDK and the Agora edge server. The connection state changes to . + /// 14: Timeout for the keep-alive of the connection between the SDK and the Agora edge server. The SDK tries to reconnect to the server automatically. @JsonValue(14) connectionChangedKeepAliveTimeout, @@ -4229,6 +4253,10 @@ enum ConnectionChangedReasonType { /// @nodoc @JsonValue(21) connectionChangedLicenseValidationFailure, + + /// @nodoc + @JsonValue(22) + connectionChangedCertificationVeryfyFailure, } /// @nodoc diff --git a/lib/src/agora_base.g.dart b/lib/src/agora_base.g.dart index 2dcad2bb4..a8c584c16 100644 --- a/lib/src/agora_base.g.dart +++ b/lib/src/agora_base.g.dart @@ -2189,6 +2189,7 @@ const _$ErrorCodeTypeEnumMap = { ErrorCodeType.errAdmStartRecording: 1012, ErrorCodeType.errAdmStopRecording: 1013, ErrorCodeType.errVdmCameraNotAuthorized: 1501, + ErrorCodeType.errAdmApplicationLoopback: 2007, }; const _$LicenseErrorTypeEnumMap = { @@ -2412,6 +2413,13 @@ const _$LocalVideoStreamErrorEnumMap = { 20, LocalVideoStreamError.localVideoStreamErrorScreenCaptureFailure: 21, LocalVideoStreamError.localVideoStreamErrorScreenCaptureNoPermission: 22, + LocalVideoStreamError.localVideoStreamErrorScreenCapturePaused: 23, + LocalVideoStreamError.localVideoStreamErrorScreenCaptureResumed: 24, + LocalVideoStreamError.localVideoStreamErrorScreenCaptureWindowHidden: 25, + LocalVideoStreamError + .localVideoStreamErrorScreenCaptureWindowRecoverFromHidden: 26, + LocalVideoStreamError + .localVideoStreamErrorScreenCaptureWindowRecoverFromMinimized: 27, }; const _$RemoteAudioStateEnumMap = { @@ -2542,6 +2550,7 @@ const _$ConnectionChangedReasonTypeEnumMap = { ConnectionChangedReasonType.connectionChangedSameUidLogin: 19, ConnectionChangedReasonType.connectionChangedTooManyBroadcasters: 20, ConnectionChangedReasonType.connectionChangedLicenseValidationFailure: 21, + ConnectionChangedReasonType.connectionChangedCertificationVeryfyFailure: 22, }; const _$ClientRoleChangeFailedReasonEnumMap = { diff --git a/lib/src/agora_media_base.dart b/lib/src/agora_media_base.dart index caef1c54c..654126405 100644 --- a/lib/src/agora_media_base.dart +++ b/lib/src/agora_media_base.dart @@ -348,6 +348,10 @@ enum ContentInspectType { /// 2: Screenshot capture. SDK takes screenshots of the video stream in the channel and uploads them. @JsonValue(2) contentInspectSupervision, + + /// @nodoc + @JsonValue(3) + contentInspectImageModeration, } /// @nodoc @@ -389,12 +393,17 @@ class ContentInspectModule { @JsonSerializable(explicitToJson: true, includeIfNull: false) class ContentInspectConfig { /// @nodoc - const ContentInspectConfig({this.extraInfo, this.modules, this.moduleCount}); + const ContentInspectConfig( + {this.extraInfo, this.serverConfig, this.modules, this.moduleCount}); /// Additional information on the video content (maximum length: 1024 Bytes). The SDK sends the screenshots and additional information on the video content to the Agora server. Once the video screenshot and upload process is completed, the Agora server sends the additional information and the callback notification to your server. @JsonKey(name: 'extraInfo') final String? extraInfo; + /// @nodoc + @JsonKey(name: 'serverConfig') + final String? serverConfig; + /// Functional module. See ContentInspectModule. A maximum of 32 ContentInspectModule instances can be configured, and the value range of MAX_CONTENT_INSPECT_MODULE_COUNT is an integer in [1,32]. A function module can only be configured with one instance at most. Currently only the video screenshot and upload function is supported. @JsonKey(name: 'modules') final List? modules; @@ -585,6 +594,10 @@ enum VideoPixelFormat { /// 16: The format is I422. @JsonValue(16) videoPixelI422, + + /// @nodoc + @JsonValue(17) + videoTextureId3d11texture2d, } /// @nodoc @@ -679,7 +692,8 @@ class ExternalVideoFrame { this.matrix, this.metadataBuffer, this.metadataSize, - this.alphaBuffer}); + this.alphaBuffer, + this.textureSliceIndex}); /// The video type. See VideoBufferType. @JsonKey(name: 'type') @@ -749,6 +763,10 @@ class ExternalVideoFrame { @JsonKey(name: 'alphaBuffer', ignore: true) final Uint8List? alphaBuffer; + /// @nodoc + @JsonKey(name: 'texture_slice_index') + final int? textureSliceIndex; + /// @nodoc factory ExternalVideoFrame.fromJson(Map json) => _$ExternalVideoFrameFromJson(json); diff --git a/lib/src/agora_media_base.g.dart b/lib/src/agora_media_base.g.dart index 497e7cdd5..55cc04bc1 100644 --- a/lib/src/agora_media_base.g.dart +++ b/lib/src/agora_media_base.g.dart @@ -56,12 +56,14 @@ const _$ContentInspectTypeEnumMap = { ContentInspectType.contentInspectInvalid: 0, ContentInspectType.contentInspectModeration: 1, ContentInspectType.contentInspectSupervision: 2, + ContentInspectType.contentInspectImageModeration: 3, }; ContentInspectConfig _$ContentInspectConfigFromJson( Map json) => ContentInspectConfig( extraInfo: json['extraInfo'] as String?, + serverConfig: json['serverConfig'] as String?, modules: (json['modules'] as List?) ?.map((e) => ContentInspectModule.fromJson(e as Map)) .toList(), @@ -79,6 +81,7 @@ Map _$ContentInspectConfigToJson( } writeNotNull('extraInfo', instance.extraInfo); + writeNotNull('serverConfig', instance.serverConfig); writeNotNull('modules', instance.modules?.map((e) => e.toJson()).toList()); writeNotNull('moduleCount', instance.moduleCount); return val; @@ -178,6 +181,7 @@ ExternalVideoFrame _$ExternalVideoFrameFromJson(Map json) => ?.map((e) => (e as num).toDouble()) .toList(), metadataSize: json['metadata_size'] as int?, + textureSliceIndex: json['texture_slice_index'] as int?, ); Map _$ExternalVideoFrameToJson(ExternalVideoFrame instance) { @@ -203,6 +207,7 @@ Map _$ExternalVideoFrameToJson(ExternalVideoFrame instance) { writeNotNull('textureId', instance.textureId); writeNotNull('matrix', instance.matrix); writeNotNull('metadata_size', instance.metadataSize); + writeNotNull('texture_slice_index', instance.textureSliceIndex); return val; } @@ -225,6 +230,7 @@ const _$VideoPixelFormatEnumMap = { VideoPixelFormat.videoCvpixelI420: 13, VideoPixelFormat.videoCvpixelBgra: 14, VideoPixelFormat.videoPixelI422: 16, + VideoPixelFormat.videoTextureId3d11texture2d: 17, }; const _$EglContextTypeEnumMap = { diff --git a/lib/src/agora_media_engine.dart b/lib/src/agora_media_engine.dart index cd31c463f..8aeb873d5 100644 --- a/lib/src/agora_media_engine.dart +++ b/lib/src/agora_media_engine.dart @@ -58,7 +58,7 @@ abstract class MediaEngine { /// Ensure that you call this method before joining a channel. /// When handling the video data returned in the callbacks, pay attention to the changes in the width and height parameters, which may be adapted under the following circumstances: /// When network conditions deteriorate, the video resolution decreases incrementally. - /// If the user adjusts the video profile, the resolution of the video returned in the callbacks also changes. After registering the raw video observer, you can use the obtained raw video data in various video pre-processing scenarios, such as implementing virtual backgrounds and image enhacement scenarios by yourself, Agora provides some open source sample projects on GitHub for your reference. + /// If the user adjusts the video profile, the resolution of the video returned in the callbacks also changes. /// /// * [observer] The observer instance. See VideoFrameObserver. /// diff --git a/lib/src/agora_music_content_center.dart b/lib/src/agora_music_content_center.dart index 90aa9b7f6..1738a1d8c 100644 --- a/lib/src/agora_music_content_center.dart +++ b/lib/src/agora_music_content_center.dart @@ -64,6 +64,10 @@ enum MusicContentCenterStatusCode { /// @nodoc @JsonValue(6) kMusicContentCenterStatusErrMusicDecryption, + + /// @nodoc + @JsonValue(7) + kMusicContentCenterStatusErrHttpInternalError, } /// @nodoc @@ -344,7 +348,7 @@ class MusicContentCenterEventHandler { class MusicContentCenterConfiguration { /// @nodoc const MusicContentCenterConfiguration( - {this.appId, this.token, this.mccUid, this.maxCacheSize}); + {this.appId, this.token, this.mccUid, this.maxCacheSize, this.mccDomain}); /// @nodoc @JsonKey(name: 'appId') @@ -362,6 +366,10 @@ class MusicContentCenterConfiguration { @JsonKey(name: 'maxCacheSize') final int? maxCacheSize; + /// @nodoc + @JsonKey(name: 'mccDomain') + final String? mccDomain; + /// @nodoc factory MusicContentCenterConfiguration.fromJson(Map json) => _$MusicContentCenterConfigurationFromJson(json); diff --git a/lib/src/agora_music_content_center.g.dart b/lib/src/agora_music_content_center.g.dart index 099ff5f9a..14f74672c 100644 --- a/lib/src/agora_music_content_center.g.dart +++ b/lib/src/agora_music_content_center.g.dart @@ -150,6 +150,7 @@ MusicContentCenterConfiguration _$MusicContentCenterConfigurationFromJson( token: json['token'] as String?, mccUid: json['mccUid'] as int?, maxCacheSize: json['maxCacheSize'] as int?, + mccDomain: json['mccDomain'] as String?, ); Map _$MusicContentCenterConfigurationToJson( @@ -166,6 +167,7 @@ Map _$MusicContentCenterConfigurationToJson( writeNotNull('token', instance.token); writeNotNull('mccUid', instance.mccUid); writeNotNull('maxCacheSize', instance.maxCacheSize); + writeNotNull('mccDomain', instance.mccDomain); return val; } @@ -185,4 +187,5 @@ const _$MusicContentCenterStatusCodeEnumMap = { MusicContentCenterStatusCode.kMusicContentCenterStatusErrInternalDataParse: 4, MusicContentCenterStatusCode.kMusicContentCenterStatusErrMusicLoading: 5, MusicContentCenterStatusCode.kMusicContentCenterStatusErrMusicDecryption: 6, + MusicContentCenterStatusCode.kMusicContentCenterStatusErrHttpInternalError: 7, }; diff --git a/lib/src/agora_rtc_engine.dart b/lib/src/agora_rtc_engine.dart index af228bb36..659bbf0b1 100644 --- a/lib/src/agora_rtc_engine.dart +++ b/lib/src/agora_rtc_engine.dart @@ -1254,7 +1254,7 @@ class ImageTrackOptions { /// @nodoc const ImageTrackOptions({this.imageUrl, this.fps, this.mirrorMode}); - /// The URL of the image that you want to use to replace the video feeds. The image must be in PNG format. This method supports adding an image from the local absolute or relative file path. On the Android platform, adding images from /assets/ is not supported. + /// The image URL. Supported formats of images include JPEG, JPG, PNG and GIF. This method supports adding an image from the local absolute or relative file path. On the Android platform, adding images from /assets/ is not supported. @JsonKey(name: 'imageUrl') final String? imageUrl; @@ -1276,7 +1276,7 @@ class ImageTrackOptions { /// The channel media options. /// -/// Agora supports publishing multiple audio streams and one video stream at the same time and in the same RtcConnection. For example, publishMicrophoneTrack, publishAudioTrack, publishCustomAudioTrack, and publishMediaPlayerAudioTrack can be set as true at the same time, but only one of publishCameraTrack, publishScreenCaptureVideo publishScreenTrack, publishCustomVideoTrack, or publishEncodedVideoTrack can be set as true. Agora recommends that you set member parameter values yourself according to your business scenario, otherwise the SDK will automatically assign values to member parameters. +/// Agora supports publishing multiple audio streams and one video stream at the same time and in the same RtcConnection. For example, publishMicrophoneTrack, publishCustomAudioTrack, and publishMediaPlayerAudioTrack can be set as true at the same time, but only one of publishCameraTrack, publishScreenCaptureVideo publishScreenTrack, publishCustomVideoTrack, or publishEncodedVideoTrack can be set as true. Agora recommends that you set member parameter values yourself according to your business scenario, otherwise the SDK will automatically assign values to member parameters. @JsonSerializable(explicitToJson: true, includeIfNull: false) class ChannelMediaOptions { /// @nodoc @@ -1509,6 +1509,31 @@ extension ProxyTypeExt on ProxyType { } } +/// @nodoc +@JsonEnum(alwaysCreate: true) +enum FeatureType { + /// @nodoc + @JsonValue(1) + videoVirtualBackground, + + /// @nodoc + @JsonValue(2) + videoBeautyEffect, +} + +/// @nodoc +extension FeatureTypeExt on FeatureType { + /// @nodoc + static FeatureType fromValue(int value) { + return $enumDecode(_$FeatureTypeEnumMap, value); + } + + /// @nodoc + int value() { + return _$FeatureTypeEnumMap[this]!; + } +} + /// The options for leaving a channel. @JsonSerializable(explicitToJson: true, includeIfNull: false) class LeaveChannelOptions { @@ -2115,7 +2140,7 @@ class RtcEngineEventHandler { /// /// When the token expires during a call, the SDK triggers this callback to remind the app to renew the token. When receiving this callback, you need to generate a new token on your token server and you can renew your token through one of the following ways: /// Call renewToken to pass in the new token. - /// Call to leave the current channel and then pass in the new token when you call joinChannel to join a channel. + /// Call leaveChannel to leave the current channel and then pass in the new token when you call joinChannel to join a channel. /// /// * [connection] The connection information. See RtcConnection. final void Function(RtcConnection connection)? onRequestToken; @@ -2244,7 +2269,7 @@ class RtcEngineEventHandler { /// Occurs when the user role switching fails in the interactive live streaming. /// - /// In the live broadcasting channel profile, when the local user calls to switch the user role after joining the channel but the switch fails, the SDK triggers this callback to report the reason for the failure and the current user role. + /// In the live broadcasting channel profile, when the local user calls setClientRole to switch the user role after joining the channel but the switch fails, the SDK triggers this callback to report the reason for the failure and the current user role. /// /// * [connection] The connection information. See RtcConnection. /// * [reason] The reason for a user role switch failure. See ClientRoleChangeFailedReason. @@ -3058,7 +3083,7 @@ abstract class RtcEngine { /// * [token] The token generated on your server for authentication. When the token for preloading channels expires, you can update the token based on the number of channels you preload. /// When preloading one channel, calling this method to pass in the new token. /// When preloading more than one channels: - /// If you use a wildcard token for all preloaded channels, call updatePreloadChannelToken to update the token. + /// If you use a wildcard token for all preloaded channels, call updatePreloadChannelToken to update the token. When generating a wildcard token, ensure the user ID is not set as 0. /// If you use different tokens to preload different channels, call this method to pass in your user ID, channel name and the new token. /// * [channelId] The channel name that you want to preload. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters (89 characters in total): /// All lowercase English letters: a to z. @@ -3087,7 +3112,7 @@ abstract class RtcEngine { /// * [token] The token generated on your server for authentication. When the token for preloading channels expires, you can update the token based on the number of channels you preload. /// When preloading one channel, calling this method to pass in the new token. /// When preloading more than one channels: - /// If you use a wildcard token for all preloaded channels, call updatePreloadChannelToken to update the token. + /// If you use a wildcard token for all preloaded channels, call updatePreloadChannelToken to update the token. When generating a wildcard token, ensure the user ID is not set as 0. /// If you use different tokens to preload different channels, call this method to pass in your user ID, channel name and the new token. /// * [channelId] The channel name that you want to preload. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters (89 characters in total): /// All lowercase English letters: a to z. @@ -3134,7 +3159,7 @@ abstract class RtcEngine { /// This method allows users to join only one channel at a time. /// Ensure that the app ID you use to generate the token is the same app ID that you pass in the initialize method; otherwise, you may fail to join the channel by token. /// - /// * [token] The token generated on your server for authentication. + /// * [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. /// * [channelId] The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters: /// All lowercase English letters: a to z. /// All uppercase English letters: A to Z. @@ -3200,7 +3225,7 @@ abstract class RtcEngine { /// Sets the channel profile. /// - /// After initializing the SDK, the default channel profile is the live streaming profile. You can call this method to set the usage scenario of the channel. For example, it prioritizes smoothness and low latency for a video call, and prioritizes video quality for the interactive live video streaming. + /// After initializing the SDK, the default channel profile is the live streaming profile. You can call this method to set the channel profile. The Agora SDK differentiates channel profiles and applies optimization algorithms accordingly. For example, it prioritizes smoothness and low latency for a video call and prioritizes video quality for interactive live video streaming. /// To ensure the quality of real-time communication, Agora recommends that all users in a channel use the same channel profile. /// This method must be called and set before joinChannel, and cannot be set again after joining the channel. /// @@ -3218,7 +3243,7 @@ abstract class RtcEngine { /// In the interactive live streaming profile, the SDK sets the user role as audience by default. You can call this method to set the user role as host. You can call this method either before or after joining a channel. If you call this method to set the user's role as the host before joining the channel and set the local video property through the setupLocalVideo method, the local video preview is automatically enabled when the user joins the channel. If you call this method to switch the user role after joining a channel, the SDK automatically does the following: /// Calls muteLocalAudioStream and muteLocalVideoStream to change the publishing state. /// Triggers onClientRoleChanged on the local client. - /// Triggers onUserJoined or onUserOffline on the remote client. This method applies to the interactive live streaming profile (the profile parameter of setChannelProfile is channelProfileLiveBroadcasting) only. + /// Triggers onUserJoined or onUserOffline on the remote client. This method applies to the interactive live streaming profile (the profile parameter of setChannelProfile is set as channelProfileLiveBroadcasting) only. /// /// * [role] The user role in the interactive live streaming. See ClientRoleType. /// * [options] The detailed options of a user, including the user level. See ClientRoleOptions. @@ -3259,13 +3284,13 @@ abstract class RtcEngine { /// /// In scenarios where there are existing cameras to capture video, Agora recommends that you use the following steps to capture and publish video with multiple cameras: /// Call this method to enable multi-channel camera capture. - /// Call to start the local video preview. + /// Call startPreview to start the local video preview. /// Call startCameraCapture, and set sourceType to start video capture with the second camera. /// Call joinChannelEx, and set publishSecondaryCameraTrack to true to publish the video stream captured by the second camera in the channel. If you want to disable multi-channel camera capture, use the following steps: /// Call stopCameraCapture. - /// Call this method with enabled set to false. You can call this method before and after to enable multi-camera capture: - /// If it is enabled before, the local video preview shows the image captured by the two cameras at the same time. - /// If it is enabled after, 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: + /// 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: /// iPhone XR /// iPhone XS /// iPhone XS Max @@ -3368,12 +3393,14 @@ abstract class RtcEngine { /// Sets the image enhancement options. /// /// Enables or disables image enhancement, and sets the options. - /// Call this method before calling enableVideo or. + /// Call this method before calling enableVideo or startPreview. /// This method relies on the video enhancement dynamic library libagora_clear_vision_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally. /// /// * [enabled] Whether to enable the image enhancement function: true : Enable the image enhancement function. false : (Default) Disable the image enhancement function. /// * [options] The image enhancement options. See BeautyOptions. - /// * [type] The type of the video source, see MediaSourceType. + /// * [type] Type of media source. See MediaSourceType. In this method, this parameter supports only the following two settings: + /// The default value is unknownMediaSource. + /// If you want to use the second camera to capture video, set this parameter to secondaryCameraSource. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. @@ -3451,7 +3478,7 @@ abstract class RtcEngine { /// Enables/Disables the virtual background. /// - /// The virtual background feature enables the local user to replace their original background with a static image, dynamic video, blurred background, or portrait-background segmentation to achieve picture-in-picture effect. Once the virtual background feature is enabled, all users in the channel can see the custom background. Call this method before calling enableVideo or. + /// The virtual background feature enables the local user to replace their original background with a static image, dynamic video, blurred background, or portrait-background segmentation to achieve picture-in-picture effect. Once the virtual background feature is enabled, all users in the channel can see the custom background. Call this method before calling enableVideo or startPreview. /// This feature requires high performance devices. Agora recommends that you implement it on devices equipped with the following chips: /// Snapdragon 700 series 750G and later /// Snapdragon 800 series 835 and later @@ -4639,7 +4666,7 @@ abstract class RtcEngine { /// /// 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). - /// 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 is as follows: + /// 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. /// 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. @@ -4990,7 +5017,9 @@ abstract class RtcEngine { /// * [extension] The name of the extension. /// * [key] The key of the extension. /// * [value] The value of the extension key. - /// * [type] The type of the video source, see MediaSourceType. + /// * [type] Type of media source. See MediaSourceType. In this method, this parameter supports only the following two settings: + /// The default value is unknownMediaSource. + /// If you want to use the second camera to capture video, set this parameter to secondaryCameraSource. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. @@ -5606,8 +5635,7 @@ abstract class RtcEngine { /// Starts pushing media streams to a CDN without transcoding. /// - /// Ensure that you enable the Media Push service before using this function. See Enable Media Push. - /// Call this method after joining a channel. + /// Call this method after joining a channel. /// Only hosts in the LIVE_BROADCASTING profile can call this method. /// If you want to retry pushing streams after a failed push, make sure to call stopRtmpStream first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push. Agora recommends that you use the server-side Media Push function. You can call this method to push an audio or video stream to the specified CDN address. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times. After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming. /// @@ -5623,8 +5651,7 @@ abstract class RtcEngine { /// Starts Media Push and sets the transcoding configuration. /// - /// Agora recommends that you use the server-side Media Push function. You can call this method to push a live audio-and-video stream to the specified CDN address and set the transcoding configuration. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times. After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming. - /// Ensure that you enable the Media Push service before using this function. See Enable Media Push. + /// Agora recommends that you use the server-side Media Push function. You can call this method to push a live audio-and-video stream to the specified CDN address and set the transcoding configuration. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times. Under one Agora project, the maximum number of concurrent tasks to push media streams is 200 by default. If you need a higher quota, contact. After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming. /// Call this method after joining a channel. /// Only hosts in the LIVE_BROADCASTING profile can call this method. /// If you want to retry pushing streams after a failed push, make sure to call stopRtmpStream first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push. @@ -5731,8 +5758,8 @@ abstract class RtcEngine { /// Sets the rotation angle of the captured video. /// - /// You must call this method after enableVideo. The setting result will take effect after the camera is successfully turned on, that is, after the SDK triggers the onLocalVideoStateChanged callback and returns the local video state as localVideoStreamStateCapturing (1). - /// This method applies to Windows only. + /// This method applies to Windows only. + /// You must call this method after enableVideo. The setting result will take effect after the camera is successfully turned on, that is, after the SDK triggers the onLocalVideoStateChanged callback and returns the local video state as localVideoStreamStateCapturing (1). /// When the video capture device does not have the gravity sensing function, you can call this method to manually adjust the rotation angle of the captured video. /// /// * [type] The video source type. See VideoSourceType. @@ -6005,7 +6032,7 @@ abstract class RtcEngine { /// The local client: onLocalUserRegistered, onJoinChannelSuccess and onConnectionStateChanged callbacks. /// The remote client: The onUserJoined callback, if the user is in the COMMUNICATION profile, and the onUserInfoUpdated callback if the user is a host in the LIVE_BROADCASTING profile. Once a user joins the channel, the user subscribes to the audio and video streams of all the other users in the channel by default, giving rise to usage and billing calculation. To stop subscribing to a specified stream or all remote streams, call the corresponding mute methods. To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the Agora Web SDK, ensure that the ID of the user is set to the same parameter type. /// - /// * [token] The token generated on your server for authentication. + /// * [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. /// * [channelId] The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters: /// All lowercase English letters: a to z. /// All uppercase English letters: A to Z. @@ -6042,7 +6069,7 @@ abstract class RtcEngine { /// The local client: onLocalUserRegistered, onJoinChannelSuccess and onConnectionStateChanged callbacks. /// The remote client: The onUserJoined callback, if the user is in the COMMUNICATION profile, and the onUserInfoUpdated callback if the user is a host in the LIVE_BROADCASTING profile. /// - /// * [token] The token generated on your server for authentication. + /// * [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. /// * [channelId] The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported characters: /// All lowercase English letters: a to z. /// All uppercase English letters: A to Z. @@ -6432,6 +6459,9 @@ abstract class RtcEngine { /// The Unix timestamp (ms) of the current NTP time. Future getNtpWallTimeInMs(); + /// @nodoc + Future isFeatureAvailableOnDevice(FeatureType type); + /// Gets the AudioDeviceManager object to manage audio devices. /// /// Returns diff --git a/lib/src/agora_rtc_engine.g.dart b/lib/src/agora_rtc_engine.g.dart index 38c06fe23..26e9e78cc 100644 --- a/lib/src/agora_rtc_engine.g.dart +++ b/lib/src/agora_rtc_engine.g.dart @@ -1073,6 +1073,11 @@ const _$ProxyTypeEnumMap = { ProxyType.httpsProxyType: 6, }; +const _$FeatureTypeEnumMap = { + FeatureType.videoVirtualBackground: 1, + FeatureType.videoBeautyEffect: 2, +}; + const _$MetadataTypeEnumMap = { MetadataType.unknownMetadata: -1, MetadataType.videoMetadata: 0, diff --git a/lib/src/agora_rtc_engine_ex.dart b/lib/src/agora_rtc_engine_ex.dart index 71c13eafd..b22abe290 100644 --- a/lib/src/agora_rtc_engine_ex.dart +++ b/lib/src/agora_rtc_engine_ex.dart @@ -34,7 +34,7 @@ abstract class RtcEngineEx implements RtcEngine { /// 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. /// - /// * [token] The token generated on your server for authentication. + /// * [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. /// * [options] The channel media options. See ChannelMediaOptions. /// @@ -57,7 +57,7 @@ abstract class RtcEngineEx implements RtcEngine { /// /// This method lets the user leave the channel, for example, by hanging up or exiting the call. After calling joinChannelEx to join the channel, this method must be called to end the call before starting the next call. This method can be called whether or not a call is currently in progress. This method releases all resources related to the session. This method call is asynchronous. When this method returns, it does not necessarily mean that the user has left the channel. After you leave the channel, the SDK triggers the onLeaveChannel callback. After actually leaving the channel, the local user triggers the onLeaveChannel callback; after the user in the communication scenario and the host in the live streaming scenario leave the channel, the remote user triggers the onUserOffline callback. /// If you call release immediately after calling this method, the SDK does not trigger the onLeaveChannel callback. - /// Calling leaveChannel will leave the channels when calling joinChannel and joinChannelEx at the same time. + /// If you want to leave the channels that you joined by calling joinChannel and joinChannelEx, call the leaveChannel method. /// /// * [connection] The connection information. See RtcConnection. /// * [options] The options for leaving the channel. See LeaveChannelOptions. This parameter only supports the stopMicrophoneRecording member in the LeaveChannelOptions settings; setting other members does not take effect. @@ -420,7 +420,7 @@ abstract class RtcEngineEx implements RtcEngine { /// Creates a data stream. /// - /// Creates a data stream. Each user can create up to five data streams in a single channel. Compared with createDataStreamEx, this method does not support data reliability. If a data packet is not received five seconds after it was sent, the SDK directly discards the data. + /// Creates a data stream. Each user can create up to five data streams in a single channel. /// /// * [config] The configurations for the data stream. See DataStreamConfig. /// * [connection] The connection information. See RtcConnection. @@ -521,8 +521,7 @@ abstract class RtcEngineEx implements RtcEngine { /// Starts pushing media streams to a CDN without transcoding. /// - /// Ensure that you enable the Media Push service before using this function. See Enable Media Push. - /// Call this method after joining a channel. + /// Call this method after joining a channel. /// Only hosts in the LIVE_BROADCASTING profile can call this method. /// If you want to retry pushing streams after a failed push, make sure to call stopRtmpStream first, then call this method to retry pushing streams; otherwise, the SDK returns the same error code as the last failed push. Agora recommends that you use the server-side Media Push function. You can call this method to push an audio or video stream to the specified CDN address. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times. After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming. /// @@ -758,6 +757,12 @@ abstract class RtcEngineEx implements RtcEngine { required int uid, required String filePath}); + /// @nodoc + Future enableContentInspectEx( + {required bool enabled, + required ContentInspectConfig config, + required RtcConnection connection}); + /// Enables tracing the video frame rendering process. /// /// By default, the SDK starts tracing the video rendering event automatically when the local user successfully joins the channel. You can call this method at an appropriate time according to the actual application scenario to customize the tracing process. diff --git a/lib/src/binding/agora_rtc_engine_ex_impl.dart b/lib/src/binding/agora_rtc_engine_ex_impl.dart index 65f53d52e..566cdf53b 100644 --- a/lib/src/binding/agora_rtc_engine_ex_impl.dart +++ b/lib/src/binding/agora_rtc_engine_ex_impl.dart @@ -1181,6 +1181,33 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { } } + @override + Future enableContentInspectEx( + {required bool enabled, + required ContentInspectConfig config, + required RtcConnection connection}) async { + final apiType = + '${isOverrideClassName ? className : 'RtcEngineEx'}_enableContentInspectEx'; + final param = createParams({ + 'enabled': enabled, + 'config': config.toJson(), + 'connection': connection.toJson() + }); + final List buffers = []; + buffers.addAll(config.collectBufferList()); + 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); + } + } + @override Future startMediaRenderingTracingEx(RtcConnection connection) async { final apiType = diff --git a/lib/src/binding/agora_rtc_engine_impl.dart b/lib/src/binding/agora_rtc_engine_impl.dart index 814a58120..17f523c96 100644 --- a/lib/src/binding/agora_rtc_engine_impl.dart +++ b/lib/src/binding/agora_rtc_engine_impl.dart @@ -5034,6 +5034,21 @@ class RtcEngineImpl implements RtcEngine { return result as int; } + @override + Future isFeatureAvailableOnDevice(FeatureType type) async { + final apiType = + '${isOverrideClassName ? className : 'RtcEngine'}_isFeatureAvailableOnDevice'; + final param = createParams({'type': type.value()}); + final callApiResult = await irisMethodChannel.invokeMethod( + IrisMethodCall(apiType, jsonEncode(param), buffers: null)); + if (callApiResult.irisReturnCode < 0) { + throw AgoraRtcException(code: callApiResult.irisReturnCode); + } + final rm = callApiResult.data; + final result = rm['result']; + return result as bool; + } + @override AudioDeviceManager getAudioDeviceManager() { // Implementation template 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 02adeaf91..c5ca3ff95 100644 --- a/lib/src/binding/call_api_event_handler_buffer_ext.dart +++ b/lib/src/binding/call_api_event_handler_buffer_ext.dart @@ -3,8 +3,8 @@ // ignore_for_file: public_member_api_docs, unused_local_variable, prefer_is_empty import 'package:agora_rtc_engine/src/binding_forward_export.dart'; -extension LocalVideoStatsBufferExt on LocalVideoStats { - LocalVideoStats fillBuffers(List bufferList) { +extension VideoDimensionsBufferExt on VideoDimensions { + VideoDimensions fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -15,8 +15,8 @@ extension LocalVideoStatsBufferExt on LocalVideoStats { } } -extension RemoteAudioStatsBufferExt on RemoteAudioStats { - RemoteAudioStats fillBuffers(List bufferList) { +extension SenderOptionsBufferExt on SenderOptions { + SenderOptions fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -27,8 +27,9 @@ extension RemoteAudioStatsBufferExt on RemoteAudioStats { } } -extension RemoteVideoStatsBufferExt on RemoteVideoStats { - RemoteVideoStats fillBuffers(List bufferList) { +extension EncodedAudioFrameAdvancedSettingsBufferExt + on EncodedAudioFrameAdvancedSettings { + EncodedAudioFrameAdvancedSettings fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -39,34 +40,20 @@ extension RemoteVideoStatsBufferExt on RemoteVideoStats { } } -extension VideoCompositingLayoutBufferExt on VideoCompositingLayout { - VideoCompositingLayout fillBuffers(List bufferList) { +extension EncodedAudioFrameInfoBufferExt on EncodedAudioFrameInfo { + EncodedAudioFrameInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; - Uint8List? appData; - if (bufferList.length > 0) { - appData = bufferList[0]; - } - return VideoCompositingLayout( - canvasWidth: canvasWidth, - canvasHeight: canvasHeight, - backgroundColor: backgroundColor, - regions: regions, - regionCount: regionCount, - appData: appData, - appDataLength: appDataLength); + return this; } List collectBufferList() { final bufferList = []; - if (appData != null) { - bufferList.add(appData!); - } return bufferList; } } -extension RegionBufferExt on Region { - Region fillBuffers(List bufferList) { +extension AudioPcmDataInfoBufferExt on AudioPcmDataInfo { + AudioPcmDataInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -77,8 +64,8 @@ extension RegionBufferExt on Region { } } -extension InjectStreamConfigBufferExt on InjectStreamConfig { - InjectStreamConfig fillBuffers(List bufferList) { +extension VideoSubscriptionOptionsBufferExt on VideoSubscriptionOptions { + VideoSubscriptionOptions fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -89,8 +76,8 @@ extension InjectStreamConfigBufferExt on InjectStreamConfig { } } -extension PublisherConfigurationBufferExt on PublisherConfiguration { - PublisherConfiguration fillBuffers(List bufferList) { +extension EncodedVideoFrameInfoBufferExt on EncodedVideoFrameInfo { + EncodedVideoFrameInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -101,8 +88,8 @@ extension PublisherConfigurationBufferExt on PublisherConfiguration { } } -extension CameraCapturerConfigurationBufferExt on CameraCapturerConfiguration { - CameraCapturerConfiguration fillBuffers(List bufferList) { +extension AdvanceOptionsBufferExt on AdvanceOptions { + AdvanceOptions fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -113,8 +100,8 @@ extension CameraCapturerConfigurationBufferExt on CameraCapturerConfiguration { } } -extension ScreenCaptureConfigurationBufferExt on ScreenCaptureConfiguration { - ScreenCaptureConfiguration fillBuffers(List bufferList) { +extension CodecCapLevelsBufferExt on CodecCapLevels { + CodecCapLevels fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -125,8 +112,8 @@ extension ScreenCaptureConfigurationBufferExt on ScreenCaptureConfiguration { } } -extension SIZEBufferExt on SIZE { - SIZE fillBuffers(List bufferList) { +extension CodecCapInfoBufferExt on CodecCapInfo { + CodecCapInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -137,28 +124,20 @@ extension SIZEBufferExt on SIZE { } } -extension ThumbImageBufferBufferExt on ThumbImageBuffer { - ThumbImageBuffer fillBuffers(List bufferList) { +extension VideoEncoderConfigurationBufferExt on VideoEncoderConfiguration { + VideoEncoderConfiguration fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; - Uint8List? buffer; - if (bufferList.length > 0) { - buffer = bufferList[0]; - } - return ThumbImageBuffer( - buffer: buffer, length: length, width: width, height: height); + return this; } List collectBufferList() { final bufferList = []; - if (buffer != null) { - bufferList.add(buffer!); - } return bufferList; } } -extension ScreenCaptureSourceInfoBufferExt on ScreenCaptureSourceInfo { - ScreenCaptureSourceInfo fillBuffers(List bufferList) { +extension DataStreamConfigBufferExt on DataStreamConfig { + DataStreamConfig fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -169,8 +148,8 @@ extension ScreenCaptureSourceInfoBufferExt on ScreenCaptureSourceInfo { } } -extension AdvancedAudioOptionsBufferExt on AdvancedAudioOptions { - AdvancedAudioOptions fillBuffers(List bufferList) { +extension SimulcastStreamConfigBufferExt on SimulcastStreamConfig { + SimulcastStreamConfig fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -181,8 +160,8 @@ extension AdvancedAudioOptionsBufferExt on AdvancedAudioOptions { } } -extension ImageTrackOptionsBufferExt on ImageTrackOptions { - ImageTrackOptions fillBuffers(List bufferList) { +extension RectangleBufferExt on Rectangle { + Rectangle fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -193,8 +172,8 @@ extension ImageTrackOptionsBufferExt on ImageTrackOptions { } } -extension ChannelMediaOptionsBufferExt on ChannelMediaOptions { - ChannelMediaOptions fillBuffers(List bufferList) { +extension WatermarkRatioBufferExt on WatermarkRatio { + WatermarkRatio fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -205,8 +184,8 @@ extension ChannelMediaOptionsBufferExt on ChannelMediaOptions { } } -extension LeaveChannelOptionsBufferExt on LeaveChannelOptions { - LeaveChannelOptions fillBuffers(List bufferList) { +extension WatermarkOptionsBufferExt on WatermarkOptions { + WatermarkOptions fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -217,8 +196,8 @@ extension LeaveChannelOptionsBufferExt on LeaveChannelOptions { } } -extension RtcEngineContextBufferExt on RtcEngineContext { - RtcEngineContext fillBuffers(List bufferList) { +extension RtcStatsBufferExt on RtcStats { + RtcStats fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -229,28 +208,20 @@ extension RtcEngineContextBufferExt on RtcEngineContext { } } -extension MetadataBufferExt on Metadata { - Metadata fillBuffers(List bufferList) { +extension ClientRoleOptionsBufferExt on ClientRoleOptions { + ClientRoleOptions fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; - Uint8List? buffer; - if (bufferList.length > 0) { - buffer = bufferList[0]; - } - return Metadata( - uid: uid, size: size, buffer: buffer, timeStampMs: timeStampMs); + return this; } List collectBufferList() { final bufferList = []; - if (buffer != null) { - bufferList.add(buffer!); - } return bufferList; } } -extension DirectCdnStreamingStatsBufferExt on DirectCdnStreamingStats { - DirectCdnStreamingStats fillBuffers(List bufferList) { +extension VideoFormatBufferExt on VideoFormat { + VideoFormat fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -261,9 +232,8 @@ extension DirectCdnStreamingStatsBufferExt on DirectCdnStreamingStats { } } -extension DirectCdnStreamingMediaOptionsBufferExt - on DirectCdnStreamingMediaOptions { - DirectCdnStreamingMediaOptions fillBuffers(List bufferList) { +extension VideoTrackInfoBufferExt on VideoTrackInfo { + VideoTrackInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -274,8 +244,8 @@ extension DirectCdnStreamingMediaOptionsBufferExt } } -extension ExtensionInfoBufferExt on ExtensionInfo { - ExtensionInfo fillBuffers(List bufferList) { +extension AudioVolumeInfoBufferExt on AudioVolumeInfo { + AudioVolumeInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -286,8 +256,8 @@ extension ExtensionInfoBufferExt on ExtensionInfo { } } -extension SDKBuildInfoBufferExt on SDKBuildInfo { - SDKBuildInfo fillBuffers(List bufferList) { +extension DeviceInfoBufferExt on DeviceInfo { + DeviceInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -298,20 +268,27 @@ extension SDKBuildInfoBufferExt on SDKBuildInfo { } } -extension VideoDeviceInfoBufferExt on VideoDeviceInfo { - VideoDeviceInfo fillBuffers(List bufferList) { +extension PacketBufferExt on Packet { + Packet fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; - return this; + Uint8List? buffer; + if (bufferList.length > 0) { + buffer = bufferList[0]; + } + return Packet(buffer: buffer, size: size); } List collectBufferList() { final bufferList = []; + if (buffer != null) { + bufferList.add(buffer!); + } return bufferList; } } -extension AudioDeviceInfoBufferExt on AudioDeviceInfo { - AudioDeviceInfo fillBuffers(List bufferList) { +extension LocalAudioStatsBufferExt on LocalAudioStats { + LocalAudioStats fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -322,8 +299,8 @@ extension AudioDeviceInfoBufferExt on AudioDeviceInfo { } } -extension VideoDimensionsBufferExt on VideoDimensions { - VideoDimensions fillBuffers(List bufferList) { +extension RtcImageBufferExt on RtcImage { + RtcImage fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -334,8 +311,8 @@ extension VideoDimensionsBufferExt on VideoDimensions { } } -extension SenderOptionsBufferExt on SenderOptions { - SenderOptions fillBuffers(List bufferList) { +extension LiveStreamAdvancedFeatureBufferExt on LiveStreamAdvancedFeature { + LiveStreamAdvancedFeature fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -346,9 +323,8 @@ extension SenderOptionsBufferExt on SenderOptions { } } -extension EncodedAudioFrameAdvancedSettingsBufferExt - on EncodedAudioFrameAdvancedSettings { - EncodedAudioFrameAdvancedSettings fillBuffers(List bufferList) { +extension TranscodingUserBufferExt on TranscodingUser { + TranscodingUser fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -359,8 +335,8 @@ extension EncodedAudioFrameAdvancedSettingsBufferExt } } -extension EncodedAudioFrameInfoBufferExt on EncodedAudioFrameInfo { - EncodedAudioFrameInfo fillBuffers(List bufferList) { +extension LiveTranscodingBufferExt on LiveTranscoding { + LiveTranscoding fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -371,8 +347,8 @@ extension EncodedAudioFrameInfoBufferExt on EncodedAudioFrameInfo { } } -extension AudioPcmDataInfoBufferExt on AudioPcmDataInfo { - AudioPcmDataInfo fillBuffers(List bufferList) { +extension TranscodingVideoStreamBufferExt on TranscodingVideoStream { + TranscodingVideoStream fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -383,8 +359,9 @@ extension AudioPcmDataInfoBufferExt on AudioPcmDataInfo { } } -extension VideoSubscriptionOptionsBufferExt on VideoSubscriptionOptions { - VideoSubscriptionOptions fillBuffers(List bufferList) { +extension LocalTranscoderConfigurationBufferExt + on LocalTranscoderConfiguration { + LocalTranscoderConfiguration fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -395,8 +372,8 @@ extension VideoSubscriptionOptionsBufferExt on VideoSubscriptionOptions { } } -extension EncodedVideoFrameInfoBufferExt on EncodedVideoFrameInfo { - EncodedVideoFrameInfo fillBuffers(List bufferList) { +extension LastmileProbeConfigBufferExt on LastmileProbeConfig { + LastmileProbeConfig fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -407,8 +384,8 @@ extension EncodedVideoFrameInfoBufferExt on EncodedVideoFrameInfo { } } -extension AdvanceOptionsBufferExt on AdvanceOptions { - AdvanceOptions fillBuffers(List bufferList) { +extension LastmileProbeOneWayResultBufferExt on LastmileProbeOneWayResult { + LastmileProbeOneWayResult fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -419,8 +396,8 @@ extension AdvanceOptionsBufferExt on AdvanceOptions { } } -extension CodecCapLevelsBufferExt on CodecCapLevels { - CodecCapLevels fillBuffers(List bufferList) { +extension LastmileProbeResultBufferExt on LastmileProbeResult { + LastmileProbeResult fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -431,8 +408,8 @@ extension CodecCapLevelsBufferExt on CodecCapLevels { } } -extension CodecCapInfoBufferExt on CodecCapInfo { - CodecCapInfo fillBuffers(List bufferList) { +extension WlAccStatsBufferExt on WlAccStats { + WlAccStats fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -443,8 +420,8 @@ extension CodecCapInfoBufferExt on CodecCapInfo { } } -extension VideoEncoderConfigurationBufferExt on VideoEncoderConfiguration { - VideoEncoderConfiguration fillBuffers(List bufferList) { +extension VideoCanvasBufferExt on VideoCanvas { + VideoCanvas fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -455,8 +432,8 @@ extension VideoEncoderConfigurationBufferExt on VideoEncoderConfiguration { } } -extension DataStreamConfigBufferExt on DataStreamConfig { - DataStreamConfig fillBuffers(List bufferList) { +extension BeautyOptionsBufferExt on BeautyOptions { + BeautyOptions fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -467,8 +444,8 @@ extension DataStreamConfigBufferExt on DataStreamConfig { } } -extension SimulcastStreamConfigBufferExt on SimulcastStreamConfig { - SimulcastStreamConfig fillBuffers(List bufferList) { +extension LowlightEnhanceOptionsBufferExt on LowlightEnhanceOptions { + LowlightEnhanceOptions fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -479,8 +456,8 @@ extension SimulcastStreamConfigBufferExt on SimulcastStreamConfig { } } -extension RectangleBufferExt on Rectangle { - Rectangle fillBuffers(List bufferList) { +extension VideoDenoiserOptionsBufferExt on VideoDenoiserOptions { + VideoDenoiserOptions fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -491,8 +468,8 @@ extension RectangleBufferExt on Rectangle { } } -extension WatermarkRatioBufferExt on WatermarkRatio { - WatermarkRatio fillBuffers(List bufferList) { +extension ColorEnhanceOptionsBufferExt on ColorEnhanceOptions { + ColorEnhanceOptions fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -503,8 +480,8 @@ extension WatermarkRatioBufferExt on WatermarkRatio { } } -extension WatermarkOptionsBufferExt on WatermarkOptions { - WatermarkOptions fillBuffers(List bufferList) { +extension VirtualBackgroundSourceBufferExt on VirtualBackgroundSource { + VirtualBackgroundSource fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -515,8 +492,8 @@ extension WatermarkOptionsBufferExt on WatermarkOptions { } } -extension RtcStatsBufferExt on RtcStats { - RtcStats fillBuffers(List bufferList) { +extension SegmentationPropertyBufferExt on SegmentationProperty { + SegmentationProperty fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -527,8 +504,8 @@ extension RtcStatsBufferExt on RtcStats { } } -extension ClientRoleOptionsBufferExt on ClientRoleOptions { - ClientRoleOptions fillBuffers(List bufferList) { +extension AudioTrackConfigBufferExt on AudioTrackConfig { + AudioTrackConfig fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -539,8 +516,8 @@ extension ClientRoleOptionsBufferExt on ClientRoleOptions { } } -extension VideoFormatBufferExt on VideoFormat { - VideoFormat fillBuffers(List bufferList) { +extension ScreenCaptureParametersBufferExt on ScreenCaptureParameters { + ScreenCaptureParameters fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -551,8 +528,8 @@ extension VideoFormatBufferExt on VideoFormat { } } -extension VideoTrackInfoBufferExt on VideoTrackInfo { - VideoTrackInfo fillBuffers(List bufferList) { +extension AudioRecordingConfigurationBufferExt on AudioRecordingConfiguration { + AudioRecordingConfiguration fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -563,8 +540,9 @@ extension VideoTrackInfoBufferExt on VideoTrackInfo { } } -extension AudioVolumeInfoBufferExt on AudioVolumeInfo { - AudioVolumeInfo fillBuffers(List bufferList) { +extension AudioEncodedFrameObserverConfigBufferExt + on AudioEncodedFrameObserverConfig { + AudioEncodedFrameObserverConfig fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -575,8 +553,8 @@ extension AudioVolumeInfoBufferExt on AudioVolumeInfo { } } -extension DeviceInfoBufferExt on DeviceInfo { - DeviceInfo fillBuffers(List bufferList) { +extension ChannelMediaInfoBufferExt on ChannelMediaInfo { + ChannelMediaInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -587,27 +565,21 @@ extension DeviceInfoBufferExt on DeviceInfo { } } -extension PacketBufferExt on Packet { - Packet fillBuffers(List bufferList) { +extension ChannelMediaRelayConfigurationBufferExt + on ChannelMediaRelayConfiguration { + ChannelMediaRelayConfiguration fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; - Uint8List? buffer; - if (bufferList.length > 0) { - buffer = bufferList[0]; - } - return Packet(buffer: buffer, size: size); + return this; } List collectBufferList() { final bufferList = []; - if (buffer != null) { - bufferList.add(buffer!); - } return bufferList; } } -extension LocalAudioStatsBufferExt on LocalAudioStats { - LocalAudioStats fillBuffers(List bufferList) { +extension UplinkNetworkInfoBufferExt on UplinkNetworkInfo { + UplinkNetworkInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -618,8 +590,8 @@ extension LocalAudioStatsBufferExt on LocalAudioStats { } } -extension RtcImageBufferExt on RtcImage { - RtcImage fillBuffers(List bufferList) { +extension DownlinkNetworkInfoBufferExt on DownlinkNetworkInfo { + DownlinkNetworkInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -630,8 +602,8 @@ extension RtcImageBufferExt on RtcImage { } } -extension LiveStreamAdvancedFeatureBufferExt on LiveStreamAdvancedFeature { - LiveStreamAdvancedFeature fillBuffers(List bufferList) { +extension PeerDownlinkInfoBufferExt on PeerDownlinkInfo { + PeerDownlinkInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -642,20 +614,30 @@ extension LiveStreamAdvancedFeatureBufferExt on LiveStreamAdvancedFeature { } } -extension TranscodingUserBufferExt on TranscodingUser { - TranscodingUser fillBuffers(List bufferList) { +extension EncryptionConfigBufferExt on EncryptionConfig { + EncryptionConfig fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; - return this; + Uint8List? encryptionKdfSalt; + if (bufferList.length > 0) { + encryptionKdfSalt = bufferList[0]; + } + return EncryptionConfig( + encryptionMode: encryptionMode, + encryptionKey: encryptionKey, + encryptionKdfSalt: encryptionKdfSalt); } List collectBufferList() { final bufferList = []; + if (encryptionKdfSalt != null) { + bufferList.add(encryptionKdfSalt!); + } return bufferList; } } -extension LiveTranscodingBufferExt on LiveTranscoding { - LiveTranscoding fillBuffers(List bufferList) { +extension EchoTestConfigurationBufferExt on EchoTestConfiguration { + EchoTestConfiguration fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -666,8 +648,8 @@ extension LiveTranscodingBufferExt on LiveTranscoding { } } -extension TranscodingVideoStreamBufferExt on TranscodingVideoStream { - TranscodingVideoStream fillBuffers(List bufferList) { +extension UserInfoBufferExt on UserInfo { + UserInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -678,9 +660,8 @@ extension TranscodingVideoStreamBufferExt on TranscodingVideoStream { } } -extension LocalTranscoderConfigurationBufferExt - on LocalTranscoderConfiguration { - LocalTranscoderConfiguration fillBuffers(List bufferList) { +extension ScreenVideoParametersBufferExt on ScreenVideoParameters { + ScreenVideoParameters fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -691,8 +672,8 @@ extension LocalTranscoderConfigurationBufferExt } } -extension LastmileProbeConfigBufferExt on LastmileProbeConfig { - LastmileProbeConfig fillBuffers(List bufferList) { +extension ScreenAudioParametersBufferExt on ScreenAudioParameters { + ScreenAudioParameters fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -703,8 +684,8 @@ extension LastmileProbeConfigBufferExt on LastmileProbeConfig { } } -extension LastmileProbeOneWayResultBufferExt on LastmileProbeOneWayResult { - LastmileProbeOneWayResult fillBuffers(List bufferList) { +extension ScreenCaptureParameters2BufferExt on ScreenCaptureParameters2 { + ScreenCaptureParameters2 fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -715,8 +696,8 @@ extension LastmileProbeOneWayResultBufferExt on LastmileProbeOneWayResult { } } -extension LastmileProbeResultBufferExt on LastmileProbeResult { - LastmileProbeResult fillBuffers(List bufferList) { +extension VideoRenderingTracingInfoBufferExt on VideoRenderingTracingInfo { + VideoRenderingTracingInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -727,8 +708,8 @@ extension LastmileProbeResultBufferExt on LastmileProbeResult { } } -extension WlAccStatsBufferExt on WlAccStats { - WlAccStats fillBuffers(List bufferList) { +extension RecorderStreamInfoBufferExt on RecorderStreamInfo { + RecorderStreamInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -739,8 +720,8 @@ extension WlAccStatsBufferExt on WlAccStats { } } -extension VideoCanvasBufferExt on VideoCanvas { - VideoCanvas fillBuffers(List bufferList) { +extension LogUploadServerInfoBufferExt on LogUploadServerInfo { + LogUploadServerInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -751,8 +732,8 @@ extension VideoCanvasBufferExt on VideoCanvas { } } -extension BeautyOptionsBufferExt on BeautyOptions { - BeautyOptions fillBuffers(List bufferList) { +extension AdvancedConfigInfoBufferExt on AdvancedConfigInfo { + AdvancedConfigInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -763,8 +744,9 @@ extension BeautyOptionsBufferExt on BeautyOptions { } } -extension LowlightEnhanceOptionsBufferExt on LowlightEnhanceOptions { - LowlightEnhanceOptions fillBuffers(List bufferList) { +extension LocalAccessPointConfigurationBufferExt + on LocalAccessPointConfiguration { + LocalAccessPointConfiguration fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -775,8 +757,8 @@ extension LowlightEnhanceOptionsBufferExt on LowlightEnhanceOptions { } } -extension VideoDenoiserOptionsBufferExt on VideoDenoiserOptions { - VideoDenoiserOptions fillBuffers(List bufferList) { +extension SpatialAudioParamsBufferExt on SpatialAudioParams { + SpatialAudioParams fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -787,8 +769,8 @@ extension VideoDenoiserOptionsBufferExt on VideoDenoiserOptions { } } -extension ColorEnhanceOptionsBufferExt on ColorEnhanceOptions { - ColorEnhanceOptions fillBuffers(List bufferList) { +extension AudioParametersBufferExt on AudioParameters { + AudioParameters fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -799,8 +781,8 @@ extension ColorEnhanceOptionsBufferExt on ColorEnhanceOptions { } } -extension VirtualBackgroundSourceBufferExt on VirtualBackgroundSource { - VirtualBackgroundSource fillBuffers(List bufferList) { +extension ContentInspectModuleBufferExt on ContentInspectModule { + ContentInspectModule fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -811,8 +793,8 @@ extension VirtualBackgroundSourceBufferExt on VirtualBackgroundSource { } } -extension SegmentationPropertyBufferExt on SegmentationProperty { - SegmentationProperty fillBuffers(List bufferList) { +extension ContentInspectConfigBufferExt on ContentInspectConfig { + ContentInspectConfig fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -823,8 +805,8 @@ extension SegmentationPropertyBufferExt on SegmentationProperty { } } -extension AudioTrackConfigBufferExt on AudioTrackConfig { - AudioTrackConfig fillBuffers(List bufferList) { +extension PacketOptionsBufferExt on PacketOptions { + PacketOptions fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -835,8 +817,8 @@ extension AudioTrackConfigBufferExt on AudioTrackConfig { } } -extension ScreenCaptureParametersBufferExt on ScreenCaptureParameters { - ScreenCaptureParameters fillBuffers(List bufferList) { +extension AudioEncodedFrameInfoBufferExt on AudioEncodedFrameInfo { + AudioEncodedFrameInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -847,8 +829,8 @@ extension ScreenCaptureParametersBufferExt on ScreenCaptureParameters { } } -extension AudioRecordingConfigurationBufferExt on AudioRecordingConfiguration { - AudioRecordingConfiguration fillBuffers(List bufferList) { +extension AudioPcmFrameBufferExt on AudioPcmFrame { + AudioPcmFrame fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -859,46 +841,159 @@ extension AudioRecordingConfigurationBufferExt on AudioRecordingConfiguration { } } -extension AudioEncodedFrameObserverConfigBufferExt - on AudioEncodedFrameObserverConfig { - AudioEncodedFrameObserverConfig fillBuffers(List bufferList) { +extension ExternalVideoFrameBufferExt on ExternalVideoFrame { + ExternalVideoFrame fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; - return this; + Uint8List? buffer; + if (bufferList.length > 0) { + buffer = bufferList[0]; + } + Uint8List? metadataBuffer; + if (bufferList.length > 1) { + metadataBuffer = bufferList[1]; + } + Uint8List? alphaBuffer; + if (bufferList.length > 2) { + alphaBuffer = bufferList[2]; + } + return ExternalVideoFrame( + type: type, + format: format, + buffer: buffer, + stride: stride, + height: height, + cropLeft: cropLeft, + cropTop: cropTop, + cropRight: cropRight, + cropBottom: cropBottom, + rotation: rotation, + timestamp: timestamp, + eglType: eglType, + textureId: textureId, + matrix: matrix, + metadataBuffer: metadataBuffer, + metadataSize: metadataSize, + alphaBuffer: alphaBuffer, + textureSliceIndex: textureSliceIndex); } List collectBufferList() { final bufferList = []; + if (buffer != null) { + bufferList.add(buffer!); + } + if (metadataBuffer != null) { + bufferList.add(metadataBuffer!); + } + if (alphaBuffer != null) { + bufferList.add(alphaBuffer!); + } return bufferList; } } -extension ChannelMediaInfoBufferExt on ChannelMediaInfo { - ChannelMediaInfo fillBuffers(List bufferList) { +extension VideoFrameBufferExt on VideoFrame { + VideoFrame fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; - return this; + Uint8List? yBuffer; + if (bufferList.length > 0) { + yBuffer = bufferList[0]; + } + Uint8List? uBuffer; + if (bufferList.length > 1) { + uBuffer = bufferList[1]; + } + Uint8List? vBuffer; + if (bufferList.length > 2) { + vBuffer = bufferList[2]; + } + Uint8List? metadataBuffer; + if (bufferList.length > 3) { + metadataBuffer = bufferList[3]; + } + Uint8List? alphaBuffer; + if (bufferList.length > 4) { + alphaBuffer = bufferList[4]; + } + Uint8List? pixelBuffer; + if (bufferList.length > 5) { + pixelBuffer = bufferList[5]; + } + return VideoFrame( + type: type, + width: width, + height: height, + yStride: yStride, + uStride: uStride, + vStride: vStride, + yBuffer: yBuffer, + uBuffer: uBuffer, + vBuffer: vBuffer, + rotation: rotation, + renderTimeMs: renderTimeMs, + avsyncType: avsyncType, + metadataBuffer: metadataBuffer, + metadataSize: metadataSize, + textureId: textureId, + matrix: matrix, + alphaBuffer: alphaBuffer, + pixelBuffer: pixelBuffer); } List collectBufferList() { final bufferList = []; + if (yBuffer != null) { + bufferList.add(yBuffer!); + } + if (uBuffer != null) { + bufferList.add(uBuffer!); + } + if (vBuffer != null) { + bufferList.add(vBuffer!); + } + if (metadataBuffer != null) { + bufferList.add(metadataBuffer!); + } + if (alphaBuffer != null) { + bufferList.add(alphaBuffer!); + } + if (pixelBuffer != null) { + bufferList.add(pixelBuffer!); + } return bufferList; } } -extension ChannelMediaRelayConfigurationBufferExt - on ChannelMediaRelayConfiguration { - ChannelMediaRelayConfiguration fillBuffers(List bufferList) { +extension AudioFrameBufferExt on AudioFrame { + AudioFrame fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; - return this; + Uint8List? buffer; + if (bufferList.length > 0) { + buffer = bufferList[0]; + } + return AudioFrame( + type: type, + samplesPerChannel: samplesPerChannel, + bytesPerSample: bytesPerSample, + channels: channels, + samplesPerSec: samplesPerSec, + buffer: buffer, + renderTimeMs: renderTimeMs, + avsyncType: avsyncType, + presentationMs: presentationMs); } List collectBufferList() { final bufferList = []; + if (buffer != null) { + bufferList.add(buffer!); + } return bufferList; } } -extension UplinkNetworkInfoBufferExt on UplinkNetworkInfo { - UplinkNetworkInfo fillBuffers(List bufferList) { +extension AudioParamsBufferExt on AudioParams { + AudioParams fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -909,8 +1004,8 @@ extension UplinkNetworkInfoBufferExt on UplinkNetworkInfo { } } -extension DownlinkNetworkInfoBufferExt on DownlinkNetworkInfo { - DownlinkNetworkInfo fillBuffers(List bufferList) { +extension AudioSpectrumDataBufferExt on AudioSpectrumData { + AudioSpectrumData fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -921,8 +1016,8 @@ extension DownlinkNetworkInfoBufferExt on DownlinkNetworkInfo { } } -extension PeerDownlinkInfoBufferExt on PeerDownlinkInfo { - PeerDownlinkInfo fillBuffers(List bufferList) { +extension UserAudioSpectrumInfoBufferExt on UserAudioSpectrumInfo { + UserAudioSpectrumInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -933,30 +1028,20 @@ extension PeerDownlinkInfoBufferExt on PeerDownlinkInfo { } } -extension EncryptionConfigBufferExt on EncryptionConfig { - EncryptionConfig fillBuffers(List bufferList) { +extension MediaRecorderConfigurationBufferExt on MediaRecorderConfiguration { + MediaRecorderConfiguration fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; - Uint8List? encryptionKdfSalt; - if (bufferList.length > 0) { - encryptionKdfSalt = bufferList[0]; - } - return EncryptionConfig( - encryptionMode: encryptionMode, - encryptionKey: encryptionKey, - encryptionKdfSalt: encryptionKdfSalt); + return this; } List collectBufferList() { final bufferList = []; - if (encryptionKdfSalt != null) { - bufferList.add(encryptionKdfSalt!); - } return bufferList; } } -extension EchoTestConfigurationBufferExt on EchoTestConfiguration { - EchoTestConfiguration fillBuffers(List bufferList) { +extension RecorderInfoBufferExt on RecorderInfo { + RecorderInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -967,8 +1052,8 @@ extension EchoTestConfigurationBufferExt on EchoTestConfiguration { } } -extension UserInfoBufferExt on UserInfo { - UserInfo fillBuffers(List bufferList) { +extension PlayerStreamInfoBufferExt on PlayerStreamInfo { + PlayerStreamInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -979,8 +1064,8 @@ extension UserInfoBufferExt on UserInfo { } } -extension ScreenVideoParametersBufferExt on ScreenVideoParameters { - ScreenVideoParameters fillBuffers(List bufferList) { +extension SrcInfoBufferExt on SrcInfo { + SrcInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -991,8 +1076,8 @@ extension ScreenVideoParametersBufferExt on ScreenVideoParameters { } } -extension ScreenAudioParametersBufferExt on ScreenAudioParameters { - ScreenAudioParameters fillBuffers(List bufferList) { +extension CacheStatisticsBufferExt on CacheStatistics { + CacheStatistics fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1003,8 +1088,8 @@ extension ScreenAudioParametersBufferExt on ScreenAudioParameters { } } -extension ScreenCaptureParameters2BufferExt on ScreenCaptureParameters2 { - ScreenCaptureParameters2 fillBuffers(List bufferList) { +extension PlayerUpdatedInfoBufferExt on PlayerUpdatedInfo { + PlayerUpdatedInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1015,8 +1100,8 @@ extension ScreenCaptureParameters2BufferExt on ScreenCaptureParameters2 { } } -extension VideoRenderingTracingInfoBufferExt on VideoRenderingTracingInfo { - VideoRenderingTracingInfo fillBuffers(List bufferList) { +extension MediaSourceBufferExt on MediaSource { + MediaSource fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1027,8 +1112,8 @@ extension VideoRenderingTracingInfoBufferExt on VideoRenderingTracingInfo { } } -extension RecorderStreamInfoBufferExt on RecorderStreamInfo { - RecorderStreamInfo fillBuffers(List bufferList) { +extension LogConfigBufferExt on LogConfig { + LogConfig fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1039,20 +1124,32 @@ extension RecorderStreamInfoBufferExt on RecorderStreamInfo { } } -extension LogUploadServerInfoBufferExt on LogUploadServerInfo { - LogUploadServerInfo fillBuffers(List bufferList) { +extension InputSeiDataBufferExt on InputSeiData { + InputSeiData fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; - return this; + Uint8List? privateData; + if (bufferList.length > 0) { + privateData = bufferList[0]; + } + return InputSeiData( + type: type, + timestamp: timestamp, + frameIndex: frameIndex, + privateData: privateData, + dataSize: dataSize); } List collectBufferList() { final bufferList = []; + if (privateData != null) { + bufferList.add(privateData!); + } return bufferList; } } -extension AdvancedConfigInfoBufferExt on AdvancedConfigInfo { - AdvancedConfigInfo fillBuffers(List bufferList) { +extension MusicChartInfoBufferExt on MusicChartInfo { + MusicChartInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1063,9 +1160,8 @@ extension AdvancedConfigInfoBufferExt on AdvancedConfigInfo { } } -extension LocalAccessPointConfigurationBufferExt - on LocalAccessPointConfiguration { - LocalAccessPointConfiguration fillBuffers(List bufferList) { +extension MusicCacheInfoBufferExt on MusicCacheInfo { + MusicCacheInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1076,8 +1172,8 @@ extension LocalAccessPointConfigurationBufferExt } } -extension SpatialAudioParamsBufferExt on SpatialAudioParams { - SpatialAudioParams fillBuffers(List bufferList) { +extension MvPropertyBufferExt on MvProperty { + MvProperty fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1088,8 +1184,8 @@ extension SpatialAudioParamsBufferExt on SpatialAudioParams { } } -extension AudioParametersBufferExt on AudioParameters { - AudioParameters fillBuffers(List bufferList) { +extension ClimaxSegmentBufferExt on ClimaxSegment { + ClimaxSegment fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1100,8 +1196,8 @@ extension AudioParametersBufferExt on AudioParameters { } } -extension ContentInspectModuleBufferExt on ContentInspectModule { - ContentInspectModule fillBuffers(List bufferList) { +extension MusicBufferExt on Music { + Music fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1112,8 +1208,9 @@ extension ContentInspectModuleBufferExt on ContentInspectModule { } } -extension ContentInspectConfigBufferExt on ContentInspectConfig { - ContentInspectConfig fillBuffers(List bufferList) { +extension MusicContentCenterConfigurationBufferExt + on MusicContentCenterConfiguration { + MusicContentCenterConfiguration fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1124,8 +1221,8 @@ extension ContentInspectConfigBufferExt on ContentInspectConfig { } } -extension PacketOptionsBufferExt on PacketOptions { - PacketOptions fillBuffers(List bufferList) { +extension AgoraRhythmPlayerConfigBufferExt on AgoraRhythmPlayerConfig { + AgoraRhythmPlayerConfig fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1136,8 +1233,8 @@ extension PacketOptionsBufferExt on PacketOptions { } } -extension AudioEncodedFrameInfoBufferExt on AudioEncodedFrameInfo { - AudioEncodedFrameInfo fillBuffers(List bufferList) { +extension LocalVideoStatsBufferExt on LocalVideoStats { + LocalVideoStats fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1148,8 +1245,8 @@ extension AudioEncodedFrameInfoBufferExt on AudioEncodedFrameInfo { } } -extension AudioPcmFrameBufferExt on AudioPcmFrame { - AudioPcmFrame fillBuffers(List bufferList) { +extension RemoteAudioStatsBufferExt on RemoteAudioStats { + RemoteAudioStats fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1160,158 +1257,58 @@ extension AudioPcmFrameBufferExt on AudioPcmFrame { } } -extension ExternalVideoFrameBufferExt on ExternalVideoFrame { - ExternalVideoFrame fillBuffers(List bufferList) { +extension RemoteVideoStatsBufferExt on RemoteVideoStats { + RemoteVideoStats fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; - Uint8List? buffer; - if (bufferList.length > 0) { - buffer = bufferList[0]; - } - Uint8List? metadataBuffer; - if (bufferList.length > 1) { - metadataBuffer = bufferList[1]; - } - Uint8List? alphaBuffer; - if (bufferList.length > 2) { - alphaBuffer = bufferList[2]; - } - return ExternalVideoFrame( - type: type, - format: format, - buffer: buffer, - stride: stride, - height: height, - cropLeft: cropLeft, - cropTop: cropTop, - cropRight: cropRight, - cropBottom: cropBottom, - rotation: rotation, - timestamp: timestamp, - eglType: eglType, - textureId: textureId, - matrix: matrix, - metadataBuffer: metadataBuffer, - metadataSize: metadataSize, - alphaBuffer: alphaBuffer); + return this; } List collectBufferList() { final bufferList = []; - if (buffer != null) { - bufferList.add(buffer!); - } - if (metadataBuffer != null) { - bufferList.add(metadataBuffer!); - } - if (alphaBuffer != null) { - bufferList.add(alphaBuffer!); - } return bufferList; } } -extension VideoFrameBufferExt on VideoFrame { - VideoFrame fillBuffers(List bufferList) { +extension VideoCompositingLayoutBufferExt on VideoCompositingLayout { + VideoCompositingLayout fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; - Uint8List? yBuffer; + Uint8List? appData; if (bufferList.length > 0) { - yBuffer = bufferList[0]; - } - Uint8List? uBuffer; - if (bufferList.length > 1) { - uBuffer = bufferList[1]; - } - Uint8List? vBuffer; - if (bufferList.length > 2) { - vBuffer = bufferList[2]; - } - Uint8List? metadataBuffer; - if (bufferList.length > 3) { - metadataBuffer = bufferList[3]; - } - Uint8List? alphaBuffer; - if (bufferList.length > 4) { - alphaBuffer = bufferList[4]; - } - Uint8List? pixelBuffer; - if (bufferList.length > 5) { - pixelBuffer = bufferList[5]; + appData = bufferList[0]; } - return VideoFrame( - type: type, - width: width, - height: height, - yStride: yStride, - uStride: uStride, - vStride: vStride, - yBuffer: yBuffer, - uBuffer: uBuffer, - vBuffer: vBuffer, - rotation: rotation, - renderTimeMs: renderTimeMs, - avsyncType: avsyncType, - metadataBuffer: metadataBuffer, - metadataSize: metadataSize, - textureId: textureId, - matrix: matrix, - alphaBuffer: alphaBuffer, - pixelBuffer: pixelBuffer); + return VideoCompositingLayout( + canvasWidth: canvasWidth, + canvasHeight: canvasHeight, + backgroundColor: backgroundColor, + regions: regions, + regionCount: regionCount, + appData: appData, + appDataLength: appDataLength); } List collectBufferList() { final bufferList = []; - if (yBuffer != null) { - bufferList.add(yBuffer!); - } - if (uBuffer != null) { - bufferList.add(uBuffer!); - } - if (vBuffer != null) { - bufferList.add(vBuffer!); - } - if (metadataBuffer != null) { - bufferList.add(metadataBuffer!); - } - if (alphaBuffer != null) { - bufferList.add(alphaBuffer!); - } - if (pixelBuffer != null) { - bufferList.add(pixelBuffer!); + if (appData != null) { + bufferList.add(appData!); } return bufferList; } } -extension AudioFrameBufferExt on AudioFrame { - AudioFrame fillBuffers(List bufferList) { +extension RegionBufferExt on Region { + Region fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; - Uint8List? buffer; - if (bufferList.length > 0) { - buffer = bufferList[0]; - } - return AudioFrame( - type: type, - samplesPerChannel: samplesPerChannel, - bytesPerSample: bytesPerSample, - channels: channels, - samplesPerSec: samplesPerSec, - buffer: buffer, - renderTimeMs: renderTimeMs, - avsyncType: avsyncType, - presentationMs: presentationMs); + return this; } List collectBufferList() { final bufferList = []; - if (buffer != null) { - bufferList.add(buffer!); - } return bufferList; } } -extension AudioParamsBufferExt on AudioParams { - AudioParams fillBuffers(List bufferList) { +extension InjectStreamConfigBufferExt on InjectStreamConfig { + InjectStreamConfig fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1322,8 +1319,8 @@ extension AudioParamsBufferExt on AudioParams { } } -extension AudioSpectrumDataBufferExt on AudioSpectrumData { - AudioSpectrumData fillBuffers(List bufferList) { +extension PublisherConfigurationBufferExt on PublisherConfiguration { + PublisherConfiguration fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1334,8 +1331,8 @@ extension AudioSpectrumDataBufferExt on AudioSpectrumData { } } -extension UserAudioSpectrumInfoBufferExt on UserAudioSpectrumInfo { - UserAudioSpectrumInfo fillBuffers(List bufferList) { +extension CameraCapturerConfigurationBufferExt on CameraCapturerConfiguration { + CameraCapturerConfiguration fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1346,8 +1343,8 @@ extension UserAudioSpectrumInfoBufferExt on UserAudioSpectrumInfo { } } -extension MediaRecorderConfigurationBufferExt on MediaRecorderConfiguration { - MediaRecorderConfiguration fillBuffers(List bufferList) { +extension ScreenCaptureConfigurationBufferExt on ScreenCaptureConfiguration { + ScreenCaptureConfiguration fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1358,8 +1355,8 @@ extension MediaRecorderConfigurationBufferExt on MediaRecorderConfiguration { } } -extension RecorderInfoBufferExt on RecorderInfo { - RecorderInfo fillBuffers(List bufferList) { +extension SIZEBufferExt on SIZE { + SIZE fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1370,20 +1367,28 @@ extension RecorderInfoBufferExt on RecorderInfo { } } -extension PlayerStreamInfoBufferExt on PlayerStreamInfo { - PlayerStreamInfo fillBuffers(List bufferList) { +extension ThumbImageBufferBufferExt on ThumbImageBuffer { + ThumbImageBuffer fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; - return this; + Uint8List? buffer; + if (bufferList.length > 0) { + buffer = bufferList[0]; + } + return ThumbImageBuffer( + buffer: buffer, length: length, width: width, height: height); } List collectBufferList() { final bufferList = []; + if (buffer != null) { + bufferList.add(buffer!); + } return bufferList; } } -extension SrcInfoBufferExt on SrcInfo { - SrcInfo fillBuffers(List bufferList) { +extension ScreenCaptureSourceInfoBufferExt on ScreenCaptureSourceInfo { + ScreenCaptureSourceInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1394,8 +1399,8 @@ extension SrcInfoBufferExt on SrcInfo { } } -extension CacheStatisticsBufferExt on CacheStatistics { - CacheStatistics fillBuffers(List bufferList) { +extension AdvancedAudioOptionsBufferExt on AdvancedAudioOptions { + AdvancedAudioOptions fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1406,8 +1411,8 @@ extension CacheStatisticsBufferExt on CacheStatistics { } } -extension PlayerUpdatedInfoBufferExt on PlayerUpdatedInfo { - PlayerUpdatedInfo fillBuffers(List bufferList) { +extension ImageTrackOptionsBufferExt on ImageTrackOptions { + ImageTrackOptions fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1418,8 +1423,8 @@ extension PlayerUpdatedInfoBufferExt on PlayerUpdatedInfo { } } -extension MediaSourceBufferExt on MediaSource { - MediaSource fillBuffers(List bufferList) { +extension ChannelMediaOptionsBufferExt on ChannelMediaOptions { + ChannelMediaOptions fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1430,8 +1435,8 @@ extension MediaSourceBufferExt on MediaSource { } } -extension LogConfigBufferExt on LogConfig { - LogConfig fillBuffers(List bufferList) { +extension LeaveChannelOptionsBufferExt on LeaveChannelOptions { + LeaveChannelOptions fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1442,44 +1447,40 @@ extension LogConfigBufferExt on LogConfig { } } -extension InputSeiDataBufferExt on InputSeiData { - InputSeiData fillBuffers(List bufferList) { +extension RtcEngineContextBufferExt on RtcEngineContext { + RtcEngineContext fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; - Uint8List? privateData; - if (bufferList.length > 0) { - privateData = bufferList[0]; - } - return InputSeiData( - type: type, - timestamp: timestamp, - frameIndex: frameIndex, - privateData: privateData, - dataSize: dataSize); + return this; } List collectBufferList() { final bufferList = []; - if (privateData != null) { - bufferList.add(privateData!); - } return bufferList; } } -extension RemoteVoicePositionInfoBufferExt on RemoteVoicePositionInfo { - RemoteVoicePositionInfo fillBuffers(List bufferList) { +extension MetadataBufferExt on Metadata { + Metadata fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; - return this; + Uint8List? buffer; + if (bufferList.length > 0) { + buffer = bufferList[0]; + } + return Metadata( + uid: uid, size: size, buffer: buffer, timeStampMs: timeStampMs); } List collectBufferList() { final bufferList = []; + if (buffer != null) { + bufferList.add(buffer!); + } return bufferList; } } -extension SpatialAudioZoneBufferExt on SpatialAudioZone { - SpatialAudioZone fillBuffers(List bufferList) { +extension DirectCdnStreamingStatsBufferExt on DirectCdnStreamingStats { + DirectCdnStreamingStats fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1490,8 +1491,9 @@ extension SpatialAudioZoneBufferExt on SpatialAudioZone { } } -extension RtcConnectionBufferExt on RtcConnection { - RtcConnection fillBuffers(List bufferList) { +extension DirectCdnStreamingMediaOptionsBufferExt + on DirectCdnStreamingMediaOptions { + DirectCdnStreamingMediaOptions fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1502,8 +1504,8 @@ extension RtcConnectionBufferExt on RtcConnection { } } -extension AgoraRhythmPlayerConfigBufferExt on AgoraRhythmPlayerConfig { - AgoraRhythmPlayerConfig fillBuffers(List bufferList) { +extension ExtensionInfoBufferExt on ExtensionInfo { + ExtensionInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1514,8 +1516,8 @@ extension AgoraRhythmPlayerConfigBufferExt on AgoraRhythmPlayerConfig { } } -extension MusicChartInfoBufferExt on MusicChartInfo { - MusicChartInfo fillBuffers(List bufferList) { +extension SDKBuildInfoBufferExt on SDKBuildInfo { + SDKBuildInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1526,8 +1528,8 @@ extension MusicChartInfoBufferExt on MusicChartInfo { } } -extension MusicCacheInfoBufferExt on MusicCacheInfo { - MusicCacheInfo fillBuffers(List bufferList) { +extension VideoDeviceInfoBufferExt on VideoDeviceInfo { + VideoDeviceInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1538,8 +1540,8 @@ extension MusicCacheInfoBufferExt on MusicCacheInfo { } } -extension MvPropertyBufferExt on MvProperty { - MvProperty fillBuffers(List bufferList) { +extension AudioDeviceInfoBufferExt on AudioDeviceInfo { + AudioDeviceInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1550,8 +1552,8 @@ extension MvPropertyBufferExt on MvProperty { } } -extension ClimaxSegmentBufferExt on ClimaxSegment { - ClimaxSegment fillBuffers(List bufferList) { +extension RtcConnectionBufferExt on RtcConnection { + RtcConnection fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1562,8 +1564,8 @@ extension ClimaxSegmentBufferExt on ClimaxSegment { } } -extension MusicBufferExt on Music { - Music fillBuffers(List bufferList) { +extension RemoteVoicePositionInfoBufferExt on RemoteVoicePositionInfo { + RemoteVoicePositionInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1574,9 +1576,8 @@ extension MusicBufferExt on Music { } } -extension MusicContentCenterConfigurationBufferExt - on MusicContentCenterConfiguration { - MusicContentCenterConfiguration fillBuffers(List bufferList) { +extension SpatialAudioZoneBufferExt on SpatialAudioZone { + SpatialAudioZone fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } diff --git a/lib/src/binding/call_api_impl_params_json.dart b/lib/src/binding/call_api_impl_params_json.dart index 9f2e2598a..4ec4cb684 100644 --- a/lib/src/binding/call_api_impl_params_json.dart +++ b/lib/src/binding/call_api_impl_params_json.dart @@ -4,6 +4,198 @@ import 'package:agora_rtc_engine/src/binding_forward_export.dart'; part 'call_api_impl_params_json.g.dart'; +@JsonSerializable(explicitToJson: true) +class MediaPlayerGetDurationJson { + const MediaPlayerGetDurationJson(this.duration); + + @JsonKey(name: 'duration') + final int duration; + factory MediaPlayerGetDurationJson.fromJson(Map json) => + _$MediaPlayerGetDurationJsonFromJson(json); + Map toJson() => _$MediaPlayerGetDurationJsonToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class MediaPlayerGetPlayPositionJson { + const MediaPlayerGetPlayPositionJson(this.pos); + + @JsonKey(name: 'pos') + final int pos; + factory MediaPlayerGetPlayPositionJson.fromJson(Map json) => + _$MediaPlayerGetPlayPositionJsonFromJson(json); + Map toJson() => _$MediaPlayerGetPlayPositionJsonToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class MediaPlayerGetStreamCountJson { + const MediaPlayerGetStreamCountJson(this.count); + + @JsonKey(name: 'count') + final int count; + factory MediaPlayerGetStreamCountJson.fromJson(Map json) => + _$MediaPlayerGetStreamCountJsonFromJson(json); + Map toJson() => _$MediaPlayerGetStreamCountJsonToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class MediaPlayerGetStreamInfoJson { + const MediaPlayerGetStreamInfoJson(this.info); + + @JsonKey(name: 'info') + final PlayerStreamInfo info; + factory MediaPlayerGetStreamInfoJson.fromJson(Map json) => + _$MediaPlayerGetStreamInfoJsonFromJson(json); + Map toJson() => _$MediaPlayerGetStreamInfoJsonToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class MediaPlayerGetMuteJson { + const MediaPlayerGetMuteJson(this.muted); + + @JsonKey(name: 'muted') + final bool muted; + factory MediaPlayerGetMuteJson.fromJson(Map json) => + _$MediaPlayerGetMuteJsonFromJson(json); + Map toJson() => _$MediaPlayerGetMuteJsonToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class MediaPlayerGetPlayoutVolumeJson { + const MediaPlayerGetPlayoutVolumeJson(this.volume); + + @JsonKey(name: 'volume') + final int volume; + factory MediaPlayerGetPlayoutVolumeJson.fromJson(Map json) => + _$MediaPlayerGetPlayoutVolumeJsonFromJson(json); + Map toJson() => + _$MediaPlayerGetPlayoutVolumeJsonToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class MediaPlayerGetPublishSignalVolumeJson { + const MediaPlayerGetPublishSignalVolumeJson(this.volume); + + @JsonKey(name: 'volume') + final int volume; + factory MediaPlayerGetPublishSignalVolumeJson.fromJson( + Map json) => + _$MediaPlayerGetPublishSignalVolumeJsonFromJson(json); + Map toJson() => + _$MediaPlayerGetPublishSignalVolumeJsonToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class MediaPlayerCacheManagerGetCacheDirJson { + const MediaPlayerCacheManagerGetCacheDirJson(this.path); + + @JsonKey(name: 'path') + final String path; + factory MediaPlayerCacheManagerGetCacheDirJson.fromJson( + Map json) => + _$MediaPlayerCacheManagerGetCacheDirJsonFromJson(json); + Map toJson() => + _$MediaPlayerCacheManagerGetCacheDirJsonToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class MusicContentCenterGetMusicChartsJson { + const MusicContentCenterGetMusicChartsJson(this.requestId); + + @JsonKey(name: 'requestId') + final String requestId; + factory MusicContentCenterGetMusicChartsJson.fromJson( + Map json) => + _$MusicContentCenterGetMusicChartsJsonFromJson(json); + Map toJson() => + _$MusicContentCenterGetMusicChartsJsonToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class MusicContentCenterGetMusicCollectionByMusicChartIdJson { + const MusicContentCenterGetMusicCollectionByMusicChartIdJson(this.requestId); + + @JsonKey(name: 'requestId') + final String requestId; + factory MusicContentCenterGetMusicCollectionByMusicChartIdJson.fromJson( + Map json) => + _$MusicContentCenterGetMusicCollectionByMusicChartIdJsonFromJson(json); + Map toJson() => + _$MusicContentCenterGetMusicCollectionByMusicChartIdJsonToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class MusicContentCenterSearchMusicJson { + const MusicContentCenterSearchMusicJson(this.requestId); + + @JsonKey(name: 'requestId') + final String requestId; + factory MusicContentCenterSearchMusicJson.fromJson( + Map json) => + _$MusicContentCenterSearchMusicJsonFromJson(json); + Map toJson() => + _$MusicContentCenterSearchMusicJsonToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class MusicContentCenterPreloadJson { + const MusicContentCenterPreloadJson(this.requestId); + + @JsonKey(name: 'requestId') + final String requestId; + factory MusicContentCenterPreloadJson.fromJson(Map json) => + _$MusicContentCenterPreloadJsonFromJson(json); + Map toJson() => _$MusicContentCenterPreloadJsonToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class MusicContentCenterGetCachesJson { + const MusicContentCenterGetCachesJson(this.cacheInfo); + + @JsonKey(name: 'cacheInfo') + final List cacheInfo; + factory MusicContentCenterGetCachesJson.fromJson(Map json) => + _$MusicContentCenterGetCachesJsonFromJson(json); + Map toJson() => + _$MusicContentCenterGetCachesJsonToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class MusicContentCenterGetLyricJson { + const MusicContentCenterGetLyricJson(this.requestId); + + @JsonKey(name: 'requestId') + final String requestId; + factory MusicContentCenterGetLyricJson.fromJson(Map json) => + _$MusicContentCenterGetLyricJsonFromJson(json); + Map toJson() => _$MusicContentCenterGetLyricJsonToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class MusicContentCenterGetSongSimpleInfoJson { + const MusicContentCenterGetSongSimpleInfoJson(this.requestId); + + @JsonKey(name: 'requestId') + final String requestId; + factory MusicContentCenterGetSongSimpleInfoJson.fromJson( + Map json) => + _$MusicContentCenterGetSongSimpleInfoJsonFromJson(json); + Map toJson() => + _$MusicContentCenterGetSongSimpleInfoJsonToJson(this); +} + +@JsonSerializable(explicitToJson: true) +class MusicContentCenterGetInternalSongCodeJson { + const MusicContentCenterGetInternalSongCodeJson(this.internalSongCode); + + @JsonKey(name: 'internalSongCode') + final int internalSongCode; + factory MusicContentCenterGetInternalSongCodeJson.fromJson( + Map json) => + _$MusicContentCenterGetInternalSongCodeJsonFromJson(json); + Map toJson() => + _$MusicContentCenterGetInternalSongCodeJsonToJson(this); +} + @JsonSerializable(explicitToJson: true) class VideoDeviceManagerGetDeviceJson { const VideoDeviceManagerGetDeviceJson(this.deviceIdUTF8); @@ -124,99 +316,6 @@ class RtcEngineGetUserInfoByUidJson { Map toJson() => _$RtcEngineGetUserInfoByUidJsonToJson(this); } -@JsonSerializable(explicitToJson: true) -class MediaPlayerGetDurationJson { - const MediaPlayerGetDurationJson(this.duration); - - @JsonKey(name: 'duration') - final int duration; - factory MediaPlayerGetDurationJson.fromJson(Map json) => - _$MediaPlayerGetDurationJsonFromJson(json); - Map toJson() => _$MediaPlayerGetDurationJsonToJson(this); -} - -@JsonSerializable(explicitToJson: true) -class MediaPlayerGetPlayPositionJson { - const MediaPlayerGetPlayPositionJson(this.pos); - - @JsonKey(name: 'pos') - final int pos; - factory MediaPlayerGetPlayPositionJson.fromJson(Map json) => - _$MediaPlayerGetPlayPositionJsonFromJson(json); - Map toJson() => _$MediaPlayerGetPlayPositionJsonToJson(this); -} - -@JsonSerializable(explicitToJson: true) -class MediaPlayerGetStreamCountJson { - const MediaPlayerGetStreamCountJson(this.count); - - @JsonKey(name: 'count') - final int count; - factory MediaPlayerGetStreamCountJson.fromJson(Map json) => - _$MediaPlayerGetStreamCountJsonFromJson(json); - Map toJson() => _$MediaPlayerGetStreamCountJsonToJson(this); -} - -@JsonSerializable(explicitToJson: true) -class MediaPlayerGetStreamInfoJson { - const MediaPlayerGetStreamInfoJson(this.info); - - @JsonKey(name: 'info') - final PlayerStreamInfo info; - factory MediaPlayerGetStreamInfoJson.fromJson(Map json) => - _$MediaPlayerGetStreamInfoJsonFromJson(json); - Map toJson() => _$MediaPlayerGetStreamInfoJsonToJson(this); -} - -@JsonSerializable(explicitToJson: true) -class MediaPlayerGetMuteJson { - const MediaPlayerGetMuteJson(this.muted); - - @JsonKey(name: 'muted') - final bool muted; - factory MediaPlayerGetMuteJson.fromJson(Map json) => - _$MediaPlayerGetMuteJsonFromJson(json); - Map toJson() => _$MediaPlayerGetMuteJsonToJson(this); -} - -@JsonSerializable(explicitToJson: true) -class MediaPlayerGetPlayoutVolumeJson { - const MediaPlayerGetPlayoutVolumeJson(this.volume); - - @JsonKey(name: 'volume') - final int volume; - factory MediaPlayerGetPlayoutVolumeJson.fromJson(Map json) => - _$MediaPlayerGetPlayoutVolumeJsonFromJson(json); - Map toJson() => - _$MediaPlayerGetPlayoutVolumeJsonToJson(this); -} - -@JsonSerializable(explicitToJson: true) -class MediaPlayerGetPublishSignalVolumeJson { - const MediaPlayerGetPublishSignalVolumeJson(this.volume); - - @JsonKey(name: 'volume') - final int volume; - factory MediaPlayerGetPublishSignalVolumeJson.fromJson( - Map json) => - _$MediaPlayerGetPublishSignalVolumeJsonFromJson(json); - Map toJson() => - _$MediaPlayerGetPublishSignalVolumeJsonToJson(this); -} - -@JsonSerializable(explicitToJson: true) -class MediaPlayerCacheManagerGetCacheDirJson { - const MediaPlayerCacheManagerGetCacheDirJson(this.path); - - @JsonKey(name: 'path') - final String path; - factory MediaPlayerCacheManagerGetCacheDirJson.fromJson( - Map json) => - _$MediaPlayerCacheManagerGetCacheDirJsonFromJson(json); - Map toJson() => - _$MediaPlayerCacheManagerGetCacheDirJsonToJson(this); -} - @JsonSerializable(explicitToJson: true) class RtcEngineExCreateDataStreamExJson { const RtcEngineExCreateDataStreamExJson(this.streamId); @@ -346,102 +445,3 @@ class AudioDeviceManagerGetRecordingDeviceMuteJson { Map toJson() => _$AudioDeviceManagerGetRecordingDeviceMuteJsonToJson(this); } - -@JsonSerializable(explicitToJson: true) -class MusicContentCenterGetMusicChartsJson { - const MusicContentCenterGetMusicChartsJson(this.requestId); - - @JsonKey(name: 'requestId') - final String requestId; - factory MusicContentCenterGetMusicChartsJson.fromJson( - Map json) => - _$MusicContentCenterGetMusicChartsJsonFromJson(json); - Map toJson() => - _$MusicContentCenterGetMusicChartsJsonToJson(this); -} - -@JsonSerializable(explicitToJson: true) -class MusicContentCenterGetMusicCollectionByMusicChartIdJson { - const MusicContentCenterGetMusicCollectionByMusicChartIdJson(this.requestId); - - @JsonKey(name: 'requestId') - final String requestId; - factory MusicContentCenterGetMusicCollectionByMusicChartIdJson.fromJson( - Map json) => - _$MusicContentCenterGetMusicCollectionByMusicChartIdJsonFromJson(json); - Map toJson() => - _$MusicContentCenterGetMusicCollectionByMusicChartIdJsonToJson(this); -} - -@JsonSerializable(explicitToJson: true) -class MusicContentCenterSearchMusicJson { - const MusicContentCenterSearchMusicJson(this.requestId); - - @JsonKey(name: 'requestId') - final String requestId; - factory MusicContentCenterSearchMusicJson.fromJson( - Map json) => - _$MusicContentCenterSearchMusicJsonFromJson(json); - Map toJson() => - _$MusicContentCenterSearchMusicJsonToJson(this); -} - -@JsonSerializable(explicitToJson: true) -class MusicContentCenterPreloadJson { - const MusicContentCenterPreloadJson(this.requestId); - - @JsonKey(name: 'requestId') - final String requestId; - factory MusicContentCenterPreloadJson.fromJson(Map json) => - _$MusicContentCenterPreloadJsonFromJson(json); - Map toJson() => _$MusicContentCenterPreloadJsonToJson(this); -} - -@JsonSerializable(explicitToJson: true) -class MusicContentCenterGetCachesJson { - const MusicContentCenterGetCachesJson(this.cacheInfo); - - @JsonKey(name: 'cacheInfo') - final List cacheInfo; - factory MusicContentCenterGetCachesJson.fromJson(Map json) => - _$MusicContentCenterGetCachesJsonFromJson(json); - Map toJson() => - _$MusicContentCenterGetCachesJsonToJson(this); -} - -@JsonSerializable(explicitToJson: true) -class MusicContentCenterGetLyricJson { - const MusicContentCenterGetLyricJson(this.requestId); - - @JsonKey(name: 'requestId') - final String requestId; - factory MusicContentCenterGetLyricJson.fromJson(Map json) => - _$MusicContentCenterGetLyricJsonFromJson(json); - Map toJson() => _$MusicContentCenterGetLyricJsonToJson(this); -} - -@JsonSerializable(explicitToJson: true) -class MusicContentCenterGetSongSimpleInfoJson { - const MusicContentCenterGetSongSimpleInfoJson(this.requestId); - - @JsonKey(name: 'requestId') - final String requestId; - factory MusicContentCenterGetSongSimpleInfoJson.fromJson( - Map json) => - _$MusicContentCenterGetSongSimpleInfoJsonFromJson(json); - Map toJson() => - _$MusicContentCenterGetSongSimpleInfoJsonToJson(this); -} - -@JsonSerializable(explicitToJson: true) -class MusicContentCenterGetInternalSongCodeJson { - const MusicContentCenterGetInternalSongCodeJson(this.internalSongCode); - - @JsonKey(name: 'internalSongCode') - final int internalSongCode; - factory MusicContentCenterGetInternalSongCodeJson.fromJson( - Map json) => - _$MusicContentCenterGetInternalSongCodeJsonFromJson(json); - Map toJson() => - _$MusicContentCenterGetInternalSongCodeJsonToJson(this); -} 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 bd061724d..0c25d1dd3 100644 --- a/lib/src/binding/call_api_impl_params_json.g.dart +++ b/lib/src/binding/call_api_impl_params_json.g.dart @@ -8,6 +8,206 @@ part of 'call_api_impl_params_json.dart'; // JsonSerializableGenerator // ************************************************************************** +MediaPlayerGetDurationJson _$MediaPlayerGetDurationJsonFromJson( + Map json) => + MediaPlayerGetDurationJson( + json['duration'] as int, + ); + +Map _$MediaPlayerGetDurationJsonToJson( + MediaPlayerGetDurationJson instance) => + { + 'duration': instance.duration, + }; + +MediaPlayerGetPlayPositionJson _$MediaPlayerGetPlayPositionJsonFromJson( + Map json) => + MediaPlayerGetPlayPositionJson( + json['pos'] as int, + ); + +Map _$MediaPlayerGetPlayPositionJsonToJson( + MediaPlayerGetPlayPositionJson instance) => + { + 'pos': instance.pos, + }; + +MediaPlayerGetStreamCountJson _$MediaPlayerGetStreamCountJsonFromJson( + Map json) => + MediaPlayerGetStreamCountJson( + json['count'] as int, + ); + +Map _$MediaPlayerGetStreamCountJsonToJson( + MediaPlayerGetStreamCountJson instance) => + { + 'count': instance.count, + }; + +MediaPlayerGetStreamInfoJson _$MediaPlayerGetStreamInfoJsonFromJson( + Map json) => + MediaPlayerGetStreamInfoJson( + PlayerStreamInfo.fromJson(json['info'] as Map), + ); + +Map _$MediaPlayerGetStreamInfoJsonToJson( + MediaPlayerGetStreamInfoJson instance) => + { + 'info': instance.info.toJson(), + }; + +MediaPlayerGetMuteJson _$MediaPlayerGetMuteJsonFromJson( + Map json) => + MediaPlayerGetMuteJson( + json['muted'] as bool, + ); + +Map _$MediaPlayerGetMuteJsonToJson( + MediaPlayerGetMuteJson instance) => + { + 'muted': instance.muted, + }; + +MediaPlayerGetPlayoutVolumeJson _$MediaPlayerGetPlayoutVolumeJsonFromJson( + Map json) => + MediaPlayerGetPlayoutVolumeJson( + json['volume'] as int, + ); + +Map _$MediaPlayerGetPlayoutVolumeJsonToJson( + MediaPlayerGetPlayoutVolumeJson instance) => + { + 'volume': instance.volume, + }; + +MediaPlayerGetPublishSignalVolumeJson + _$MediaPlayerGetPublishSignalVolumeJsonFromJson( + Map json) => + MediaPlayerGetPublishSignalVolumeJson( + json['volume'] as int, + ); + +Map _$MediaPlayerGetPublishSignalVolumeJsonToJson( + MediaPlayerGetPublishSignalVolumeJson instance) => + { + 'volume': instance.volume, + }; + +MediaPlayerCacheManagerGetCacheDirJson + _$MediaPlayerCacheManagerGetCacheDirJsonFromJson( + Map json) => + MediaPlayerCacheManagerGetCacheDirJson( + json['path'] as String, + ); + +Map _$MediaPlayerCacheManagerGetCacheDirJsonToJson( + MediaPlayerCacheManagerGetCacheDirJson instance) => + { + 'path': instance.path, + }; + +MusicContentCenterGetMusicChartsJson + _$MusicContentCenterGetMusicChartsJsonFromJson(Map json) => + MusicContentCenterGetMusicChartsJson( + json['requestId'] as String, + ); + +Map _$MusicContentCenterGetMusicChartsJsonToJson( + MusicContentCenterGetMusicChartsJson instance) => + { + 'requestId': instance.requestId, + }; + +MusicContentCenterGetMusicCollectionByMusicChartIdJson + _$MusicContentCenterGetMusicCollectionByMusicChartIdJsonFromJson( + Map json) => + MusicContentCenterGetMusicCollectionByMusicChartIdJson( + json['requestId'] as String, + ); + +Map + _$MusicContentCenterGetMusicCollectionByMusicChartIdJsonToJson( + MusicContentCenterGetMusicCollectionByMusicChartIdJson instance) => + { + 'requestId': instance.requestId, + }; + +MusicContentCenterSearchMusicJson _$MusicContentCenterSearchMusicJsonFromJson( + Map json) => + MusicContentCenterSearchMusicJson( + json['requestId'] as String, + ); + +Map _$MusicContentCenterSearchMusicJsonToJson( + MusicContentCenterSearchMusicJson instance) => + { + 'requestId': instance.requestId, + }; + +MusicContentCenterPreloadJson _$MusicContentCenterPreloadJsonFromJson( + Map json) => + MusicContentCenterPreloadJson( + json['requestId'] as String, + ); + +Map _$MusicContentCenterPreloadJsonToJson( + MusicContentCenterPreloadJson instance) => + { + 'requestId': instance.requestId, + }; + +MusicContentCenterGetCachesJson _$MusicContentCenterGetCachesJsonFromJson( + Map json) => + MusicContentCenterGetCachesJson( + (json['cacheInfo'] as List) + .map((e) => MusicCacheInfo.fromJson(e as Map)) + .toList(), + ); + +Map _$MusicContentCenterGetCachesJsonToJson( + MusicContentCenterGetCachesJson instance) => + { + 'cacheInfo': instance.cacheInfo.map((e) => e.toJson()).toList(), + }; + +MusicContentCenterGetLyricJson _$MusicContentCenterGetLyricJsonFromJson( + Map json) => + MusicContentCenterGetLyricJson( + json['requestId'] as String, + ); + +Map _$MusicContentCenterGetLyricJsonToJson( + MusicContentCenterGetLyricJson instance) => + { + 'requestId': instance.requestId, + }; + +MusicContentCenterGetSongSimpleInfoJson + _$MusicContentCenterGetSongSimpleInfoJsonFromJson( + Map json) => + MusicContentCenterGetSongSimpleInfoJson( + json['requestId'] as String, + ); + +Map _$MusicContentCenterGetSongSimpleInfoJsonToJson( + MusicContentCenterGetSongSimpleInfoJson instance) => + { + 'requestId': instance.requestId, + }; + +MusicContentCenterGetInternalSongCodeJson + _$MusicContentCenterGetInternalSongCodeJsonFromJson( + Map json) => + MusicContentCenterGetInternalSongCodeJson( + json['internalSongCode'] as int, + ); + +Map _$MusicContentCenterGetInternalSongCodeJsonToJson( + MusicContentCenterGetInternalSongCodeJson instance) => + { + 'internalSongCode': instance.internalSongCode, + }; + VideoDeviceManagerGetDeviceJson _$VideoDeviceManagerGetDeviceJsonFromJson( Map json) => VideoDeviceManagerGetDeviceJson( @@ -131,104 +331,6 @@ Map _$RtcEngineGetUserInfoByUidJsonToJson( 'userInfo': instance.userInfo.toJson(), }; -MediaPlayerGetDurationJson _$MediaPlayerGetDurationJsonFromJson( - Map json) => - MediaPlayerGetDurationJson( - json['duration'] as int, - ); - -Map _$MediaPlayerGetDurationJsonToJson( - MediaPlayerGetDurationJson instance) => - { - 'duration': instance.duration, - }; - -MediaPlayerGetPlayPositionJson _$MediaPlayerGetPlayPositionJsonFromJson( - Map json) => - MediaPlayerGetPlayPositionJson( - json['pos'] as int, - ); - -Map _$MediaPlayerGetPlayPositionJsonToJson( - MediaPlayerGetPlayPositionJson instance) => - { - 'pos': instance.pos, - }; - -MediaPlayerGetStreamCountJson _$MediaPlayerGetStreamCountJsonFromJson( - Map json) => - MediaPlayerGetStreamCountJson( - json['count'] as int, - ); - -Map _$MediaPlayerGetStreamCountJsonToJson( - MediaPlayerGetStreamCountJson instance) => - { - 'count': instance.count, - }; - -MediaPlayerGetStreamInfoJson _$MediaPlayerGetStreamInfoJsonFromJson( - Map json) => - MediaPlayerGetStreamInfoJson( - PlayerStreamInfo.fromJson(json['info'] as Map), - ); - -Map _$MediaPlayerGetStreamInfoJsonToJson( - MediaPlayerGetStreamInfoJson instance) => - { - 'info': instance.info.toJson(), - }; - -MediaPlayerGetMuteJson _$MediaPlayerGetMuteJsonFromJson( - Map json) => - MediaPlayerGetMuteJson( - json['muted'] as bool, - ); - -Map _$MediaPlayerGetMuteJsonToJson( - MediaPlayerGetMuteJson instance) => - { - 'muted': instance.muted, - }; - -MediaPlayerGetPlayoutVolumeJson _$MediaPlayerGetPlayoutVolumeJsonFromJson( - Map json) => - MediaPlayerGetPlayoutVolumeJson( - json['volume'] as int, - ); - -Map _$MediaPlayerGetPlayoutVolumeJsonToJson( - MediaPlayerGetPlayoutVolumeJson instance) => - { - 'volume': instance.volume, - }; - -MediaPlayerGetPublishSignalVolumeJson - _$MediaPlayerGetPublishSignalVolumeJsonFromJson( - Map json) => - MediaPlayerGetPublishSignalVolumeJson( - json['volume'] as int, - ); - -Map _$MediaPlayerGetPublishSignalVolumeJsonToJson( - MediaPlayerGetPublishSignalVolumeJson instance) => - { - 'volume': instance.volume, - }; - -MediaPlayerCacheManagerGetCacheDirJson - _$MediaPlayerCacheManagerGetCacheDirJsonFromJson( - Map json) => - MediaPlayerCacheManagerGetCacheDirJson( - json['path'] as String, - ); - -Map _$MediaPlayerCacheManagerGetCacheDirJsonToJson( - MediaPlayerCacheManagerGetCacheDirJson instance) => - { - 'path': instance.path, - }; - RtcEngineExCreateDataStreamExJson _$RtcEngineExCreateDataStreamExJsonFromJson( Map json) => RtcEngineExCreateDataStreamExJson( @@ -356,105 +458,3 @@ Map _$AudioDeviceManagerGetRecordingDeviceMuteJsonToJson( { 'mute': instance.mute, }; - -MusicContentCenterGetMusicChartsJson - _$MusicContentCenterGetMusicChartsJsonFromJson(Map json) => - MusicContentCenterGetMusicChartsJson( - json['requestId'] as String, - ); - -Map _$MusicContentCenterGetMusicChartsJsonToJson( - MusicContentCenterGetMusicChartsJson instance) => - { - 'requestId': instance.requestId, - }; - -MusicContentCenterGetMusicCollectionByMusicChartIdJson - _$MusicContentCenterGetMusicCollectionByMusicChartIdJsonFromJson( - Map json) => - MusicContentCenterGetMusicCollectionByMusicChartIdJson( - json['requestId'] as String, - ); - -Map - _$MusicContentCenterGetMusicCollectionByMusicChartIdJsonToJson( - MusicContentCenterGetMusicCollectionByMusicChartIdJson instance) => - { - 'requestId': instance.requestId, - }; - -MusicContentCenterSearchMusicJson _$MusicContentCenterSearchMusicJsonFromJson( - Map json) => - MusicContentCenterSearchMusicJson( - json['requestId'] as String, - ); - -Map _$MusicContentCenterSearchMusicJsonToJson( - MusicContentCenterSearchMusicJson instance) => - { - 'requestId': instance.requestId, - }; - -MusicContentCenterPreloadJson _$MusicContentCenterPreloadJsonFromJson( - Map json) => - MusicContentCenterPreloadJson( - json['requestId'] as String, - ); - -Map _$MusicContentCenterPreloadJsonToJson( - MusicContentCenterPreloadJson instance) => - { - 'requestId': instance.requestId, - }; - -MusicContentCenterGetCachesJson _$MusicContentCenterGetCachesJsonFromJson( - Map json) => - MusicContentCenterGetCachesJson( - (json['cacheInfo'] as List) - .map((e) => MusicCacheInfo.fromJson(e as Map)) - .toList(), - ); - -Map _$MusicContentCenterGetCachesJsonToJson( - MusicContentCenterGetCachesJson instance) => - { - 'cacheInfo': instance.cacheInfo.map((e) => e.toJson()).toList(), - }; - -MusicContentCenterGetLyricJson _$MusicContentCenterGetLyricJsonFromJson( - Map json) => - MusicContentCenterGetLyricJson( - json['requestId'] as String, - ); - -Map _$MusicContentCenterGetLyricJsonToJson( - MusicContentCenterGetLyricJson instance) => - { - 'requestId': instance.requestId, - }; - -MusicContentCenterGetSongSimpleInfoJson - _$MusicContentCenterGetSongSimpleInfoJsonFromJson( - Map json) => - MusicContentCenterGetSongSimpleInfoJson( - json['requestId'] as String, - ); - -Map _$MusicContentCenterGetSongSimpleInfoJsonToJson( - MusicContentCenterGetSongSimpleInfoJson instance) => - { - 'requestId': instance.requestId, - }; - -MusicContentCenterGetInternalSongCodeJson - _$MusicContentCenterGetInternalSongCodeJsonFromJson( - Map json) => - MusicContentCenterGetInternalSongCodeJson( - json['internalSongCode'] as int, - ); - -Map _$MusicContentCenterGetInternalSongCodeJsonToJson( - MusicContentCenterGetInternalSongCodeJson instance) => - { - 'internalSongCode': instance.internalSongCode, - }; diff --git a/lib/src/binding/event_handler_param_json.dart b/lib/src/binding/event_handler_param_json.dart index 82aeecd46..be1df3820 100644 --- a/lib/src/binding/event_handler_param_json.dart +++ b/lib/src/binding/event_handler_param_json.dart @@ -5,123 +5,145 @@ import 'package:agora_rtc_engine/src/binding_forward_export.dart'; part 'event_handler_param_json.g.dart'; @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnJoinChannelSuccessJson { - const RtcEngineEventHandlerOnJoinChannelSuccessJson( - {this.connection, this.elapsed}); +class AudioEncodedFrameObserverOnRecordAudioEncodedFrameJson { + const AudioEncodedFrameObserverOnRecordAudioEncodedFrameJson( + {this.frameBuffer, this.length, this.audioEncodedFrameInfo}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'elapsed') - final int? elapsed; - factory RtcEngineEventHandlerOnJoinChannelSuccessJson.fromJson( + @JsonKey(name: 'frameBuffer', ignore: true) + final Uint8List? frameBuffer; + @JsonKey(name: 'length') + final int? length; + @JsonKey(name: 'audioEncodedFrameInfo') + final EncodedAudioFrameInfo? audioEncodedFrameInfo; + factory AudioEncodedFrameObserverOnRecordAudioEncodedFrameJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnJoinChannelSuccessJsonFromJson(json); + _$AudioEncodedFrameObserverOnRecordAudioEncodedFrameJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnJoinChannelSuccessJsonToJson(this); + _$AudioEncodedFrameObserverOnRecordAudioEncodedFrameJsonToJson(this); } -extension RtcEngineEventHandlerOnJoinChannelSuccessJsonBufferExt - on RtcEngineEventHandlerOnJoinChannelSuccessJson { - RtcEngineEventHandlerOnJoinChannelSuccessJson fillBuffers( +extension AudioEncodedFrameObserverOnRecordAudioEncodedFrameJsonBufferExt + on AudioEncodedFrameObserverOnRecordAudioEncodedFrameJson { + AudioEncodedFrameObserverOnRecordAudioEncodedFrameJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; - return this; + Uint8List? frameBuffer; + if (bufferList.length > 0) { + frameBuffer = bufferList[0]; + } + return AudioEncodedFrameObserverOnRecordAudioEncodedFrameJson( + frameBuffer: frameBuffer, + length: length, + audioEncodedFrameInfo: audioEncodedFrameInfo); } List collectBufferList() { final bufferList = []; + if (frameBuffer != null) { + bufferList.add(frameBuffer!); + } return bufferList; } } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnRejoinChannelSuccessJson { - const RtcEngineEventHandlerOnRejoinChannelSuccessJson( - {this.connection, this.elapsed}); +class AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJson { + const AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJson( + {this.frameBuffer, this.length, this.audioEncodedFrameInfo}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'elapsed') - final int? elapsed; - factory RtcEngineEventHandlerOnRejoinChannelSuccessJson.fromJson( + @JsonKey(name: 'frameBuffer', ignore: true) + final Uint8List? frameBuffer; + @JsonKey(name: 'length') + final int? length; + @JsonKey(name: 'audioEncodedFrameInfo') + final EncodedAudioFrameInfo? audioEncodedFrameInfo; + factory AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnRejoinChannelSuccessJsonFromJson(json); + _$AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnRejoinChannelSuccessJsonToJson(this); + _$AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJsonToJson(this); } -extension RtcEngineEventHandlerOnRejoinChannelSuccessJsonBufferExt - on RtcEngineEventHandlerOnRejoinChannelSuccessJson { - RtcEngineEventHandlerOnRejoinChannelSuccessJson fillBuffers( +extension AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJsonBufferExt + on AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJson { + AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; - return this; + Uint8List? frameBuffer; + if (bufferList.length > 0) { + frameBuffer = bufferList[0]; + } + return AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJson( + frameBuffer: frameBuffer, + length: length, + audioEncodedFrameInfo: audioEncodedFrameInfo); } List collectBufferList() { final bufferList = []; + if (frameBuffer != null) { + bufferList.add(frameBuffer!); + } return bufferList; } } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnProxyConnectedJson { - const RtcEngineEventHandlerOnProxyConnectedJson( - {this.channel, - this.uid, - this.proxyType, - this.localProxyIp, - this.elapsed}); +class AudioEncodedFrameObserverOnMixedAudioEncodedFrameJson { + const AudioEncodedFrameObserverOnMixedAudioEncodedFrameJson( + {this.frameBuffer, this.length, this.audioEncodedFrameInfo}); - @JsonKey(name: 'channel') - final String? channel; - @JsonKey(name: 'uid') - final int? uid; - @JsonKey(name: 'proxyType') - final ProxyType? proxyType; - @JsonKey(name: 'localProxyIp') - final String? localProxyIp; - @JsonKey(name: 'elapsed') - final int? elapsed; - factory RtcEngineEventHandlerOnProxyConnectedJson.fromJson( + @JsonKey(name: 'frameBuffer', ignore: true) + final Uint8List? frameBuffer; + @JsonKey(name: 'length') + final int? length; + @JsonKey(name: 'audioEncodedFrameInfo') + final EncodedAudioFrameInfo? audioEncodedFrameInfo; + factory AudioEncodedFrameObserverOnMixedAudioEncodedFrameJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnProxyConnectedJsonFromJson(json); + _$AudioEncodedFrameObserverOnMixedAudioEncodedFrameJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnProxyConnectedJsonToJson(this); + _$AudioEncodedFrameObserverOnMixedAudioEncodedFrameJsonToJson(this); } -extension RtcEngineEventHandlerOnProxyConnectedJsonBufferExt - on RtcEngineEventHandlerOnProxyConnectedJson { - RtcEngineEventHandlerOnProxyConnectedJson fillBuffers( +extension AudioEncodedFrameObserverOnMixedAudioEncodedFrameJsonBufferExt + on AudioEncodedFrameObserverOnMixedAudioEncodedFrameJson { + AudioEncodedFrameObserverOnMixedAudioEncodedFrameJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; - return this; + Uint8List? frameBuffer; + if (bufferList.length > 0) { + frameBuffer = bufferList[0]; + } + return AudioEncodedFrameObserverOnMixedAudioEncodedFrameJson( + frameBuffer: frameBuffer, + length: length, + audioEncodedFrameInfo: audioEncodedFrameInfo); } List collectBufferList() { final bufferList = []; + if (frameBuffer != null) { + bufferList.add(frameBuffer!); + } return bufferList; } } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnErrorJson { - const RtcEngineEventHandlerOnErrorJson({this.err, this.msg}); +class AudioPcmFrameSinkOnFrameJson { + const AudioPcmFrameSinkOnFrameJson({this.frame}); - @JsonKey(name: 'err') - final ErrorCodeType? err; - @JsonKey(name: 'msg') - final String? msg; - factory RtcEngineEventHandlerOnErrorJson.fromJson( - Map json) => - _$RtcEngineEventHandlerOnErrorJsonFromJson(json); - Map toJson() => - _$RtcEngineEventHandlerOnErrorJsonToJson(this); + @JsonKey(name: 'frame') + final AudioPcmFrame? frame; + factory AudioPcmFrameSinkOnFrameJson.fromJson(Map json) => + _$AudioPcmFrameSinkOnFrameJsonFromJson(json); + Map toJson() => _$AudioPcmFrameSinkOnFrameJsonToJson(this); } -extension RtcEngineEventHandlerOnErrorJsonBufferExt - on RtcEngineEventHandlerOnErrorJson { - RtcEngineEventHandlerOnErrorJson fillBuffers(List bufferList) { +extension AudioPcmFrameSinkOnFrameJsonBufferExt + on AudioPcmFrameSinkOnFrameJson { + AudioPcmFrameSinkOnFrameJson fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -133,30 +155,24 @@ extension RtcEngineEventHandlerOnErrorJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnAudioQualityJson { - const RtcEngineEventHandlerOnAudioQualityJson( - {this.connection, this.remoteUid, this.quality, this.delay, this.lost}); +class AudioFrameObserverBaseOnRecordAudioFrameJson { + const AudioFrameObserverBaseOnRecordAudioFrameJson( + {this.channelId, this.audioFrame}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'remoteUid') - final int? remoteUid; - @JsonKey(name: 'quality') - final QualityType? quality; - @JsonKey(name: 'delay') - final int? delay; - @JsonKey(name: 'lost') - final int? lost; - factory RtcEngineEventHandlerOnAudioQualityJson.fromJson( + @JsonKey(name: 'channelId') + final String? channelId; + @JsonKey(name: 'audioFrame') + final AudioFrame? audioFrame; + factory AudioFrameObserverBaseOnRecordAudioFrameJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnAudioQualityJsonFromJson(json); + _$AudioFrameObserverBaseOnRecordAudioFrameJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnAudioQualityJsonToJson(this); + _$AudioFrameObserverBaseOnRecordAudioFrameJsonToJson(this); } -extension RtcEngineEventHandlerOnAudioQualityJsonBufferExt - on RtcEngineEventHandlerOnAudioQualityJson { - RtcEngineEventHandlerOnAudioQualityJson fillBuffers( +extension AudioFrameObserverBaseOnRecordAudioFrameJsonBufferExt + on AudioFrameObserverBaseOnRecordAudioFrameJson { + AudioFrameObserverBaseOnRecordAudioFrameJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -169,21 +185,24 @@ extension RtcEngineEventHandlerOnAudioQualityJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnLastmileProbeResultJson { - const RtcEngineEventHandlerOnLastmileProbeResultJson({this.result}); +class AudioFrameObserverBaseOnPlaybackAudioFrameJson { + const AudioFrameObserverBaseOnPlaybackAudioFrameJson( + {this.channelId, this.audioFrame}); - @JsonKey(name: 'result') - final LastmileProbeResult? result; - factory RtcEngineEventHandlerOnLastmileProbeResultJson.fromJson( + @JsonKey(name: 'channelId') + final String? channelId; + @JsonKey(name: 'audioFrame') + final AudioFrame? audioFrame; + factory AudioFrameObserverBaseOnPlaybackAudioFrameJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnLastmileProbeResultJsonFromJson(json); + _$AudioFrameObserverBaseOnPlaybackAudioFrameJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnLastmileProbeResultJsonToJson(this); + _$AudioFrameObserverBaseOnPlaybackAudioFrameJsonToJson(this); } -extension RtcEngineEventHandlerOnLastmileProbeResultJsonBufferExt - on RtcEngineEventHandlerOnLastmileProbeResultJson { - RtcEngineEventHandlerOnLastmileProbeResultJson fillBuffers( +extension AudioFrameObserverBaseOnPlaybackAudioFrameJsonBufferExt + on AudioFrameObserverBaseOnPlaybackAudioFrameJson { + AudioFrameObserverBaseOnPlaybackAudioFrameJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -196,28 +215,24 @@ extension RtcEngineEventHandlerOnLastmileProbeResultJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnAudioVolumeIndicationJson { - const RtcEngineEventHandlerOnAudioVolumeIndicationJson( - {this.connection, this.speakers, this.speakerNumber, this.totalVolume}); +class AudioFrameObserverBaseOnMixedAudioFrameJson { + const AudioFrameObserverBaseOnMixedAudioFrameJson( + {this.channelId, this.audioFrame}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'speakers') - final List? speakers; - @JsonKey(name: 'speakerNumber') - final int? speakerNumber; - @JsonKey(name: 'totalVolume') - final int? totalVolume; - factory RtcEngineEventHandlerOnAudioVolumeIndicationJson.fromJson( + @JsonKey(name: 'channelId') + final String? channelId; + @JsonKey(name: 'audioFrame') + final AudioFrame? audioFrame; + factory AudioFrameObserverBaseOnMixedAudioFrameJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnAudioVolumeIndicationJsonFromJson(json); + _$AudioFrameObserverBaseOnMixedAudioFrameJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnAudioVolumeIndicationJsonToJson(this); + _$AudioFrameObserverBaseOnMixedAudioFrameJsonToJson(this); } -extension RtcEngineEventHandlerOnAudioVolumeIndicationJsonBufferExt - on RtcEngineEventHandlerOnAudioVolumeIndicationJson { - RtcEngineEventHandlerOnAudioVolumeIndicationJson fillBuffers( +extension AudioFrameObserverBaseOnMixedAudioFrameJsonBufferExt + on AudioFrameObserverBaseOnMixedAudioFrameJson { + AudioFrameObserverBaseOnMixedAudioFrameJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -230,23 +245,21 @@ extension RtcEngineEventHandlerOnAudioVolumeIndicationJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnLeaveChannelJson { - const RtcEngineEventHandlerOnLeaveChannelJson({this.connection, this.stats}); +class AudioFrameObserverBaseOnEarMonitoringAudioFrameJson { + const AudioFrameObserverBaseOnEarMonitoringAudioFrameJson({this.audioFrame}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'stats') - final RtcStats? stats; - factory RtcEngineEventHandlerOnLeaveChannelJson.fromJson( + @JsonKey(name: 'audioFrame') + final AudioFrame? audioFrame; + factory AudioFrameObserverBaseOnEarMonitoringAudioFrameJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnLeaveChannelJsonFromJson(json); + _$AudioFrameObserverBaseOnEarMonitoringAudioFrameJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnLeaveChannelJsonToJson(this); + _$AudioFrameObserverBaseOnEarMonitoringAudioFrameJsonToJson(this); } -extension RtcEngineEventHandlerOnLeaveChannelJsonBufferExt - on RtcEngineEventHandlerOnLeaveChannelJson { - RtcEngineEventHandlerOnLeaveChannelJson fillBuffers( +extension AudioFrameObserverBaseOnEarMonitoringAudioFrameJsonBufferExt + on AudioFrameObserverBaseOnEarMonitoringAudioFrameJson { + AudioFrameObserverBaseOnEarMonitoringAudioFrameJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -259,23 +272,27 @@ extension RtcEngineEventHandlerOnLeaveChannelJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnRtcStatsJson { - const RtcEngineEventHandlerOnRtcStatsJson({this.connection, this.stats}); +class AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJson { + const AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJson( + {this.channelId, this.uid, this.audioFrame}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'stats') - final RtcStats? stats; - factory RtcEngineEventHandlerOnRtcStatsJson.fromJson( + @JsonKey(name: 'channelId') + final String? channelId; + @JsonKey(name: 'uid') + final int? uid; + @JsonKey(name: 'audioFrame') + final AudioFrame? audioFrame; + factory AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnRtcStatsJsonFromJson(json); + _$AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnRtcStatsJsonToJson(this); + _$AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJsonToJson(this); } -extension RtcEngineEventHandlerOnRtcStatsJsonBufferExt - on RtcEngineEventHandlerOnRtcStatsJson { - RtcEngineEventHandlerOnRtcStatsJson fillBuffers(List bufferList) { +extension AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJsonBufferExt + on AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJson { + AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJson fillBuffers( + List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -287,26 +304,21 @@ extension RtcEngineEventHandlerOnRtcStatsJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnAudioDeviceStateChangedJson { - const RtcEngineEventHandlerOnAudioDeviceStateChangedJson( - {this.deviceId, this.deviceType, this.deviceState}); +class AudioSpectrumObserverOnLocalAudioSpectrumJson { + const AudioSpectrumObserverOnLocalAudioSpectrumJson({this.data}); - @JsonKey(name: 'deviceId') - final String? deviceId; - @JsonKey(name: 'deviceType') - final MediaDeviceType? deviceType; - @JsonKey(name: 'deviceState') - final MediaDeviceStateType? deviceState; - factory RtcEngineEventHandlerOnAudioDeviceStateChangedJson.fromJson( + @JsonKey(name: 'data') + final AudioSpectrumData? data; + factory AudioSpectrumObserverOnLocalAudioSpectrumJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnAudioDeviceStateChangedJsonFromJson(json); + _$AudioSpectrumObserverOnLocalAudioSpectrumJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnAudioDeviceStateChangedJsonToJson(this); + _$AudioSpectrumObserverOnLocalAudioSpectrumJsonToJson(this); } -extension RtcEngineEventHandlerOnAudioDeviceStateChangedJsonBufferExt - on RtcEngineEventHandlerOnAudioDeviceStateChangedJson { - RtcEngineEventHandlerOnAudioDeviceStateChangedJson fillBuffers( +extension AudioSpectrumObserverOnLocalAudioSpectrumJsonBufferExt + on AudioSpectrumObserverOnLocalAudioSpectrumJson { + AudioSpectrumObserverOnLocalAudioSpectrumJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -319,21 +331,24 @@ extension RtcEngineEventHandlerOnAudioDeviceStateChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnAudioMixingPositionChangedJson { - const RtcEngineEventHandlerOnAudioMixingPositionChangedJson({this.position}); +class AudioSpectrumObserverOnRemoteAudioSpectrumJson { + const AudioSpectrumObserverOnRemoteAudioSpectrumJson( + {this.spectrums, this.spectrumNumber}); - @JsonKey(name: 'position') - final int? position; - factory RtcEngineEventHandlerOnAudioMixingPositionChangedJson.fromJson( + @JsonKey(name: 'spectrums') + final List? spectrums; + @JsonKey(name: 'spectrumNumber') + final int? spectrumNumber; + factory AudioSpectrumObserverOnRemoteAudioSpectrumJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnAudioMixingPositionChangedJsonFromJson(json); + _$AudioSpectrumObserverOnRemoteAudioSpectrumJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnAudioMixingPositionChangedJsonToJson(this); + _$AudioSpectrumObserverOnRemoteAudioSpectrumJsonToJson(this); } -extension RtcEngineEventHandlerOnAudioMixingPositionChangedJsonBufferExt - on RtcEngineEventHandlerOnAudioMixingPositionChangedJson { - RtcEngineEventHandlerOnAudioMixingPositionChangedJson fillBuffers( +extension AudioSpectrumObserverOnRemoteAudioSpectrumJsonBufferExt + on AudioSpectrumObserverOnRemoteAudioSpectrumJson { + AudioSpectrumObserverOnRemoteAudioSpectrumJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -346,46 +361,69 @@ extension RtcEngineEventHandlerOnAudioMixingPositionChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnAudioMixingFinishedJson { - const RtcEngineEventHandlerOnAudioMixingFinishedJson(); +class VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJson { + const VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJson( + {this.uid, this.imageBuffer, this.length, this.videoEncodedFrameInfo}); - factory RtcEngineEventHandlerOnAudioMixingFinishedJson.fromJson( + @JsonKey(name: 'uid') + final int? uid; + @JsonKey(name: 'imageBuffer', ignore: true) + final Uint8List? imageBuffer; + @JsonKey(name: 'length') + final int? length; + @JsonKey(name: 'videoEncodedFrameInfo') + final EncodedVideoFrameInfo? videoEncodedFrameInfo; + factory VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnAudioMixingFinishedJsonFromJson(json); + _$VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnAudioMixingFinishedJsonToJson(this); + _$VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJsonToJson(this); } -extension RtcEngineEventHandlerOnAudioMixingFinishedJsonBufferExt - on RtcEngineEventHandlerOnAudioMixingFinishedJson { - RtcEngineEventHandlerOnAudioMixingFinishedJson fillBuffers( +extension VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJsonBufferExt + on VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJson { + VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; - return this; + Uint8List? imageBuffer; + if (bufferList.length > 0) { + imageBuffer = bufferList[0]; + } + return VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJson( + uid: uid, + imageBuffer: imageBuffer, + length: length, + videoEncodedFrameInfo: videoEncodedFrameInfo); } List collectBufferList() { final bufferList = []; + if (imageBuffer != null) { + bufferList.add(imageBuffer!); + } return bufferList; } } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnAudioEffectFinishedJson { - const RtcEngineEventHandlerOnAudioEffectFinishedJson({this.soundId}); +class VideoFrameObserverOnCaptureVideoFrameJson { + const VideoFrameObserverOnCaptureVideoFrameJson( + {this.sourceType, this.videoFrame}); - @JsonKey(name: 'soundId') - final int? soundId; - factory RtcEngineEventHandlerOnAudioEffectFinishedJson.fromJson( + @JsonKey(name: 'sourceType') + final VideoSourceType? sourceType; + @JsonKey(name: 'videoFrame') + final VideoFrame? videoFrame; + factory VideoFrameObserverOnCaptureVideoFrameJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnAudioEffectFinishedJsonFromJson(json); + _$VideoFrameObserverOnCaptureVideoFrameJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnAudioEffectFinishedJsonToJson(this); + _$VideoFrameObserverOnCaptureVideoFrameJsonToJson(this); } -extension RtcEngineEventHandlerOnAudioEffectFinishedJsonBufferExt - on RtcEngineEventHandlerOnAudioEffectFinishedJson { - RtcEngineEventHandlerOnAudioEffectFinishedJson fillBuffers( +extension VideoFrameObserverOnCaptureVideoFrameJsonBufferExt + on VideoFrameObserverOnCaptureVideoFrameJson { + VideoFrameObserverOnCaptureVideoFrameJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -398,26 +436,24 @@ extension RtcEngineEventHandlerOnAudioEffectFinishedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnVideoDeviceStateChangedJson { - const RtcEngineEventHandlerOnVideoDeviceStateChangedJson( - {this.deviceId, this.deviceType, this.deviceState}); +class VideoFrameObserverOnPreEncodeVideoFrameJson { + const VideoFrameObserverOnPreEncodeVideoFrameJson( + {this.sourceType, this.videoFrame}); - @JsonKey(name: 'deviceId') - final String? deviceId; - @JsonKey(name: 'deviceType') - final MediaDeviceType? deviceType; - @JsonKey(name: 'deviceState') - final MediaDeviceStateType? deviceState; - factory RtcEngineEventHandlerOnVideoDeviceStateChangedJson.fromJson( + @JsonKey(name: 'sourceType') + final VideoSourceType? sourceType; + @JsonKey(name: 'videoFrame') + final VideoFrame? videoFrame; + factory VideoFrameObserverOnPreEncodeVideoFrameJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnVideoDeviceStateChangedJsonFromJson(json); + _$VideoFrameObserverOnPreEncodeVideoFrameJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnVideoDeviceStateChangedJsonToJson(this); + _$VideoFrameObserverOnPreEncodeVideoFrameJsonToJson(this); } -extension RtcEngineEventHandlerOnVideoDeviceStateChangedJsonBufferExt - on RtcEngineEventHandlerOnVideoDeviceStateChangedJson { - RtcEngineEventHandlerOnVideoDeviceStateChangedJson fillBuffers( +extension VideoFrameObserverOnPreEncodeVideoFrameJsonBufferExt + on VideoFrameObserverOnPreEncodeVideoFrameJson { + VideoFrameObserverOnPreEncodeVideoFrameJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -430,28 +466,24 @@ extension RtcEngineEventHandlerOnVideoDeviceStateChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnNetworkQualityJson { - const RtcEngineEventHandlerOnNetworkQualityJson( - {this.connection, this.remoteUid, this.txQuality, this.rxQuality}); +class VideoFrameObserverOnMediaPlayerVideoFrameJson { + const VideoFrameObserverOnMediaPlayerVideoFrameJson( + {this.videoFrame, this.mediaPlayerId}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'remoteUid') - final int? remoteUid; - @JsonKey(name: 'txQuality') - final QualityType? txQuality; - @JsonKey(name: 'rxQuality') - final QualityType? rxQuality; - factory RtcEngineEventHandlerOnNetworkQualityJson.fromJson( + @JsonKey(name: 'videoFrame') + final VideoFrame? videoFrame; + @JsonKey(name: 'mediaPlayerId') + final int? mediaPlayerId; + factory VideoFrameObserverOnMediaPlayerVideoFrameJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnNetworkQualityJsonFromJson(json); + _$VideoFrameObserverOnMediaPlayerVideoFrameJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnNetworkQualityJsonToJson(this); + _$VideoFrameObserverOnMediaPlayerVideoFrameJsonToJson(this); } -extension RtcEngineEventHandlerOnNetworkQualityJsonBufferExt - on RtcEngineEventHandlerOnNetworkQualityJson { - RtcEngineEventHandlerOnNetworkQualityJson fillBuffers( +extension VideoFrameObserverOnMediaPlayerVideoFrameJsonBufferExt + on VideoFrameObserverOnMediaPlayerVideoFrameJson { + VideoFrameObserverOnMediaPlayerVideoFrameJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -464,21 +496,26 @@ extension RtcEngineEventHandlerOnNetworkQualityJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnIntraRequestReceivedJson { - const RtcEngineEventHandlerOnIntraRequestReceivedJson({this.connection}); +class VideoFrameObserverOnRenderVideoFrameJson { + const VideoFrameObserverOnRenderVideoFrameJson( + {this.channelId, this.remoteUid, this.videoFrame}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - factory RtcEngineEventHandlerOnIntraRequestReceivedJson.fromJson( + @JsonKey(name: 'channelId') + final String? channelId; + @JsonKey(name: 'remoteUid') + final int? remoteUid; + @JsonKey(name: 'videoFrame') + final VideoFrame? videoFrame; + factory VideoFrameObserverOnRenderVideoFrameJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnIntraRequestReceivedJsonFromJson(json); + _$VideoFrameObserverOnRenderVideoFrameJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnIntraRequestReceivedJsonToJson(this); + _$VideoFrameObserverOnRenderVideoFrameJsonToJson(this); } -extension RtcEngineEventHandlerOnIntraRequestReceivedJsonBufferExt - on RtcEngineEventHandlerOnIntraRequestReceivedJson { - RtcEngineEventHandlerOnIntraRequestReceivedJson fillBuffers( +extension VideoFrameObserverOnRenderVideoFrameJsonBufferExt + on VideoFrameObserverOnRenderVideoFrameJson { + VideoFrameObserverOnRenderVideoFrameJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -491,21 +528,21 @@ extension RtcEngineEventHandlerOnIntraRequestReceivedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJson { - const RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJson({this.info}); +class VideoFrameObserverOnTranscodedVideoFrameJson { + const VideoFrameObserverOnTranscodedVideoFrameJson({this.videoFrame}); - @JsonKey(name: 'info') - final UplinkNetworkInfo? info; - factory RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJson.fromJson( + @JsonKey(name: 'videoFrame') + final VideoFrame? videoFrame; + factory VideoFrameObserverOnTranscodedVideoFrameJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJsonFromJson(json); + _$VideoFrameObserverOnTranscodedVideoFrameJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJsonToJson(this); + _$VideoFrameObserverOnTranscodedVideoFrameJsonToJson(this); } -extension RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJsonBufferExt - on RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJson { - RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJson fillBuffers( +extension VideoFrameObserverOnTranscodedVideoFrameJsonBufferExt + on VideoFrameObserverOnTranscodedVideoFrameJson { + VideoFrameObserverOnTranscodedVideoFrameJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -518,21 +555,28 @@ extension RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJson { - const RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJson({this.info}); +class MediaRecorderObserverOnRecorderStateChangedJson { + const MediaRecorderObserverOnRecorderStateChangedJson( + {this.channelId, this.uid, this.state, this.error}); - @JsonKey(name: 'info') - final DownlinkNetworkInfo? info; - factory RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJson.fromJson( - Map json) => - _$RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJsonFromJson(json); - Map toJson() => - _$RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJsonToJson(this); + @JsonKey(name: 'channelId') + final String? channelId; + @JsonKey(name: 'uid') + final int? uid; + @JsonKey(name: 'state') + final RecorderState? state; + @JsonKey(name: 'error') + final RecorderErrorCode? error; + factory MediaRecorderObserverOnRecorderStateChangedJson.fromJson( + Map json) => + _$MediaRecorderObserverOnRecorderStateChangedJsonFromJson(json); + Map toJson() => + _$MediaRecorderObserverOnRecorderStateChangedJsonToJson(this); } -extension RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJsonBufferExt - on RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJson { - RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJson fillBuffers( +extension MediaRecorderObserverOnRecorderStateChangedJsonBufferExt + on MediaRecorderObserverOnRecorderStateChangedJson { + MediaRecorderObserverOnRecorderStateChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -545,21 +589,26 @@ extension RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnLastmileQualityJson { - const RtcEngineEventHandlerOnLastmileQualityJson({this.quality}); +class MediaRecorderObserverOnRecorderInfoUpdatedJson { + const MediaRecorderObserverOnRecorderInfoUpdatedJson( + {this.channelId, this.uid, this.info}); - @JsonKey(name: 'quality') - final QualityType? quality; - factory RtcEngineEventHandlerOnLastmileQualityJson.fromJson( + @JsonKey(name: 'channelId') + final String? channelId; + @JsonKey(name: 'uid') + final int? uid; + @JsonKey(name: 'info') + final RecorderInfo? info; + factory MediaRecorderObserverOnRecorderInfoUpdatedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnLastmileQualityJsonFromJson(json); + _$MediaRecorderObserverOnRecorderInfoUpdatedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnLastmileQualityJsonToJson(this); + _$MediaRecorderObserverOnRecorderInfoUpdatedJsonToJson(this); } -extension RtcEngineEventHandlerOnLastmileQualityJsonBufferExt - on RtcEngineEventHandlerOnLastmileQualityJson { - RtcEngineEventHandlerOnLastmileQualityJson fillBuffers( +extension MediaRecorderObserverOnRecorderInfoUpdatedJsonBufferExt + on MediaRecorderObserverOnRecorderInfoUpdatedJson { + MediaRecorderObserverOnRecorderInfoUpdatedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -572,28 +621,21 @@ extension RtcEngineEventHandlerOnLastmileQualityJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnFirstLocalVideoFrameJson { - const RtcEngineEventHandlerOnFirstLocalVideoFrameJson( - {this.source, this.width, this.height, this.elapsed}); +class MediaPlayerVideoFrameObserverOnFrameJson { + const MediaPlayerVideoFrameObserverOnFrameJson({this.frame}); - @JsonKey(name: 'source') - final VideoSourceType? source; - @JsonKey(name: 'width') - final int? width; - @JsonKey(name: 'height') - final int? height; - @JsonKey(name: 'elapsed') - final int? elapsed; - factory RtcEngineEventHandlerOnFirstLocalVideoFrameJson.fromJson( + @JsonKey(name: 'frame') + final VideoFrame? frame; + factory MediaPlayerVideoFrameObserverOnFrameJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnFirstLocalVideoFrameJsonFromJson(json); + _$MediaPlayerVideoFrameObserverOnFrameJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnFirstLocalVideoFrameJsonToJson(this); + _$MediaPlayerVideoFrameObserverOnFrameJsonToJson(this); } -extension RtcEngineEventHandlerOnFirstLocalVideoFrameJsonBufferExt - on RtcEngineEventHandlerOnFirstLocalVideoFrameJson { - RtcEngineEventHandlerOnFirstLocalVideoFrameJson fillBuffers( +extension MediaPlayerVideoFrameObserverOnFrameJsonBufferExt + on MediaPlayerVideoFrameObserverOnFrameJson { + MediaPlayerVideoFrameObserverOnFrameJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -606,24 +648,24 @@ extension RtcEngineEventHandlerOnFirstLocalVideoFrameJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJson { - const RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJson( - {this.source, this.elapsed}); +class MediaPlayerSourceObserverOnPlayerSourceStateChangedJson { + const MediaPlayerSourceObserverOnPlayerSourceStateChangedJson( + {this.state, this.ec}); - @JsonKey(name: 'source') - final VideoSourceType? source; - @JsonKey(name: 'elapsed') - final int? elapsed; - factory RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJson.fromJson( + @JsonKey(name: 'state') + final MediaPlayerState? state; + @JsonKey(name: 'ec') + final MediaPlayerError? ec; + factory MediaPlayerSourceObserverOnPlayerSourceStateChangedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJsonFromJson(json); + _$MediaPlayerSourceObserverOnPlayerSourceStateChangedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJsonToJson(this); + _$MediaPlayerSourceObserverOnPlayerSourceStateChangedJsonToJson(this); } -extension RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJsonBufferExt - on RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJson { - RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJson fillBuffers( +extension MediaPlayerSourceObserverOnPlayerSourceStateChangedJsonBufferExt + on MediaPlayerSourceObserverOnPlayerSourceStateChangedJson { + MediaPlayerSourceObserverOnPlayerSourceStateChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -636,30 +678,21 @@ extension RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnFirstRemoteVideoDecodedJson { - const RtcEngineEventHandlerOnFirstRemoteVideoDecodedJson( - {this.connection, this.remoteUid, this.width, this.height, this.elapsed}); +class MediaPlayerSourceObserverOnPositionChangedJson { + const MediaPlayerSourceObserverOnPositionChangedJson({this.positionMs}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'remoteUid') - final int? remoteUid; - @JsonKey(name: 'width') - final int? width; - @JsonKey(name: 'height') - final int? height; - @JsonKey(name: 'elapsed') - final int? elapsed; - factory RtcEngineEventHandlerOnFirstRemoteVideoDecodedJson.fromJson( + @JsonKey(name: 'position_ms') + final int? positionMs; + factory MediaPlayerSourceObserverOnPositionChangedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnFirstRemoteVideoDecodedJsonFromJson(json); + _$MediaPlayerSourceObserverOnPositionChangedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnFirstRemoteVideoDecodedJsonToJson(this); + _$MediaPlayerSourceObserverOnPositionChangedJsonToJson(this); } -extension RtcEngineEventHandlerOnFirstRemoteVideoDecodedJsonBufferExt - on RtcEngineEventHandlerOnFirstRemoteVideoDecodedJson { - RtcEngineEventHandlerOnFirstRemoteVideoDecodedJson fillBuffers( +extension MediaPlayerSourceObserverOnPositionChangedJsonBufferExt + on MediaPlayerSourceObserverOnPositionChangedJson { + MediaPlayerSourceObserverOnPositionChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -672,37 +705,26 @@ extension RtcEngineEventHandlerOnFirstRemoteVideoDecodedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnVideoSizeChangedJson { - const RtcEngineEventHandlerOnVideoSizeChangedJson( - {this.connection, - this.sourceType, - this.uid, - this.width, - this.height, - this.rotation}); +class MediaPlayerSourceObserverOnPlayerEventJson { + const MediaPlayerSourceObserverOnPlayerEventJson( + {this.eventCode, this.elapsedTime, this.message}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'sourceType') - final VideoSourceType? sourceType; - @JsonKey(name: 'uid') - final int? uid; - @JsonKey(name: 'width') - final int? width; - @JsonKey(name: 'height') - final int? height; - @JsonKey(name: 'rotation') - final int? rotation; - factory RtcEngineEventHandlerOnVideoSizeChangedJson.fromJson( + @JsonKey(name: 'eventCode') + final MediaPlayerEvent? eventCode; + @JsonKey(name: 'elapsedTime') + final int? elapsedTime; + @JsonKey(name: 'message') + final String? message; + factory MediaPlayerSourceObserverOnPlayerEventJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnVideoSizeChangedJsonFromJson(json); + _$MediaPlayerSourceObserverOnPlayerEventJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnVideoSizeChangedJsonToJson(this); + _$MediaPlayerSourceObserverOnPlayerEventJsonToJson(this); } -extension RtcEngineEventHandlerOnVideoSizeChangedJsonBufferExt - on RtcEngineEventHandlerOnVideoSizeChangedJson { - RtcEngineEventHandlerOnVideoSizeChangedJson fillBuffers( +extension MediaPlayerSourceObserverOnPlayerEventJsonBufferExt + on MediaPlayerSourceObserverOnPlayerEventJson { + MediaPlayerSourceObserverOnPlayerEventJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -715,62 +737,58 @@ extension RtcEngineEventHandlerOnVideoSizeChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnLocalVideoStateChangedJson { - const RtcEngineEventHandlerOnLocalVideoStateChangedJson( - {this.source, this.state, this.error}); +class MediaPlayerSourceObserverOnMetaDataJson { + const MediaPlayerSourceObserverOnMetaDataJson({this.data, this.length}); - @JsonKey(name: 'source') - final VideoSourceType? source; - @JsonKey(name: 'state') - final LocalVideoStreamState? state; - @JsonKey(name: 'error') - final LocalVideoStreamError? error; - factory RtcEngineEventHandlerOnLocalVideoStateChangedJson.fromJson( + @JsonKey(name: 'data', ignore: true) + final Uint8List? data; + @JsonKey(name: 'length') + final int? length; + factory MediaPlayerSourceObserverOnMetaDataJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnLocalVideoStateChangedJsonFromJson(json); + _$MediaPlayerSourceObserverOnMetaDataJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnLocalVideoStateChangedJsonToJson(this); + _$MediaPlayerSourceObserverOnMetaDataJsonToJson(this); } -extension RtcEngineEventHandlerOnLocalVideoStateChangedJsonBufferExt - on RtcEngineEventHandlerOnLocalVideoStateChangedJson { - RtcEngineEventHandlerOnLocalVideoStateChangedJson fillBuffers( +extension MediaPlayerSourceObserverOnMetaDataJsonBufferExt + on MediaPlayerSourceObserverOnMetaDataJson { + MediaPlayerSourceObserverOnMetaDataJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; - return this; + Uint8List? data; + if (bufferList.length > 0) { + data = bufferList[0]; + } + return MediaPlayerSourceObserverOnMetaDataJson(data: data, length: length); } List collectBufferList() { final bufferList = []; + if (data != null) { + bufferList.add(data!); + } return bufferList; } } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnRemoteVideoStateChangedJson { - const RtcEngineEventHandlerOnRemoteVideoStateChangedJson( - {this.connection, this.remoteUid, this.state, this.reason, this.elapsed}); +class MediaPlayerSourceObserverOnPlayBufferUpdatedJson { + const MediaPlayerSourceObserverOnPlayBufferUpdatedJson( + {this.playCachedBuffer}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'remoteUid') - final int? remoteUid; - @JsonKey(name: 'state') - final RemoteVideoState? state; - @JsonKey(name: 'reason') - final RemoteVideoStateReason? reason; - @JsonKey(name: 'elapsed') - final int? elapsed; - factory RtcEngineEventHandlerOnRemoteVideoStateChangedJson.fromJson( + @JsonKey(name: 'playCachedBuffer') + final int? playCachedBuffer; + factory MediaPlayerSourceObserverOnPlayBufferUpdatedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnRemoteVideoStateChangedJsonFromJson(json); + _$MediaPlayerSourceObserverOnPlayBufferUpdatedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnRemoteVideoStateChangedJsonToJson(this); + _$MediaPlayerSourceObserverOnPlayBufferUpdatedJsonToJson(this); } -extension RtcEngineEventHandlerOnRemoteVideoStateChangedJsonBufferExt - on RtcEngineEventHandlerOnRemoteVideoStateChangedJson { - RtcEngineEventHandlerOnRemoteVideoStateChangedJson fillBuffers( +extension MediaPlayerSourceObserverOnPlayBufferUpdatedJsonBufferExt + on MediaPlayerSourceObserverOnPlayBufferUpdatedJson { + MediaPlayerSourceObserverOnPlayBufferUpdatedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -783,30 +801,23 @@ extension RtcEngineEventHandlerOnRemoteVideoStateChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnFirstRemoteVideoFrameJson { - const RtcEngineEventHandlerOnFirstRemoteVideoFrameJson( - {this.connection, this.remoteUid, this.width, this.height, this.elapsed}); +class MediaPlayerSourceObserverOnPreloadEventJson { + const MediaPlayerSourceObserverOnPreloadEventJson({this.src, this.event}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'remoteUid') - final int? remoteUid; - @JsonKey(name: 'width') - final int? width; - @JsonKey(name: 'height') - final int? height; - @JsonKey(name: 'elapsed') - final int? elapsed; - factory RtcEngineEventHandlerOnFirstRemoteVideoFrameJson.fromJson( + @JsonKey(name: 'src') + final String? src; + @JsonKey(name: 'event') + final PlayerPreloadEvent? event; + factory MediaPlayerSourceObserverOnPreloadEventJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnFirstRemoteVideoFrameJsonFromJson(json); + _$MediaPlayerSourceObserverOnPreloadEventJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnFirstRemoteVideoFrameJsonToJson(this); + _$MediaPlayerSourceObserverOnPreloadEventJsonToJson(this); } -extension RtcEngineEventHandlerOnFirstRemoteVideoFrameJsonBufferExt - on RtcEngineEventHandlerOnFirstRemoteVideoFrameJson { - RtcEngineEventHandlerOnFirstRemoteVideoFrameJson fillBuffers( +extension MediaPlayerSourceObserverOnPreloadEventJsonBufferExt + on MediaPlayerSourceObserverOnPreloadEventJson { + MediaPlayerSourceObserverOnPreloadEventJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -819,26 +830,19 @@ extension RtcEngineEventHandlerOnFirstRemoteVideoFrameJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnUserJoinedJson { - const RtcEngineEventHandlerOnUserJoinedJson( - {this.connection, this.remoteUid, this.elapsed}); +class MediaPlayerSourceObserverOnCompletedJson { + const MediaPlayerSourceObserverOnCompletedJson(); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'remoteUid') - final int? remoteUid; - @JsonKey(name: 'elapsed') - final int? elapsed; - factory RtcEngineEventHandlerOnUserJoinedJson.fromJson( + factory MediaPlayerSourceObserverOnCompletedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnUserJoinedJsonFromJson(json); + _$MediaPlayerSourceObserverOnCompletedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnUserJoinedJsonToJson(this); + _$MediaPlayerSourceObserverOnCompletedJsonToJson(this); } -extension RtcEngineEventHandlerOnUserJoinedJsonBufferExt - on RtcEngineEventHandlerOnUserJoinedJson { - RtcEngineEventHandlerOnUserJoinedJson fillBuffers( +extension MediaPlayerSourceObserverOnCompletedJsonBufferExt + on MediaPlayerSourceObserverOnCompletedJson { + MediaPlayerSourceObserverOnCompletedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -851,26 +855,19 @@ extension RtcEngineEventHandlerOnUserJoinedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnUserOfflineJson { - const RtcEngineEventHandlerOnUserOfflineJson( - {this.connection, this.remoteUid, this.reason}); +class MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJson { + const MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJson(); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'remoteUid') - final int? remoteUid; - @JsonKey(name: 'reason') - final UserOfflineReasonType? reason; - factory RtcEngineEventHandlerOnUserOfflineJson.fromJson( + factory MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnUserOfflineJsonFromJson(json); + _$MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnUserOfflineJsonToJson(this); + _$MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJsonToJson(this); } -extension RtcEngineEventHandlerOnUserOfflineJsonBufferExt - on RtcEngineEventHandlerOnUserOfflineJson { - RtcEngineEventHandlerOnUserOfflineJson fillBuffers( +extension MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJsonBufferExt + on MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJson { + MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -883,26 +880,24 @@ extension RtcEngineEventHandlerOnUserOfflineJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnUserMuteAudioJson { - const RtcEngineEventHandlerOnUserMuteAudioJson( - {this.connection, this.remoteUid, this.muted}); +class MediaPlayerSourceObserverOnPlayerSrcInfoChangedJson { + const MediaPlayerSourceObserverOnPlayerSrcInfoChangedJson( + {this.from, this.to}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'remoteUid') - final int? remoteUid; - @JsonKey(name: 'muted') - final bool? muted; - factory RtcEngineEventHandlerOnUserMuteAudioJson.fromJson( + @JsonKey(name: 'from') + final SrcInfo? from; + @JsonKey(name: 'to') + final SrcInfo? to; + factory MediaPlayerSourceObserverOnPlayerSrcInfoChangedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnUserMuteAudioJsonFromJson(json); + _$MediaPlayerSourceObserverOnPlayerSrcInfoChangedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnUserMuteAudioJsonToJson(this); + _$MediaPlayerSourceObserverOnPlayerSrcInfoChangedJsonToJson(this); } -extension RtcEngineEventHandlerOnUserMuteAudioJsonBufferExt - on RtcEngineEventHandlerOnUserMuteAudioJson { - RtcEngineEventHandlerOnUserMuteAudioJson fillBuffers( +extension MediaPlayerSourceObserverOnPlayerSrcInfoChangedJsonBufferExt + on MediaPlayerSourceObserverOnPlayerSrcInfoChangedJson { + MediaPlayerSourceObserverOnPlayerSrcInfoChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -915,26 +910,21 @@ extension RtcEngineEventHandlerOnUserMuteAudioJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnUserMuteVideoJson { - const RtcEngineEventHandlerOnUserMuteVideoJson( - {this.connection, this.remoteUid, this.muted}); +class MediaPlayerSourceObserverOnPlayerInfoUpdatedJson { + const MediaPlayerSourceObserverOnPlayerInfoUpdatedJson({this.info}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'remoteUid') - final int? remoteUid; - @JsonKey(name: 'muted') - final bool? muted; - factory RtcEngineEventHandlerOnUserMuteVideoJson.fromJson( + @JsonKey(name: 'info') + final PlayerUpdatedInfo? info; + factory MediaPlayerSourceObserverOnPlayerInfoUpdatedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnUserMuteVideoJsonFromJson(json); + _$MediaPlayerSourceObserverOnPlayerInfoUpdatedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnUserMuteVideoJsonToJson(this); + _$MediaPlayerSourceObserverOnPlayerInfoUpdatedJsonToJson(this); } -extension RtcEngineEventHandlerOnUserMuteVideoJsonBufferExt - on RtcEngineEventHandlerOnUserMuteVideoJson { - RtcEngineEventHandlerOnUserMuteVideoJson fillBuffers( +extension MediaPlayerSourceObserverOnPlayerInfoUpdatedJsonBufferExt + on MediaPlayerSourceObserverOnPlayerInfoUpdatedJson { + MediaPlayerSourceObserverOnPlayerInfoUpdatedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -947,26 +937,21 @@ extension RtcEngineEventHandlerOnUserMuteVideoJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnUserEnableVideoJson { - const RtcEngineEventHandlerOnUserEnableVideoJson( - {this.connection, this.remoteUid, this.enabled}); +class MediaPlayerSourceObserverOnAudioVolumeIndicationJson { + const MediaPlayerSourceObserverOnAudioVolumeIndicationJson({this.volume}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'remoteUid') - final int? remoteUid; - @JsonKey(name: 'enabled') - final bool? enabled; - factory RtcEngineEventHandlerOnUserEnableVideoJson.fromJson( + @JsonKey(name: 'volume') + final int? volume; + factory MediaPlayerSourceObserverOnAudioVolumeIndicationJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnUserEnableVideoJsonFromJson(json); + _$MediaPlayerSourceObserverOnAudioVolumeIndicationJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnUserEnableVideoJsonToJson(this); + _$MediaPlayerSourceObserverOnAudioVolumeIndicationJsonToJson(this); } -extension RtcEngineEventHandlerOnUserEnableVideoJsonBufferExt - on RtcEngineEventHandlerOnUserEnableVideoJson { - RtcEngineEventHandlerOnUserEnableVideoJson fillBuffers( +extension MediaPlayerSourceObserverOnAudioVolumeIndicationJsonBufferExt + on MediaPlayerSourceObserverOnAudioVolumeIndicationJson { + MediaPlayerSourceObserverOnAudioVolumeIndicationJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -979,26 +964,26 @@ extension RtcEngineEventHandlerOnUserEnableVideoJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnUserStateChangedJson { - const RtcEngineEventHandlerOnUserStateChangedJson( - {this.connection, this.remoteUid, this.state}); +class MusicContentCenterEventHandlerOnMusicChartsResultJson { + const MusicContentCenterEventHandlerOnMusicChartsResultJson( + {this.requestId, this.result, this.errorCode}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'remoteUid') - final int? remoteUid; - @JsonKey(name: 'state') - final int? state; - factory RtcEngineEventHandlerOnUserStateChangedJson.fromJson( + @JsonKey(name: 'requestId') + final String? requestId; + @JsonKey(name: 'result') + final List? result; + @JsonKey(name: 'errorCode') + final MusicContentCenterStatusCode? errorCode; + factory MusicContentCenterEventHandlerOnMusicChartsResultJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnUserStateChangedJsonFromJson(json); + _$MusicContentCenterEventHandlerOnMusicChartsResultJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnUserStateChangedJsonToJson(this); + _$MusicContentCenterEventHandlerOnMusicChartsResultJsonToJson(this); } -extension RtcEngineEventHandlerOnUserStateChangedJsonBufferExt - on RtcEngineEventHandlerOnUserStateChangedJson { - RtcEngineEventHandlerOnUserStateChangedJson fillBuffers( +extension MusicContentCenterEventHandlerOnMusicChartsResultJsonBufferExt + on MusicContentCenterEventHandlerOnMusicChartsResultJson { + MusicContentCenterEventHandlerOnMusicChartsResultJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1011,26 +996,26 @@ extension RtcEngineEventHandlerOnUserStateChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnUserEnableLocalVideoJson { - const RtcEngineEventHandlerOnUserEnableLocalVideoJson( - {this.connection, this.remoteUid, this.enabled}); +class MusicContentCenterEventHandlerOnMusicCollectionResultJson { + const MusicContentCenterEventHandlerOnMusicCollectionResultJson( + {this.requestId, this.result, this.errorCode}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'remoteUid') - final int? remoteUid; - @JsonKey(name: 'enabled') - final bool? enabled; - factory RtcEngineEventHandlerOnUserEnableLocalVideoJson.fromJson( + @JsonKey(name: 'requestId') + final String? requestId; + @JsonKey(name: 'result', ignore: true) + final MusicCollection? result; + @JsonKey(name: 'errorCode') + final MusicContentCenterStatusCode? errorCode; + factory MusicContentCenterEventHandlerOnMusicCollectionResultJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnUserEnableLocalVideoJsonFromJson(json); + _$MusicContentCenterEventHandlerOnMusicCollectionResultJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnUserEnableLocalVideoJsonToJson(this); + _$MusicContentCenterEventHandlerOnMusicCollectionResultJsonToJson(this); } -extension RtcEngineEventHandlerOnUserEnableLocalVideoJsonBufferExt - on RtcEngineEventHandlerOnUserEnableLocalVideoJson { - RtcEngineEventHandlerOnUserEnableLocalVideoJson fillBuffers( +extension MusicContentCenterEventHandlerOnMusicCollectionResultJsonBufferExt + on MusicContentCenterEventHandlerOnMusicCollectionResultJson { + MusicContentCenterEventHandlerOnMusicCollectionResultJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1043,24 +1028,28 @@ extension RtcEngineEventHandlerOnUserEnableLocalVideoJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnLocalAudioStatsJson { - const RtcEngineEventHandlerOnLocalAudioStatsJson( - {this.connection, this.stats}); +class MusicContentCenterEventHandlerOnLyricResultJson { + const MusicContentCenterEventHandlerOnLyricResultJson( + {this.requestId, this.songCode, this.lyricUrl, this.errorCode}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'stats') - final LocalAudioStats? stats; - factory RtcEngineEventHandlerOnLocalAudioStatsJson.fromJson( + @JsonKey(name: 'requestId') + final String? requestId; + @JsonKey(name: 'songCode') + final int? songCode; + @JsonKey(name: 'lyricUrl') + final String? lyricUrl; + @JsonKey(name: 'errorCode') + final MusicContentCenterStatusCode? errorCode; + factory MusicContentCenterEventHandlerOnLyricResultJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnLocalAudioStatsJsonFromJson(json); + _$MusicContentCenterEventHandlerOnLyricResultJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnLocalAudioStatsJsonToJson(this); + _$MusicContentCenterEventHandlerOnLyricResultJsonToJson(this); } -extension RtcEngineEventHandlerOnLocalAudioStatsJsonBufferExt - on RtcEngineEventHandlerOnLocalAudioStatsJson { - RtcEngineEventHandlerOnLocalAudioStatsJson fillBuffers( +extension MusicContentCenterEventHandlerOnLyricResultJsonBufferExt + on MusicContentCenterEventHandlerOnLyricResultJson { + MusicContentCenterEventHandlerOnLyricResultJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1073,24 +1062,28 @@ extension RtcEngineEventHandlerOnLocalAudioStatsJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnRemoteAudioStatsJson { - const RtcEngineEventHandlerOnRemoteAudioStatsJson( - {this.connection, this.stats}); +class MusicContentCenterEventHandlerOnSongSimpleInfoResultJson { + const MusicContentCenterEventHandlerOnSongSimpleInfoResultJson( + {this.requestId, this.songCode, this.simpleInfo, this.errorCode}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'stats') - final RemoteAudioStats? stats; - factory RtcEngineEventHandlerOnRemoteAudioStatsJson.fromJson( + @JsonKey(name: 'requestId') + final String? requestId; + @JsonKey(name: 'songCode') + final int? songCode; + @JsonKey(name: 'simpleInfo') + final String? simpleInfo; + @JsonKey(name: 'errorCode') + final MusicContentCenterStatusCode? errorCode; + factory MusicContentCenterEventHandlerOnSongSimpleInfoResultJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnRemoteAudioStatsJsonFromJson(json); + _$MusicContentCenterEventHandlerOnSongSimpleInfoResultJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnRemoteAudioStatsJsonToJson(this); + _$MusicContentCenterEventHandlerOnSongSimpleInfoResultJsonToJson(this); } -extension RtcEngineEventHandlerOnRemoteAudioStatsJsonBufferExt - on RtcEngineEventHandlerOnRemoteAudioStatsJson { - RtcEngineEventHandlerOnRemoteAudioStatsJson fillBuffers( +extension MusicContentCenterEventHandlerOnSongSimpleInfoResultJsonBufferExt + on MusicContentCenterEventHandlerOnSongSimpleInfoResultJson { + MusicContentCenterEventHandlerOnSongSimpleInfoResultJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1103,23 +1096,37 @@ extension RtcEngineEventHandlerOnRemoteAudioStatsJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnLocalVideoStatsJson { - const RtcEngineEventHandlerOnLocalVideoStatsJson({this.source, this.stats}); - - @JsonKey(name: 'source') - final VideoSourceType? source; - @JsonKey(name: 'stats') - final LocalVideoStats? stats; - factory RtcEngineEventHandlerOnLocalVideoStatsJson.fromJson( +class MusicContentCenterEventHandlerOnPreLoadEventJson { + const MusicContentCenterEventHandlerOnPreLoadEventJson( + {this.requestId, + this.songCode, + this.percent, + this.lyricUrl, + this.status, + this.errorCode}); + + @JsonKey(name: 'requestId') + final String? requestId; + @JsonKey(name: 'songCode') + final int? songCode; + @JsonKey(name: 'percent') + final int? percent; + @JsonKey(name: 'lyricUrl') + final String? lyricUrl; + @JsonKey(name: 'status') + final PreloadStatusCode? status; + @JsonKey(name: 'errorCode') + final MusicContentCenterStatusCode? errorCode; + factory MusicContentCenterEventHandlerOnPreLoadEventJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnLocalVideoStatsJsonFromJson(json); + _$MusicContentCenterEventHandlerOnPreLoadEventJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnLocalVideoStatsJsonToJson(this); + _$MusicContentCenterEventHandlerOnPreLoadEventJsonToJson(this); } -extension RtcEngineEventHandlerOnLocalVideoStatsJsonBufferExt - on RtcEngineEventHandlerOnLocalVideoStatsJson { - RtcEngineEventHandlerOnLocalVideoStatsJson fillBuffers( +extension MusicContentCenterEventHandlerOnPreLoadEventJsonBufferExt + on MusicContentCenterEventHandlerOnPreLoadEventJson { + MusicContentCenterEventHandlerOnPreLoadEventJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1132,24 +1139,24 @@ extension RtcEngineEventHandlerOnLocalVideoStatsJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnRemoteVideoStatsJson { - const RtcEngineEventHandlerOnRemoteVideoStatsJson( - {this.connection, this.stats}); +class RtcEngineEventHandlerOnJoinChannelSuccessJson { + const RtcEngineEventHandlerOnJoinChannelSuccessJson( + {this.connection, this.elapsed}); @JsonKey(name: 'connection') final RtcConnection? connection; - @JsonKey(name: 'stats') - final RemoteVideoStats? stats; - factory RtcEngineEventHandlerOnRemoteVideoStatsJson.fromJson( + @JsonKey(name: 'elapsed') + final int? elapsed; + factory RtcEngineEventHandlerOnJoinChannelSuccessJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnRemoteVideoStatsJsonFromJson(json); + _$RtcEngineEventHandlerOnJoinChannelSuccessJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnRemoteVideoStatsJsonToJson(this); + _$RtcEngineEventHandlerOnJoinChannelSuccessJsonToJson(this); } -extension RtcEngineEventHandlerOnRemoteVideoStatsJsonBufferExt - on RtcEngineEventHandlerOnRemoteVideoStatsJson { - RtcEngineEventHandlerOnRemoteVideoStatsJson fillBuffers( +extension RtcEngineEventHandlerOnJoinChannelSuccessJsonBufferExt + on RtcEngineEventHandlerOnJoinChannelSuccessJson { + RtcEngineEventHandlerOnJoinChannelSuccessJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1162,19 +1169,24 @@ extension RtcEngineEventHandlerOnRemoteVideoStatsJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnCameraReadyJson { - const RtcEngineEventHandlerOnCameraReadyJson(); +class RtcEngineEventHandlerOnRejoinChannelSuccessJson { + const RtcEngineEventHandlerOnRejoinChannelSuccessJson( + {this.connection, this.elapsed}); - factory RtcEngineEventHandlerOnCameraReadyJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'elapsed') + final int? elapsed; + factory RtcEngineEventHandlerOnRejoinChannelSuccessJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnCameraReadyJsonFromJson(json); + _$RtcEngineEventHandlerOnRejoinChannelSuccessJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnCameraReadyJsonToJson(this); + _$RtcEngineEventHandlerOnRejoinChannelSuccessJsonToJson(this); } -extension RtcEngineEventHandlerOnCameraReadyJsonBufferExt - on RtcEngineEventHandlerOnCameraReadyJson { - RtcEngineEventHandlerOnCameraReadyJson fillBuffers( +extension RtcEngineEventHandlerOnRejoinChannelSuccessJsonBufferExt + on RtcEngineEventHandlerOnRejoinChannelSuccessJson { + RtcEngineEventHandlerOnRejoinChannelSuccessJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1187,28 +1199,34 @@ extension RtcEngineEventHandlerOnCameraReadyJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnCameraFocusAreaChangedJson { - const RtcEngineEventHandlerOnCameraFocusAreaChangedJson( - {this.x, this.y, this.width, this.height}); +class RtcEngineEventHandlerOnProxyConnectedJson { + const RtcEngineEventHandlerOnProxyConnectedJson( + {this.channel, + this.uid, + this.proxyType, + this.localProxyIp, + this.elapsed}); - @JsonKey(name: 'x') - final int? x; - @JsonKey(name: 'y') - final int? y; - @JsonKey(name: 'width') - final int? width; - @JsonKey(name: 'height') - final int? height; - factory RtcEngineEventHandlerOnCameraFocusAreaChangedJson.fromJson( + @JsonKey(name: 'channel') + final String? channel; + @JsonKey(name: 'uid') + final int? uid; + @JsonKey(name: 'proxyType') + final ProxyType? proxyType; + @JsonKey(name: 'localProxyIp') + final String? localProxyIp; + @JsonKey(name: 'elapsed') + final int? elapsed; + factory RtcEngineEventHandlerOnProxyConnectedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnCameraFocusAreaChangedJsonFromJson(json); + _$RtcEngineEventHandlerOnProxyConnectedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnCameraFocusAreaChangedJsonToJson(this); + _$RtcEngineEventHandlerOnProxyConnectedJsonToJson(this); } -extension RtcEngineEventHandlerOnCameraFocusAreaChangedJsonBufferExt - on RtcEngineEventHandlerOnCameraFocusAreaChangedJson { - RtcEngineEventHandlerOnCameraFocusAreaChangedJson fillBuffers( +extension RtcEngineEventHandlerOnProxyConnectedJsonBufferExt + on RtcEngineEventHandlerOnProxyConnectedJson { + RtcEngineEventHandlerOnProxyConnectedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1221,29 +1239,23 @@ extension RtcEngineEventHandlerOnCameraFocusAreaChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnCameraExposureAreaChangedJson { - const RtcEngineEventHandlerOnCameraExposureAreaChangedJson( - {this.x, this.y, this.width, this.height}); +class RtcEngineEventHandlerOnErrorJson { + const RtcEngineEventHandlerOnErrorJson({this.err, this.msg}); - @JsonKey(name: 'x') - final int? x; - @JsonKey(name: 'y') - final int? y; - @JsonKey(name: 'width') - final int? width; - @JsonKey(name: 'height') - final int? height; - factory RtcEngineEventHandlerOnCameraExposureAreaChangedJson.fromJson( + @JsonKey(name: 'err') + final ErrorCodeType? err; + @JsonKey(name: 'msg') + final String? msg; + factory RtcEngineEventHandlerOnErrorJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnCameraExposureAreaChangedJsonFromJson(json); + _$RtcEngineEventHandlerOnErrorJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnCameraExposureAreaChangedJsonToJson(this); + _$RtcEngineEventHandlerOnErrorJsonToJson(this); } -extension RtcEngineEventHandlerOnCameraExposureAreaChangedJsonBufferExt - on RtcEngineEventHandlerOnCameraExposureAreaChangedJson { - RtcEngineEventHandlerOnCameraExposureAreaChangedJson fillBuffers( - List bufferList) { +extension RtcEngineEventHandlerOnErrorJsonBufferExt + on RtcEngineEventHandlerOnErrorJson { + RtcEngineEventHandlerOnErrorJson fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1255,34 +1267,30 @@ extension RtcEngineEventHandlerOnCameraExposureAreaChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnFacePositionChangedJson { - const RtcEngineEventHandlerOnFacePositionChangedJson( - {this.imageWidth, - this.imageHeight, - this.vecRectangle, - this.vecDistance, - this.numFaces}); +class RtcEngineEventHandlerOnAudioQualityJson { + const RtcEngineEventHandlerOnAudioQualityJson( + {this.connection, this.remoteUid, this.quality, this.delay, this.lost}); - @JsonKey(name: 'imageWidth') - final int? imageWidth; - @JsonKey(name: 'imageHeight') - final int? imageHeight; - @JsonKey(name: 'vecRectangle') - final List? vecRectangle; - @JsonKey(name: 'vecDistance') - final List? vecDistance; - @JsonKey(name: 'numFaces') - final int? numFaces; - factory RtcEngineEventHandlerOnFacePositionChangedJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'remoteUid') + final int? remoteUid; + @JsonKey(name: 'quality') + final QualityType? quality; + @JsonKey(name: 'delay') + final int? delay; + @JsonKey(name: 'lost') + final int? lost; + factory RtcEngineEventHandlerOnAudioQualityJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnFacePositionChangedJsonFromJson(json); + _$RtcEngineEventHandlerOnAudioQualityJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnFacePositionChangedJsonToJson(this); + _$RtcEngineEventHandlerOnAudioQualityJsonToJson(this); } -extension RtcEngineEventHandlerOnFacePositionChangedJsonBufferExt - on RtcEngineEventHandlerOnFacePositionChangedJson { - RtcEngineEventHandlerOnFacePositionChangedJson fillBuffers( +extension RtcEngineEventHandlerOnAudioQualityJsonBufferExt + on RtcEngineEventHandlerOnAudioQualityJson { + RtcEngineEventHandlerOnAudioQualityJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1295,19 +1303,21 @@ extension RtcEngineEventHandlerOnFacePositionChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnVideoStoppedJson { - const RtcEngineEventHandlerOnVideoStoppedJson(); +class RtcEngineEventHandlerOnLastmileProbeResultJson { + const RtcEngineEventHandlerOnLastmileProbeResultJson({this.result}); - factory RtcEngineEventHandlerOnVideoStoppedJson.fromJson( + @JsonKey(name: 'result') + final LastmileProbeResult? result; + factory RtcEngineEventHandlerOnLastmileProbeResultJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnVideoStoppedJsonFromJson(json); + _$RtcEngineEventHandlerOnLastmileProbeResultJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnVideoStoppedJsonToJson(this); + _$RtcEngineEventHandlerOnLastmileProbeResultJsonToJson(this); } -extension RtcEngineEventHandlerOnVideoStoppedJsonBufferExt - on RtcEngineEventHandlerOnVideoStoppedJson { - RtcEngineEventHandlerOnVideoStoppedJson fillBuffers( +extension RtcEngineEventHandlerOnLastmileProbeResultJsonBufferExt + on RtcEngineEventHandlerOnLastmileProbeResultJson { + RtcEngineEventHandlerOnLastmileProbeResultJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1320,24 +1330,28 @@ extension RtcEngineEventHandlerOnVideoStoppedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnAudioMixingStateChangedJson { - const RtcEngineEventHandlerOnAudioMixingStateChangedJson( - {this.state, this.reason}); +class RtcEngineEventHandlerOnAudioVolumeIndicationJson { + const RtcEngineEventHandlerOnAudioVolumeIndicationJson( + {this.connection, this.speakers, this.speakerNumber, this.totalVolume}); - @JsonKey(name: 'state') - final AudioMixingStateType? state; - @JsonKey(name: 'reason') - final AudioMixingReasonType? reason; - factory RtcEngineEventHandlerOnAudioMixingStateChangedJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'speakers') + final List? speakers; + @JsonKey(name: 'speakerNumber') + final int? speakerNumber; + @JsonKey(name: 'totalVolume') + final int? totalVolume; + factory RtcEngineEventHandlerOnAudioVolumeIndicationJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnAudioMixingStateChangedJsonFromJson(json); + _$RtcEngineEventHandlerOnAudioVolumeIndicationJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnAudioMixingStateChangedJsonToJson(this); + _$RtcEngineEventHandlerOnAudioVolumeIndicationJsonToJson(this); } -extension RtcEngineEventHandlerOnAudioMixingStateChangedJsonBufferExt - on RtcEngineEventHandlerOnAudioMixingStateChangedJson { - RtcEngineEventHandlerOnAudioMixingStateChangedJson fillBuffers( +extension RtcEngineEventHandlerOnAudioVolumeIndicationJsonBufferExt + on RtcEngineEventHandlerOnAudioVolumeIndicationJson { + RtcEngineEventHandlerOnAudioVolumeIndicationJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1350,24 +1364,23 @@ extension RtcEngineEventHandlerOnAudioMixingStateChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnRhythmPlayerStateChangedJson { - const RtcEngineEventHandlerOnRhythmPlayerStateChangedJson( - {this.state, this.errorCode}); +class RtcEngineEventHandlerOnLeaveChannelJson { + const RtcEngineEventHandlerOnLeaveChannelJson({this.connection, this.stats}); - @JsonKey(name: 'state') - final RhythmPlayerStateType? state; - @JsonKey(name: 'errorCode') - final RhythmPlayerErrorType? errorCode; - factory RtcEngineEventHandlerOnRhythmPlayerStateChangedJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'stats') + final RtcStats? stats; + factory RtcEngineEventHandlerOnLeaveChannelJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnRhythmPlayerStateChangedJsonFromJson(json); + _$RtcEngineEventHandlerOnLeaveChannelJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnRhythmPlayerStateChangedJsonToJson(this); + _$RtcEngineEventHandlerOnLeaveChannelJsonToJson(this); } -extension RtcEngineEventHandlerOnRhythmPlayerStateChangedJsonBufferExt - on RtcEngineEventHandlerOnRhythmPlayerStateChangedJson { - RtcEngineEventHandlerOnRhythmPlayerStateChangedJson fillBuffers( +extension RtcEngineEventHandlerOnLeaveChannelJsonBufferExt + on RtcEngineEventHandlerOnLeaveChannelJson { + RtcEngineEventHandlerOnLeaveChannelJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1380,22 +1393,23 @@ extension RtcEngineEventHandlerOnRhythmPlayerStateChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnConnectionLostJson { - const RtcEngineEventHandlerOnConnectionLostJson({this.connection}); +class RtcEngineEventHandlerOnRtcStatsJson { + const RtcEngineEventHandlerOnRtcStatsJson({this.connection, this.stats}); @JsonKey(name: 'connection') final RtcConnection? connection; - factory RtcEngineEventHandlerOnConnectionLostJson.fromJson( + @JsonKey(name: 'stats') + final RtcStats? stats; + factory RtcEngineEventHandlerOnRtcStatsJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnConnectionLostJsonFromJson(json); + _$RtcEngineEventHandlerOnRtcStatsJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnConnectionLostJsonToJson(this); + _$RtcEngineEventHandlerOnRtcStatsJsonToJson(this); } -extension RtcEngineEventHandlerOnConnectionLostJsonBufferExt - on RtcEngineEventHandlerOnConnectionLostJson { - RtcEngineEventHandlerOnConnectionLostJson fillBuffers( - List bufferList) { +extension RtcEngineEventHandlerOnRtcStatsJsonBufferExt + on RtcEngineEventHandlerOnRtcStatsJson { + RtcEngineEventHandlerOnRtcStatsJson fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -1407,21 +1421,26 @@ extension RtcEngineEventHandlerOnConnectionLostJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnConnectionInterruptedJson { - const RtcEngineEventHandlerOnConnectionInterruptedJson({this.connection}); +class RtcEngineEventHandlerOnAudioDeviceStateChangedJson { + const RtcEngineEventHandlerOnAudioDeviceStateChangedJson( + {this.deviceId, this.deviceType, this.deviceState}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - factory RtcEngineEventHandlerOnConnectionInterruptedJson.fromJson( + @JsonKey(name: 'deviceId') + final String? deviceId; + @JsonKey(name: 'deviceType') + final MediaDeviceType? deviceType; + @JsonKey(name: 'deviceState') + final MediaDeviceStateType? deviceState; + factory RtcEngineEventHandlerOnAudioDeviceStateChangedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnConnectionInterruptedJsonFromJson(json); + _$RtcEngineEventHandlerOnAudioDeviceStateChangedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnConnectionInterruptedJsonToJson(this); + _$RtcEngineEventHandlerOnAudioDeviceStateChangedJsonToJson(this); } -extension RtcEngineEventHandlerOnConnectionInterruptedJsonBufferExt - on RtcEngineEventHandlerOnConnectionInterruptedJson { - RtcEngineEventHandlerOnConnectionInterruptedJson fillBuffers( +extension RtcEngineEventHandlerOnAudioDeviceStateChangedJsonBufferExt + on RtcEngineEventHandlerOnAudioDeviceStateChangedJson { + RtcEngineEventHandlerOnAudioDeviceStateChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1434,21 +1453,21 @@ extension RtcEngineEventHandlerOnConnectionInterruptedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnConnectionBannedJson { - const RtcEngineEventHandlerOnConnectionBannedJson({this.connection}); +class RtcEngineEventHandlerOnAudioMixingPositionChangedJson { + const RtcEngineEventHandlerOnAudioMixingPositionChangedJson({this.position}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - factory RtcEngineEventHandlerOnConnectionBannedJson.fromJson( + @JsonKey(name: 'position') + final int? position; + factory RtcEngineEventHandlerOnAudioMixingPositionChangedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnConnectionBannedJsonFromJson(json); + _$RtcEngineEventHandlerOnAudioMixingPositionChangedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnConnectionBannedJsonToJson(this); + _$RtcEngineEventHandlerOnAudioMixingPositionChangedJsonToJson(this); } -extension RtcEngineEventHandlerOnConnectionBannedJsonBufferExt - on RtcEngineEventHandlerOnConnectionBannedJson { - RtcEngineEventHandlerOnConnectionBannedJson fillBuffers( +extension RtcEngineEventHandlerOnAudioMixingPositionChangedJsonBufferExt + on RtcEngineEventHandlerOnAudioMixingPositionChangedJson { + RtcEngineEventHandlerOnAudioMixingPositionChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1461,93 +1480,46 @@ extension RtcEngineEventHandlerOnConnectionBannedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnStreamMessageJson { - const RtcEngineEventHandlerOnStreamMessageJson( - {this.connection, - this.remoteUid, - this.streamId, - this.data, - this.length, - this.sentTs}); +class RtcEngineEventHandlerOnAudioMixingFinishedJson { + const RtcEngineEventHandlerOnAudioMixingFinishedJson(); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'remoteUid') - final int? remoteUid; - @JsonKey(name: 'streamId') - final int? streamId; - @JsonKey(name: 'data', ignore: true) - final Uint8List? data; - @JsonKey(name: 'length') - final int? length; - @JsonKey(name: 'sentTs') - final int? sentTs; - factory RtcEngineEventHandlerOnStreamMessageJson.fromJson( + factory RtcEngineEventHandlerOnAudioMixingFinishedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnStreamMessageJsonFromJson(json); + _$RtcEngineEventHandlerOnAudioMixingFinishedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnStreamMessageJsonToJson(this); + _$RtcEngineEventHandlerOnAudioMixingFinishedJsonToJson(this); } -extension RtcEngineEventHandlerOnStreamMessageJsonBufferExt - on RtcEngineEventHandlerOnStreamMessageJson { - RtcEngineEventHandlerOnStreamMessageJson fillBuffers( +extension RtcEngineEventHandlerOnAudioMixingFinishedJsonBufferExt + on RtcEngineEventHandlerOnAudioMixingFinishedJson { + RtcEngineEventHandlerOnAudioMixingFinishedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; - Uint8List? data; - if (bufferList.length > 0) { - data = bufferList[0]; - } - return RtcEngineEventHandlerOnStreamMessageJson( - connection: connection, - remoteUid: remoteUid, - streamId: streamId, - data: data, - length: length, - sentTs: sentTs); + return this; } List collectBufferList() { final bufferList = []; - if (data != null) { - bufferList.add(data!); - } return bufferList; } } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnStreamMessageErrorJson { - const RtcEngineEventHandlerOnStreamMessageErrorJson( - {this.connection, - this.remoteUid, - this.streamId, - this.code, - this.missed, - this.cached}); +class RtcEngineEventHandlerOnAudioEffectFinishedJson { + const RtcEngineEventHandlerOnAudioEffectFinishedJson({this.soundId}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'remoteUid') - final int? remoteUid; - @JsonKey(name: 'streamId') - final int? streamId; - @JsonKey(name: 'code') - final ErrorCodeType? code; - @JsonKey(name: 'missed') - final int? missed; - @JsonKey(name: 'cached') - final int? cached; - factory RtcEngineEventHandlerOnStreamMessageErrorJson.fromJson( + @JsonKey(name: 'soundId') + final int? soundId; + factory RtcEngineEventHandlerOnAudioEffectFinishedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnStreamMessageErrorJsonFromJson(json); + _$RtcEngineEventHandlerOnAudioEffectFinishedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnStreamMessageErrorJsonToJson(this); + _$RtcEngineEventHandlerOnAudioEffectFinishedJsonToJson(this); } -extension RtcEngineEventHandlerOnStreamMessageErrorJsonBufferExt - on RtcEngineEventHandlerOnStreamMessageErrorJson { - RtcEngineEventHandlerOnStreamMessageErrorJson fillBuffers( +extension RtcEngineEventHandlerOnAudioEffectFinishedJsonBufferExt + on RtcEngineEventHandlerOnAudioEffectFinishedJson { + RtcEngineEventHandlerOnAudioEffectFinishedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1560,21 +1532,26 @@ extension RtcEngineEventHandlerOnStreamMessageErrorJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnRequestTokenJson { - const RtcEngineEventHandlerOnRequestTokenJson({this.connection}); +class RtcEngineEventHandlerOnVideoDeviceStateChangedJson { + const RtcEngineEventHandlerOnVideoDeviceStateChangedJson( + {this.deviceId, this.deviceType, this.deviceState}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - factory RtcEngineEventHandlerOnRequestTokenJson.fromJson( + @JsonKey(name: 'deviceId') + final String? deviceId; + @JsonKey(name: 'deviceType') + final MediaDeviceType? deviceType; + @JsonKey(name: 'deviceState') + final MediaDeviceStateType? deviceState; + factory RtcEngineEventHandlerOnVideoDeviceStateChangedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnRequestTokenJsonFromJson(json); + _$RtcEngineEventHandlerOnVideoDeviceStateChangedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnRequestTokenJsonToJson(this); + _$RtcEngineEventHandlerOnVideoDeviceStateChangedJsonToJson(this); } -extension RtcEngineEventHandlerOnRequestTokenJsonBufferExt - on RtcEngineEventHandlerOnRequestTokenJson { - RtcEngineEventHandlerOnRequestTokenJson fillBuffers( +extension RtcEngineEventHandlerOnVideoDeviceStateChangedJsonBufferExt + on RtcEngineEventHandlerOnVideoDeviceStateChangedJson { + RtcEngineEventHandlerOnVideoDeviceStateChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1587,24 +1564,28 @@ extension RtcEngineEventHandlerOnRequestTokenJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnTokenPrivilegeWillExpireJson { - const RtcEngineEventHandlerOnTokenPrivilegeWillExpireJson( - {this.connection, this.token}); +class RtcEngineEventHandlerOnNetworkQualityJson { + const RtcEngineEventHandlerOnNetworkQualityJson( + {this.connection, this.remoteUid, this.txQuality, this.rxQuality}); @JsonKey(name: 'connection') final RtcConnection? connection; - @JsonKey(name: 'token') - final String? token; - factory RtcEngineEventHandlerOnTokenPrivilegeWillExpireJson.fromJson( + @JsonKey(name: 'remoteUid') + final int? remoteUid; + @JsonKey(name: 'txQuality') + final QualityType? txQuality; + @JsonKey(name: 'rxQuality') + final QualityType? rxQuality; + factory RtcEngineEventHandlerOnNetworkQualityJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnTokenPrivilegeWillExpireJsonFromJson(json); + _$RtcEngineEventHandlerOnNetworkQualityJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnTokenPrivilegeWillExpireJsonToJson(this); + _$RtcEngineEventHandlerOnNetworkQualityJsonToJson(this); } -extension RtcEngineEventHandlerOnTokenPrivilegeWillExpireJsonBufferExt - on RtcEngineEventHandlerOnTokenPrivilegeWillExpireJson { - RtcEngineEventHandlerOnTokenPrivilegeWillExpireJson fillBuffers( +extension RtcEngineEventHandlerOnNetworkQualityJsonBufferExt + on RtcEngineEventHandlerOnNetworkQualityJson { + RtcEngineEventHandlerOnNetworkQualityJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1617,24 +1598,21 @@ extension RtcEngineEventHandlerOnTokenPrivilegeWillExpireJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnLicenseValidationFailureJson { - const RtcEngineEventHandlerOnLicenseValidationFailureJson( - {this.connection, this.reason}); +class RtcEngineEventHandlerOnIntraRequestReceivedJson { + const RtcEngineEventHandlerOnIntraRequestReceivedJson({this.connection}); @JsonKey(name: 'connection') final RtcConnection? connection; - @JsonKey(name: 'reason') - final LicenseErrorType? reason; - factory RtcEngineEventHandlerOnLicenseValidationFailureJson.fromJson( + factory RtcEngineEventHandlerOnIntraRequestReceivedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnLicenseValidationFailureJsonFromJson(json); + _$RtcEngineEventHandlerOnIntraRequestReceivedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnLicenseValidationFailureJsonToJson(this); + _$RtcEngineEventHandlerOnIntraRequestReceivedJsonToJson(this); } -extension RtcEngineEventHandlerOnLicenseValidationFailureJsonBufferExt - on RtcEngineEventHandlerOnLicenseValidationFailureJson { - RtcEngineEventHandlerOnLicenseValidationFailureJson fillBuffers( +extension RtcEngineEventHandlerOnIntraRequestReceivedJsonBufferExt + on RtcEngineEventHandlerOnIntraRequestReceivedJson { + RtcEngineEventHandlerOnIntraRequestReceivedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1647,24 +1625,21 @@ extension RtcEngineEventHandlerOnLicenseValidationFailureJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJson { - const RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJson( - {this.connection, this.elapsed}); +class RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJson { + const RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJson({this.info}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'elapsed') - final int? elapsed; - factory RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJson.fromJson( + @JsonKey(name: 'info') + final UplinkNetworkInfo? info; + factory RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJsonFromJson(json); + _$RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJsonToJson(this); + _$RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJsonToJson(this); } -extension RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJsonBufferExt - on RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJson { - RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJson fillBuffers( +extension RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJsonBufferExt + on RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJson { + RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1677,26 +1652,21 @@ extension RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnFirstRemoteAudioFrameJson { - const RtcEngineEventHandlerOnFirstRemoteAudioFrameJson( - {this.connection, this.userId, this.elapsed}); +class RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJson { + const RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJson({this.info}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'userId') - final int? userId; - @JsonKey(name: 'elapsed') - final int? elapsed; - factory RtcEngineEventHandlerOnFirstRemoteAudioFrameJson.fromJson( + @JsonKey(name: 'info') + final DownlinkNetworkInfo? info; + factory RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnFirstRemoteAudioFrameJsonFromJson(json); + _$RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnFirstRemoteAudioFrameJsonToJson(this); + _$RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJsonToJson(this); } -extension RtcEngineEventHandlerOnFirstRemoteAudioFrameJsonBufferExt - on RtcEngineEventHandlerOnFirstRemoteAudioFrameJson { - RtcEngineEventHandlerOnFirstRemoteAudioFrameJson fillBuffers( +extension RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJsonBufferExt + on RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJson { + RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1709,26 +1679,21 @@ extension RtcEngineEventHandlerOnFirstRemoteAudioFrameJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson { - const RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson( - {this.connection, this.uid, this.elapsed}); +class RtcEngineEventHandlerOnLastmileQualityJson { + const RtcEngineEventHandlerOnLastmileQualityJson({this.quality}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'uid') - final int? uid; - @JsonKey(name: 'elapsed') - final int? elapsed; - factory RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson.fromJson( + @JsonKey(name: 'quality') + final QualityType? quality; + factory RtcEngineEventHandlerOnLastmileQualityJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnFirstRemoteAudioDecodedJsonFromJson(json); + _$RtcEngineEventHandlerOnLastmileQualityJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnFirstRemoteAudioDecodedJsonToJson(this); + _$RtcEngineEventHandlerOnLastmileQualityJsonToJson(this); } -extension RtcEngineEventHandlerOnFirstRemoteAudioDecodedJsonBufferExt - on RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson { - RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson fillBuffers( +extension RtcEngineEventHandlerOnLastmileQualityJsonBufferExt + on RtcEngineEventHandlerOnLastmileQualityJson { + RtcEngineEventHandlerOnLastmileQualityJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1741,26 +1706,28 @@ extension RtcEngineEventHandlerOnFirstRemoteAudioDecodedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnLocalAudioStateChangedJson { - const RtcEngineEventHandlerOnLocalAudioStateChangedJson( - {this.connection, this.state, this.error}); +class RtcEngineEventHandlerOnFirstLocalVideoFrameJson { + const RtcEngineEventHandlerOnFirstLocalVideoFrameJson( + {this.source, this.width, this.height, this.elapsed}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'state') - final LocalAudioStreamState? state; - @JsonKey(name: 'error') - final LocalAudioStreamError? error; - factory RtcEngineEventHandlerOnLocalAudioStateChangedJson.fromJson( + @JsonKey(name: 'source') + final VideoSourceType? source; + @JsonKey(name: 'width') + final int? width; + @JsonKey(name: 'height') + final int? height; + @JsonKey(name: 'elapsed') + final int? elapsed; + factory RtcEngineEventHandlerOnFirstLocalVideoFrameJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnLocalAudioStateChangedJsonFromJson(json); + _$RtcEngineEventHandlerOnFirstLocalVideoFrameJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnLocalAudioStateChangedJsonToJson(this); + _$RtcEngineEventHandlerOnFirstLocalVideoFrameJsonToJson(this); } -extension RtcEngineEventHandlerOnLocalAudioStateChangedJsonBufferExt - on RtcEngineEventHandlerOnLocalAudioStateChangedJson { - RtcEngineEventHandlerOnLocalAudioStateChangedJson fillBuffers( +extension RtcEngineEventHandlerOnFirstLocalVideoFrameJsonBufferExt + on RtcEngineEventHandlerOnFirstLocalVideoFrameJson { + RtcEngineEventHandlerOnFirstLocalVideoFrameJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1773,30 +1740,24 @@ extension RtcEngineEventHandlerOnLocalAudioStateChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnRemoteAudioStateChangedJson { - const RtcEngineEventHandlerOnRemoteAudioStateChangedJson( - {this.connection, this.remoteUid, this.state, this.reason, this.elapsed}); +class RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJson { + const RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJson( + {this.source, this.elapsed}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'remoteUid') - final int? remoteUid; - @JsonKey(name: 'state') - final RemoteAudioState? state; - @JsonKey(name: 'reason') - final RemoteAudioStateReason? reason; + @JsonKey(name: 'source') + final VideoSourceType? source; @JsonKey(name: 'elapsed') final int? elapsed; - factory RtcEngineEventHandlerOnRemoteAudioStateChangedJson.fromJson( + factory RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnRemoteAudioStateChangedJsonFromJson(json); + _$RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnRemoteAudioStateChangedJsonToJson(this); + _$RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJsonToJson(this); } -extension RtcEngineEventHandlerOnRemoteAudioStateChangedJsonBufferExt - on RtcEngineEventHandlerOnRemoteAudioStateChangedJson { - RtcEngineEventHandlerOnRemoteAudioStateChangedJson fillBuffers( +extension RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJsonBufferExt + on RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJson { + RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1809,50 +1770,30 @@ extension RtcEngineEventHandlerOnRemoteAudioStateChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnActiveSpeakerJson { - const RtcEngineEventHandlerOnActiveSpeakerJson({this.connection, this.uid}); +class RtcEngineEventHandlerOnFirstRemoteVideoDecodedJson { + const RtcEngineEventHandlerOnFirstRemoteVideoDecodedJson( + {this.connection, this.remoteUid, this.width, this.height, this.elapsed}); @JsonKey(name: 'connection') final RtcConnection? connection; - @JsonKey(name: 'uid') - final int? uid; - factory RtcEngineEventHandlerOnActiveSpeakerJson.fromJson( - Map json) => - _$RtcEngineEventHandlerOnActiveSpeakerJsonFromJson(json); - Map toJson() => - _$RtcEngineEventHandlerOnActiveSpeakerJsonToJson(this); -} - -extension RtcEngineEventHandlerOnActiveSpeakerJsonBufferExt - on RtcEngineEventHandlerOnActiveSpeakerJson { - RtcEngineEventHandlerOnActiveSpeakerJson fillBuffers( - List bufferList) { - if (bufferList.isEmpty) return this; - return this; - } - - List collectBufferList() { - final bufferList = []; - return bufferList; - } -} - -@JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnContentInspectResultJson { - const RtcEngineEventHandlerOnContentInspectResultJson({this.result}); - - @JsonKey(name: 'result') - final ContentInspectResult? result; - factory RtcEngineEventHandlerOnContentInspectResultJson.fromJson( + @JsonKey(name: 'remoteUid') + final int? remoteUid; + @JsonKey(name: 'width') + final int? width; + @JsonKey(name: 'height') + final int? height; + @JsonKey(name: 'elapsed') + final int? elapsed; + factory RtcEngineEventHandlerOnFirstRemoteVideoDecodedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnContentInspectResultJsonFromJson(json); + _$RtcEngineEventHandlerOnFirstRemoteVideoDecodedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnContentInspectResultJsonToJson(this); + _$RtcEngineEventHandlerOnFirstRemoteVideoDecodedJsonToJson(this); } -extension RtcEngineEventHandlerOnContentInspectResultJsonBufferExt - on RtcEngineEventHandlerOnContentInspectResultJson { - RtcEngineEventHandlerOnContentInspectResultJson fillBuffers( +extension RtcEngineEventHandlerOnFirstRemoteVideoDecodedJsonBufferExt + on RtcEngineEventHandlerOnFirstRemoteVideoDecodedJson { + RtcEngineEventHandlerOnFirstRemoteVideoDecodedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1865,37 +1806,37 @@ extension RtcEngineEventHandlerOnContentInspectResultJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnSnapshotTakenJson { - const RtcEngineEventHandlerOnSnapshotTakenJson( +class RtcEngineEventHandlerOnVideoSizeChangedJson { + const RtcEngineEventHandlerOnVideoSizeChangedJson( {this.connection, + this.sourceType, this.uid, - this.filePath, this.width, this.height, - this.errCode}); + this.rotation}); @JsonKey(name: 'connection') final RtcConnection? connection; + @JsonKey(name: 'sourceType') + final VideoSourceType? sourceType; @JsonKey(name: 'uid') final int? uid; - @JsonKey(name: 'filePath') - final String? filePath; @JsonKey(name: 'width') final int? width; @JsonKey(name: 'height') final int? height; - @JsonKey(name: 'errCode') - final int? errCode; - factory RtcEngineEventHandlerOnSnapshotTakenJson.fromJson( + @JsonKey(name: 'rotation') + final int? rotation; + factory RtcEngineEventHandlerOnVideoSizeChangedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnSnapshotTakenJsonFromJson(json); + _$RtcEngineEventHandlerOnVideoSizeChangedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnSnapshotTakenJsonToJson(this); + _$RtcEngineEventHandlerOnVideoSizeChangedJsonToJson(this); } -extension RtcEngineEventHandlerOnSnapshotTakenJsonBufferExt - on RtcEngineEventHandlerOnSnapshotTakenJson { - RtcEngineEventHandlerOnSnapshotTakenJson fillBuffers( +extension RtcEngineEventHandlerOnVideoSizeChangedJsonBufferExt + on RtcEngineEventHandlerOnVideoSizeChangedJson { + RtcEngineEventHandlerOnVideoSizeChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1908,28 +1849,26 @@ extension RtcEngineEventHandlerOnSnapshotTakenJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnClientRoleChangedJson { - const RtcEngineEventHandlerOnClientRoleChangedJson( - {this.connection, this.oldRole, this.newRole, this.newRoleOptions}); +class RtcEngineEventHandlerOnLocalVideoStateChangedJson { + const RtcEngineEventHandlerOnLocalVideoStateChangedJson( + {this.source, this.state, this.error}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'oldRole') - final ClientRoleType? oldRole; - @JsonKey(name: 'newRole') - final ClientRoleType? newRole; - @JsonKey(name: 'newRoleOptions') - final ClientRoleOptions? newRoleOptions; - factory RtcEngineEventHandlerOnClientRoleChangedJson.fromJson( + @JsonKey(name: 'source') + final VideoSourceType? source; + @JsonKey(name: 'state') + final LocalVideoStreamState? state; + @JsonKey(name: 'error') + final LocalVideoStreamError? error; + factory RtcEngineEventHandlerOnLocalVideoStateChangedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnClientRoleChangedJsonFromJson(json); + _$RtcEngineEventHandlerOnLocalVideoStateChangedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnClientRoleChangedJsonToJson(this); + _$RtcEngineEventHandlerOnLocalVideoStateChangedJsonToJson(this); } -extension RtcEngineEventHandlerOnClientRoleChangedJsonBufferExt - on RtcEngineEventHandlerOnClientRoleChangedJson { - RtcEngineEventHandlerOnClientRoleChangedJson fillBuffers( +extension RtcEngineEventHandlerOnLocalVideoStateChangedJsonBufferExt + on RtcEngineEventHandlerOnLocalVideoStateChangedJson { + RtcEngineEventHandlerOnLocalVideoStateChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1942,26 +1881,30 @@ extension RtcEngineEventHandlerOnClientRoleChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnClientRoleChangeFailedJson { - const RtcEngineEventHandlerOnClientRoleChangeFailedJson( - {this.connection, this.reason, this.currentRole}); +class RtcEngineEventHandlerOnRemoteVideoStateChangedJson { + const RtcEngineEventHandlerOnRemoteVideoStateChangedJson( + {this.connection, this.remoteUid, this.state, this.reason, this.elapsed}); @JsonKey(name: 'connection') final RtcConnection? connection; + @JsonKey(name: 'remoteUid') + final int? remoteUid; + @JsonKey(name: 'state') + final RemoteVideoState? state; @JsonKey(name: 'reason') - final ClientRoleChangeFailedReason? reason; - @JsonKey(name: 'currentRole') - final ClientRoleType? currentRole; - factory RtcEngineEventHandlerOnClientRoleChangeFailedJson.fromJson( + final RemoteVideoStateReason? reason; + @JsonKey(name: 'elapsed') + final int? elapsed; + factory RtcEngineEventHandlerOnRemoteVideoStateChangedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnClientRoleChangeFailedJsonFromJson(json); + _$RtcEngineEventHandlerOnRemoteVideoStateChangedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnClientRoleChangeFailedJsonToJson(this); + _$RtcEngineEventHandlerOnRemoteVideoStateChangedJsonToJson(this); } -extension RtcEngineEventHandlerOnClientRoleChangeFailedJsonBufferExt - on RtcEngineEventHandlerOnClientRoleChangeFailedJson { - RtcEngineEventHandlerOnClientRoleChangeFailedJson fillBuffers( +extension RtcEngineEventHandlerOnRemoteVideoStateChangedJsonBufferExt + on RtcEngineEventHandlerOnRemoteVideoStateChangedJson { + RtcEngineEventHandlerOnRemoteVideoStateChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -1974,26 +1917,30 @@ extension RtcEngineEventHandlerOnClientRoleChangeFailedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnAudioDeviceVolumeChangedJson { - const RtcEngineEventHandlerOnAudioDeviceVolumeChangedJson( - {this.deviceType, this.volume, this.muted}); +class RtcEngineEventHandlerOnFirstRemoteVideoFrameJson { + const RtcEngineEventHandlerOnFirstRemoteVideoFrameJson( + {this.connection, this.remoteUid, this.width, this.height, this.elapsed}); - @JsonKey(name: 'deviceType') - final MediaDeviceType? deviceType; - @JsonKey(name: 'volume') - final int? volume; - @JsonKey(name: 'muted') - final bool? muted; - factory RtcEngineEventHandlerOnAudioDeviceVolumeChangedJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'remoteUid') + final int? remoteUid; + @JsonKey(name: 'width') + final int? width; + @JsonKey(name: 'height') + final int? height; + @JsonKey(name: 'elapsed') + final int? elapsed; + factory RtcEngineEventHandlerOnFirstRemoteVideoFrameJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnAudioDeviceVolumeChangedJsonFromJson(json); + _$RtcEngineEventHandlerOnFirstRemoteVideoFrameJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnAudioDeviceVolumeChangedJsonToJson(this); + _$RtcEngineEventHandlerOnFirstRemoteVideoFrameJsonToJson(this); } -extension RtcEngineEventHandlerOnAudioDeviceVolumeChangedJsonBufferExt - on RtcEngineEventHandlerOnAudioDeviceVolumeChangedJson { - RtcEngineEventHandlerOnAudioDeviceVolumeChangedJson fillBuffers( +extension RtcEngineEventHandlerOnFirstRemoteVideoFrameJsonBufferExt + on RtcEngineEventHandlerOnFirstRemoteVideoFrameJson { + RtcEngineEventHandlerOnFirstRemoteVideoFrameJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2006,26 +1953,26 @@ extension RtcEngineEventHandlerOnAudioDeviceVolumeChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnRtmpStreamingStateChangedJson { - const RtcEngineEventHandlerOnRtmpStreamingStateChangedJson( - {this.url, this.state, this.errCode}); +class RtcEngineEventHandlerOnUserJoinedJson { + const RtcEngineEventHandlerOnUserJoinedJson( + {this.connection, this.remoteUid, this.elapsed}); - @JsonKey(name: 'url') - final String? url; - @JsonKey(name: 'state') - final RtmpStreamPublishState? state; - @JsonKey(name: 'errCode') - final RtmpStreamPublishErrorType? errCode; - factory RtcEngineEventHandlerOnRtmpStreamingStateChangedJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'remoteUid') + final int? remoteUid; + @JsonKey(name: 'elapsed') + final int? elapsed; + factory RtcEngineEventHandlerOnUserJoinedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnRtmpStreamingStateChangedJsonFromJson(json); + _$RtcEngineEventHandlerOnUserJoinedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnRtmpStreamingStateChangedJsonToJson(this); + _$RtcEngineEventHandlerOnUserJoinedJsonToJson(this); } -extension RtcEngineEventHandlerOnRtmpStreamingStateChangedJsonBufferExt - on RtcEngineEventHandlerOnRtmpStreamingStateChangedJson { - RtcEngineEventHandlerOnRtmpStreamingStateChangedJson fillBuffers( +extension RtcEngineEventHandlerOnUserJoinedJsonBufferExt + on RtcEngineEventHandlerOnUserJoinedJson { + RtcEngineEventHandlerOnUserJoinedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2038,24 +1985,26 @@ extension RtcEngineEventHandlerOnRtmpStreamingStateChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnRtmpStreamingEventJson { - const RtcEngineEventHandlerOnRtmpStreamingEventJson( - {this.url, this.eventCode}); +class RtcEngineEventHandlerOnUserOfflineJson { + const RtcEngineEventHandlerOnUserOfflineJson( + {this.connection, this.remoteUid, this.reason}); - @JsonKey(name: 'url') - final String? url; - @JsonKey(name: 'eventCode') - final RtmpStreamingEvent? eventCode; - factory RtcEngineEventHandlerOnRtmpStreamingEventJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'remoteUid') + final int? remoteUid; + @JsonKey(name: 'reason') + final UserOfflineReasonType? reason; + factory RtcEngineEventHandlerOnUserOfflineJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnRtmpStreamingEventJsonFromJson(json); + _$RtcEngineEventHandlerOnUserOfflineJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnRtmpStreamingEventJsonToJson(this); + _$RtcEngineEventHandlerOnUserOfflineJsonToJson(this); } -extension RtcEngineEventHandlerOnRtmpStreamingEventJsonBufferExt - on RtcEngineEventHandlerOnRtmpStreamingEventJson { - RtcEngineEventHandlerOnRtmpStreamingEventJson fillBuffers( +extension RtcEngineEventHandlerOnUserOfflineJsonBufferExt + on RtcEngineEventHandlerOnUserOfflineJson { + RtcEngineEventHandlerOnUserOfflineJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2068,19 +2017,26 @@ extension RtcEngineEventHandlerOnRtmpStreamingEventJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnTranscodingUpdatedJson { - const RtcEngineEventHandlerOnTranscodingUpdatedJson(); +class RtcEngineEventHandlerOnUserMuteAudioJson { + const RtcEngineEventHandlerOnUserMuteAudioJson( + {this.connection, this.remoteUid, this.muted}); - factory RtcEngineEventHandlerOnTranscodingUpdatedJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'remoteUid') + final int? remoteUid; + @JsonKey(name: 'muted') + final bool? muted; + factory RtcEngineEventHandlerOnUserMuteAudioJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnTranscodingUpdatedJsonFromJson(json); + _$RtcEngineEventHandlerOnUserMuteAudioJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnTranscodingUpdatedJsonToJson(this); + _$RtcEngineEventHandlerOnUserMuteAudioJsonToJson(this); } -extension RtcEngineEventHandlerOnTranscodingUpdatedJsonBufferExt - on RtcEngineEventHandlerOnTranscodingUpdatedJson { - RtcEngineEventHandlerOnTranscodingUpdatedJson fillBuffers( +extension RtcEngineEventHandlerOnUserMuteAudioJsonBufferExt + on RtcEngineEventHandlerOnUserMuteAudioJson { + RtcEngineEventHandlerOnUserMuteAudioJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2093,21 +2049,26 @@ extension RtcEngineEventHandlerOnTranscodingUpdatedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnAudioRoutingChangedJson { - const RtcEngineEventHandlerOnAudioRoutingChangedJson({this.routing}); +class RtcEngineEventHandlerOnUserMuteVideoJson { + const RtcEngineEventHandlerOnUserMuteVideoJson( + {this.connection, this.remoteUid, this.muted}); - @JsonKey(name: 'routing') - final int? routing; - factory RtcEngineEventHandlerOnAudioRoutingChangedJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'remoteUid') + final int? remoteUid; + @JsonKey(name: 'muted') + final bool? muted; + factory RtcEngineEventHandlerOnUserMuteVideoJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnAudioRoutingChangedJsonFromJson(json); + _$RtcEngineEventHandlerOnUserMuteVideoJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnAudioRoutingChangedJsonToJson(this); + _$RtcEngineEventHandlerOnUserMuteVideoJsonToJson(this); } -extension RtcEngineEventHandlerOnAudioRoutingChangedJsonBufferExt - on RtcEngineEventHandlerOnAudioRoutingChangedJson { - RtcEngineEventHandlerOnAudioRoutingChangedJson fillBuffers( +extension RtcEngineEventHandlerOnUserMuteVideoJsonBufferExt + on RtcEngineEventHandlerOnUserMuteVideoJson { + RtcEngineEventHandlerOnUserMuteVideoJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2120,24 +2081,26 @@ extension RtcEngineEventHandlerOnAudioRoutingChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnChannelMediaRelayStateChangedJson { - const RtcEngineEventHandlerOnChannelMediaRelayStateChangedJson( - {this.state, this.code}); +class RtcEngineEventHandlerOnUserEnableVideoJson { + const RtcEngineEventHandlerOnUserEnableVideoJson( + {this.connection, this.remoteUid, this.enabled}); - @JsonKey(name: 'state') - final ChannelMediaRelayState? state; - @JsonKey(name: 'code') - final ChannelMediaRelayError? code; - factory RtcEngineEventHandlerOnChannelMediaRelayStateChangedJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'remoteUid') + final int? remoteUid; + @JsonKey(name: 'enabled') + final bool? enabled; + factory RtcEngineEventHandlerOnUserEnableVideoJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnChannelMediaRelayStateChangedJsonFromJson(json); + _$RtcEngineEventHandlerOnUserEnableVideoJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnChannelMediaRelayStateChangedJsonToJson(this); + _$RtcEngineEventHandlerOnUserEnableVideoJsonToJson(this); } -extension RtcEngineEventHandlerOnChannelMediaRelayStateChangedJsonBufferExt - on RtcEngineEventHandlerOnChannelMediaRelayStateChangedJson { - RtcEngineEventHandlerOnChannelMediaRelayStateChangedJson fillBuffers( +extension RtcEngineEventHandlerOnUserEnableVideoJsonBufferExt + on RtcEngineEventHandlerOnUserEnableVideoJson { + RtcEngineEventHandlerOnUserEnableVideoJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2150,21 +2113,26 @@ extension RtcEngineEventHandlerOnChannelMediaRelayStateChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnChannelMediaRelayEventJson { - const RtcEngineEventHandlerOnChannelMediaRelayEventJson({this.code}); +class RtcEngineEventHandlerOnUserStateChangedJson { + const RtcEngineEventHandlerOnUserStateChangedJson( + {this.connection, this.remoteUid, this.state}); - @JsonKey(name: 'code') - final ChannelMediaRelayEvent? code; - factory RtcEngineEventHandlerOnChannelMediaRelayEventJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'remoteUid') + final int? remoteUid; + @JsonKey(name: 'state') + final int? state; + factory RtcEngineEventHandlerOnUserStateChangedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnChannelMediaRelayEventJsonFromJson(json); + _$RtcEngineEventHandlerOnUserStateChangedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnChannelMediaRelayEventJsonToJson(this); + _$RtcEngineEventHandlerOnUserStateChangedJsonToJson(this); } -extension RtcEngineEventHandlerOnChannelMediaRelayEventJsonBufferExt - on RtcEngineEventHandlerOnChannelMediaRelayEventJson { - RtcEngineEventHandlerOnChannelMediaRelayEventJson fillBuffers( +extension RtcEngineEventHandlerOnUserStateChangedJsonBufferExt + on RtcEngineEventHandlerOnUserStateChangedJson { + RtcEngineEventHandlerOnUserStateChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2177,23 +2145,26 @@ extension RtcEngineEventHandlerOnChannelMediaRelayEventJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJson { - const RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJson( - {this.isFallbackOrRecover}); +class RtcEngineEventHandlerOnUserEnableLocalVideoJson { + const RtcEngineEventHandlerOnUserEnableLocalVideoJson( + {this.connection, this.remoteUid, this.enabled}); - @JsonKey(name: 'isFallbackOrRecover') - final bool? isFallbackOrRecover; - factory RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'remoteUid') + final int? remoteUid; + @JsonKey(name: 'enabled') + final bool? enabled; + factory RtcEngineEventHandlerOnUserEnableLocalVideoJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJsonFromJson( - json); + _$RtcEngineEventHandlerOnUserEnableLocalVideoJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJsonToJson(this); + _$RtcEngineEventHandlerOnUserEnableLocalVideoJsonToJson(this); } -extension RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJsonBufferExt - on RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJson { - RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJson fillBuffers( +extension RtcEngineEventHandlerOnUserEnableLocalVideoJsonBufferExt + on RtcEngineEventHandlerOnUserEnableLocalVideoJson { + RtcEngineEventHandlerOnUserEnableLocalVideoJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2206,26 +2177,24 @@ extension RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJson { - const RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJson( - {this.uid, this.isFallbackOrRecover}); +class RtcEngineEventHandlerOnLocalAudioStatsJson { + const RtcEngineEventHandlerOnLocalAudioStatsJson( + {this.connection, this.stats}); - @JsonKey(name: 'uid') - final int? uid; - @JsonKey(name: 'isFallbackOrRecover') - final bool? isFallbackOrRecover; - factory RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'stats') + final LocalAudioStats? stats; + factory RtcEngineEventHandlerOnLocalAudioStatsJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJsonFromJson( - json); + _$RtcEngineEventHandlerOnLocalAudioStatsJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJsonToJson( - this); + _$RtcEngineEventHandlerOnLocalAudioStatsJsonToJson(this); } -extension RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJsonBufferExt - on RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJson { - RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJson fillBuffers( +extension RtcEngineEventHandlerOnLocalAudioStatsJsonBufferExt + on RtcEngineEventHandlerOnLocalAudioStatsJson { + RtcEngineEventHandlerOnLocalAudioStatsJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2238,34 +2207,24 @@ extension RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnRemoteAudioTransportStatsJson { - const RtcEngineEventHandlerOnRemoteAudioTransportStatsJson( - {this.connection, - this.remoteUid, - this.delay, - this.lost, - this.rxKBitRate}); +class RtcEngineEventHandlerOnRemoteAudioStatsJson { + const RtcEngineEventHandlerOnRemoteAudioStatsJson( + {this.connection, this.stats}); @JsonKey(name: 'connection') final RtcConnection? connection; - @JsonKey(name: 'remoteUid') - final int? remoteUid; - @JsonKey(name: 'delay') - final int? delay; - @JsonKey(name: 'lost') - final int? lost; - @JsonKey(name: 'rxKBitRate') - final int? rxKBitRate; - factory RtcEngineEventHandlerOnRemoteAudioTransportStatsJson.fromJson( + @JsonKey(name: 'stats') + final RemoteAudioStats? stats; + factory RtcEngineEventHandlerOnRemoteAudioStatsJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnRemoteAudioTransportStatsJsonFromJson(json); + _$RtcEngineEventHandlerOnRemoteAudioStatsJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnRemoteAudioTransportStatsJsonToJson(this); + _$RtcEngineEventHandlerOnRemoteAudioStatsJsonToJson(this); } -extension RtcEngineEventHandlerOnRemoteAudioTransportStatsJsonBufferExt - on RtcEngineEventHandlerOnRemoteAudioTransportStatsJson { - RtcEngineEventHandlerOnRemoteAudioTransportStatsJson fillBuffers( +extension RtcEngineEventHandlerOnRemoteAudioStatsJsonBufferExt + on RtcEngineEventHandlerOnRemoteAudioStatsJson { + RtcEngineEventHandlerOnRemoteAudioStatsJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2278,34 +2237,23 @@ extension RtcEngineEventHandlerOnRemoteAudioTransportStatsJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnRemoteVideoTransportStatsJson { - const RtcEngineEventHandlerOnRemoteVideoTransportStatsJson( - {this.connection, - this.remoteUid, - this.delay, - this.lost, - this.rxKBitRate}); +class RtcEngineEventHandlerOnLocalVideoStatsJson { + const RtcEngineEventHandlerOnLocalVideoStatsJson({this.source, this.stats}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'remoteUid') - final int? remoteUid; - @JsonKey(name: 'delay') - final int? delay; - @JsonKey(name: 'lost') - final int? lost; - @JsonKey(name: 'rxKBitRate') - final int? rxKBitRate; - factory RtcEngineEventHandlerOnRemoteVideoTransportStatsJson.fromJson( + @JsonKey(name: 'source') + final VideoSourceType? source; + @JsonKey(name: 'stats') + final LocalVideoStats? stats; + factory RtcEngineEventHandlerOnLocalVideoStatsJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnRemoteVideoTransportStatsJsonFromJson(json); + _$RtcEngineEventHandlerOnLocalVideoStatsJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnRemoteVideoTransportStatsJsonToJson(this); + _$RtcEngineEventHandlerOnLocalVideoStatsJsonToJson(this); } -extension RtcEngineEventHandlerOnRemoteVideoTransportStatsJsonBufferExt - on RtcEngineEventHandlerOnRemoteVideoTransportStatsJson { - RtcEngineEventHandlerOnRemoteVideoTransportStatsJson fillBuffers( +extension RtcEngineEventHandlerOnLocalVideoStatsJsonBufferExt + on RtcEngineEventHandlerOnLocalVideoStatsJson { + RtcEngineEventHandlerOnLocalVideoStatsJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2318,26 +2266,24 @@ extension RtcEngineEventHandlerOnRemoteVideoTransportStatsJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnConnectionStateChangedJson { - const RtcEngineEventHandlerOnConnectionStateChangedJson( - {this.connection, this.state, this.reason}); +class RtcEngineEventHandlerOnRemoteVideoStatsJson { + const RtcEngineEventHandlerOnRemoteVideoStatsJson( + {this.connection, this.stats}); @JsonKey(name: 'connection') final RtcConnection? connection; - @JsonKey(name: 'state') - final ConnectionStateType? state; - @JsonKey(name: 'reason') - final ConnectionChangedReasonType? reason; - factory RtcEngineEventHandlerOnConnectionStateChangedJson.fromJson( + @JsonKey(name: 'stats') + final RemoteVideoStats? stats; + factory RtcEngineEventHandlerOnRemoteVideoStatsJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnConnectionStateChangedJsonFromJson(json); + _$RtcEngineEventHandlerOnRemoteVideoStatsJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnConnectionStateChangedJsonToJson(this); + _$RtcEngineEventHandlerOnRemoteVideoStatsJsonToJson(this); } -extension RtcEngineEventHandlerOnConnectionStateChangedJsonBufferExt - on RtcEngineEventHandlerOnConnectionStateChangedJson { - RtcEngineEventHandlerOnConnectionStateChangedJson fillBuffers( +extension RtcEngineEventHandlerOnRemoteVideoStatsJsonBufferExt + on RtcEngineEventHandlerOnRemoteVideoStatsJson { + RtcEngineEventHandlerOnRemoteVideoStatsJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2350,28 +2296,19 @@ extension RtcEngineEventHandlerOnConnectionStateChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnWlAccMessageJson { - const RtcEngineEventHandlerOnWlAccMessageJson( - {this.connection, this.reason, this.action, this.wlAccMsg}); +class RtcEngineEventHandlerOnCameraReadyJson { + const RtcEngineEventHandlerOnCameraReadyJson(); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'reason') - final WlaccMessageReason? reason; - @JsonKey(name: 'action') - final WlaccSuggestAction? action; - @JsonKey(name: 'wlAccMsg') - final String? wlAccMsg; - factory RtcEngineEventHandlerOnWlAccMessageJson.fromJson( + factory RtcEngineEventHandlerOnCameraReadyJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnWlAccMessageJsonFromJson(json); + _$RtcEngineEventHandlerOnCameraReadyJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnWlAccMessageJsonToJson(this); + _$RtcEngineEventHandlerOnCameraReadyJsonToJson(this); } -extension RtcEngineEventHandlerOnWlAccMessageJsonBufferExt - on RtcEngineEventHandlerOnWlAccMessageJson { - RtcEngineEventHandlerOnWlAccMessageJson fillBuffers( +extension RtcEngineEventHandlerOnCameraReadyJsonBufferExt + on RtcEngineEventHandlerOnCameraReadyJson { + RtcEngineEventHandlerOnCameraReadyJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2384,26 +2321,28 @@ extension RtcEngineEventHandlerOnWlAccMessageJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnWlAccStatsJson { - const RtcEngineEventHandlerOnWlAccStatsJson( - {this.connection, this.currentStats, this.averageStats}); +class RtcEngineEventHandlerOnCameraFocusAreaChangedJson { + const RtcEngineEventHandlerOnCameraFocusAreaChangedJson( + {this.x, this.y, this.width, this.height}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'currentStats') - final WlAccStats? currentStats; - @JsonKey(name: 'averageStats') - final WlAccStats? averageStats; - factory RtcEngineEventHandlerOnWlAccStatsJson.fromJson( + @JsonKey(name: 'x') + final int? x; + @JsonKey(name: 'y') + final int? y; + @JsonKey(name: 'width') + final int? width; + @JsonKey(name: 'height') + final int? height; + factory RtcEngineEventHandlerOnCameraFocusAreaChangedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnWlAccStatsJsonFromJson(json); + _$RtcEngineEventHandlerOnCameraFocusAreaChangedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnWlAccStatsJsonToJson(this); + _$RtcEngineEventHandlerOnCameraFocusAreaChangedJsonToJson(this); } -extension RtcEngineEventHandlerOnWlAccStatsJsonBufferExt - on RtcEngineEventHandlerOnWlAccStatsJson { - RtcEngineEventHandlerOnWlAccStatsJson fillBuffers( +extension RtcEngineEventHandlerOnCameraFocusAreaChangedJsonBufferExt + on RtcEngineEventHandlerOnCameraFocusAreaChangedJson { + RtcEngineEventHandlerOnCameraFocusAreaChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2416,24 +2355,28 @@ extension RtcEngineEventHandlerOnWlAccStatsJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnNetworkTypeChangedJson { - const RtcEngineEventHandlerOnNetworkTypeChangedJson( - {this.connection, this.type}); +class RtcEngineEventHandlerOnCameraExposureAreaChangedJson { + const RtcEngineEventHandlerOnCameraExposureAreaChangedJson( + {this.x, this.y, this.width, this.height}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'type') - final NetworkType? type; - factory RtcEngineEventHandlerOnNetworkTypeChangedJson.fromJson( + @JsonKey(name: 'x') + final int? x; + @JsonKey(name: 'y') + final int? y; + @JsonKey(name: 'width') + final int? width; + @JsonKey(name: 'height') + final int? height; + factory RtcEngineEventHandlerOnCameraExposureAreaChangedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnNetworkTypeChangedJsonFromJson(json); + _$RtcEngineEventHandlerOnCameraExposureAreaChangedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnNetworkTypeChangedJsonToJson(this); + _$RtcEngineEventHandlerOnCameraExposureAreaChangedJsonToJson(this); } -extension RtcEngineEventHandlerOnNetworkTypeChangedJsonBufferExt - on RtcEngineEventHandlerOnNetworkTypeChangedJson { - RtcEngineEventHandlerOnNetworkTypeChangedJson fillBuffers( +extension RtcEngineEventHandlerOnCameraExposureAreaChangedJsonBufferExt + on RtcEngineEventHandlerOnCameraExposureAreaChangedJson { + RtcEngineEventHandlerOnCameraExposureAreaChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2446,24 +2389,34 @@ extension RtcEngineEventHandlerOnNetworkTypeChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnEncryptionErrorJson { - const RtcEngineEventHandlerOnEncryptionErrorJson( - {this.connection, this.errorType}); +class RtcEngineEventHandlerOnFacePositionChangedJson { + const RtcEngineEventHandlerOnFacePositionChangedJson( + {this.imageWidth, + this.imageHeight, + this.vecRectangle, + this.vecDistance, + this.numFaces}); - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'errorType') - final EncryptionErrorType? errorType; - factory RtcEngineEventHandlerOnEncryptionErrorJson.fromJson( + @JsonKey(name: 'imageWidth') + final int? imageWidth; + @JsonKey(name: 'imageHeight') + final int? imageHeight; + @JsonKey(name: 'vecRectangle') + final List? vecRectangle; + @JsonKey(name: 'vecDistance') + final List? vecDistance; + @JsonKey(name: 'numFaces') + final int? numFaces; + factory RtcEngineEventHandlerOnFacePositionChangedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnEncryptionErrorJsonFromJson(json); + _$RtcEngineEventHandlerOnFacePositionChangedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnEncryptionErrorJsonToJson(this); + _$RtcEngineEventHandlerOnFacePositionChangedJsonToJson(this); } -extension RtcEngineEventHandlerOnEncryptionErrorJsonBufferExt - on RtcEngineEventHandlerOnEncryptionErrorJson { - RtcEngineEventHandlerOnEncryptionErrorJson fillBuffers( +extension RtcEngineEventHandlerOnFacePositionChangedJsonBufferExt + on RtcEngineEventHandlerOnFacePositionChangedJson { + RtcEngineEventHandlerOnFacePositionChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2476,21 +2429,19 @@ extension RtcEngineEventHandlerOnEncryptionErrorJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnPermissionErrorJson { - const RtcEngineEventHandlerOnPermissionErrorJson({this.permissionType}); +class RtcEngineEventHandlerOnVideoStoppedJson { + const RtcEngineEventHandlerOnVideoStoppedJson(); - @JsonKey(name: 'permissionType') - final PermissionType? permissionType; - factory RtcEngineEventHandlerOnPermissionErrorJson.fromJson( + factory RtcEngineEventHandlerOnVideoStoppedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnPermissionErrorJsonFromJson(json); + _$RtcEngineEventHandlerOnVideoStoppedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnPermissionErrorJsonToJson(this); + _$RtcEngineEventHandlerOnVideoStoppedJsonToJson(this); } -extension RtcEngineEventHandlerOnPermissionErrorJsonBufferExt - on RtcEngineEventHandlerOnPermissionErrorJson { - RtcEngineEventHandlerOnPermissionErrorJson fillBuffers( +extension RtcEngineEventHandlerOnVideoStoppedJsonBufferExt + on RtcEngineEventHandlerOnVideoStoppedJson { + RtcEngineEventHandlerOnVideoStoppedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2503,24 +2454,24 @@ extension RtcEngineEventHandlerOnPermissionErrorJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnLocalUserRegisteredJson { - const RtcEngineEventHandlerOnLocalUserRegisteredJson( - {this.uid, this.userAccount}); +class RtcEngineEventHandlerOnAudioMixingStateChangedJson { + const RtcEngineEventHandlerOnAudioMixingStateChangedJson( + {this.state, this.reason}); - @JsonKey(name: 'uid') - final int? uid; - @JsonKey(name: 'userAccount') - final String? userAccount; - factory RtcEngineEventHandlerOnLocalUserRegisteredJson.fromJson( + @JsonKey(name: 'state') + final AudioMixingStateType? state; + @JsonKey(name: 'reason') + final AudioMixingReasonType? reason; + factory RtcEngineEventHandlerOnAudioMixingStateChangedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnLocalUserRegisteredJsonFromJson(json); + _$RtcEngineEventHandlerOnAudioMixingStateChangedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnLocalUserRegisteredJsonToJson(this); + _$RtcEngineEventHandlerOnAudioMixingStateChangedJsonToJson(this); } -extension RtcEngineEventHandlerOnLocalUserRegisteredJsonBufferExt - on RtcEngineEventHandlerOnLocalUserRegisteredJson { - RtcEngineEventHandlerOnLocalUserRegisteredJson fillBuffers( +extension RtcEngineEventHandlerOnAudioMixingStateChangedJsonBufferExt + on RtcEngineEventHandlerOnAudioMixingStateChangedJson { + RtcEngineEventHandlerOnAudioMixingStateChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2533,23 +2484,24 @@ extension RtcEngineEventHandlerOnLocalUserRegisteredJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnUserInfoUpdatedJson { - const RtcEngineEventHandlerOnUserInfoUpdatedJson({this.uid, this.info}); +class RtcEngineEventHandlerOnRhythmPlayerStateChangedJson { + const RtcEngineEventHandlerOnRhythmPlayerStateChangedJson( + {this.state, this.errorCode}); - @JsonKey(name: 'uid') - final int? uid; - @JsonKey(name: 'info') - final UserInfo? info; - factory RtcEngineEventHandlerOnUserInfoUpdatedJson.fromJson( + @JsonKey(name: 'state') + final RhythmPlayerStateType? state; + @JsonKey(name: 'errorCode') + final RhythmPlayerErrorType? errorCode; + factory RtcEngineEventHandlerOnRhythmPlayerStateChangedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnUserInfoUpdatedJsonFromJson(json); + _$RtcEngineEventHandlerOnRhythmPlayerStateChangedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnUserInfoUpdatedJsonToJson(this); + _$RtcEngineEventHandlerOnRhythmPlayerStateChangedJsonToJson(this); } -extension RtcEngineEventHandlerOnUserInfoUpdatedJsonBufferExt - on RtcEngineEventHandlerOnUserInfoUpdatedJson { - RtcEngineEventHandlerOnUserInfoUpdatedJson fillBuffers( +extension RtcEngineEventHandlerOnRhythmPlayerStateChangedJsonBufferExt + on RtcEngineEventHandlerOnRhythmPlayerStateChangedJson { + RtcEngineEventHandlerOnRhythmPlayerStateChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2562,28 +2514,21 @@ extension RtcEngineEventHandlerOnUserInfoUpdatedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnUploadLogResultJson { - const RtcEngineEventHandlerOnUploadLogResultJson( - {this.connection, this.requestId, this.success, this.reason}); +class RtcEngineEventHandlerOnConnectionLostJson { + const RtcEngineEventHandlerOnConnectionLostJson({this.connection}); @JsonKey(name: 'connection') final RtcConnection? connection; - @JsonKey(name: 'requestId') - final String? requestId; - @JsonKey(name: 'success') - final bool? success; - @JsonKey(name: 'reason') - final UploadErrorReason? reason; - factory RtcEngineEventHandlerOnUploadLogResultJson.fromJson( + factory RtcEngineEventHandlerOnConnectionLostJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnUploadLogResultJsonFromJson(json); + _$RtcEngineEventHandlerOnConnectionLostJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnUploadLogResultJsonToJson(this); + _$RtcEngineEventHandlerOnConnectionLostJsonToJson(this); } -extension RtcEngineEventHandlerOnUploadLogResultJsonBufferExt - on RtcEngineEventHandlerOnUploadLogResultJson { - RtcEngineEventHandlerOnUploadLogResultJson fillBuffers( +extension RtcEngineEventHandlerOnConnectionLostJsonBufferExt + on RtcEngineEventHandlerOnConnectionLostJson { + RtcEngineEventHandlerOnConnectionLostJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2596,34 +2541,21 @@ extension RtcEngineEventHandlerOnUploadLogResultJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnAudioSubscribeStateChangedJson { - const RtcEngineEventHandlerOnAudioSubscribeStateChangedJson( - {this.channel, - this.uid, - this.oldState, - this.newState, - this.elapseSinceLastState}); +class RtcEngineEventHandlerOnConnectionInterruptedJson { + const RtcEngineEventHandlerOnConnectionInterruptedJson({this.connection}); - @JsonKey(name: 'channel') - final String? channel; - @JsonKey(name: 'uid') - final int? uid; - @JsonKey(name: 'oldState') - final StreamSubscribeState? oldState; - @JsonKey(name: 'newState') - final StreamSubscribeState? newState; - @JsonKey(name: 'elapseSinceLastState') - final int? elapseSinceLastState; - factory RtcEngineEventHandlerOnAudioSubscribeStateChangedJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + factory RtcEngineEventHandlerOnConnectionInterruptedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnAudioSubscribeStateChangedJsonFromJson(json); + _$RtcEngineEventHandlerOnConnectionInterruptedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnAudioSubscribeStateChangedJsonToJson(this); + _$RtcEngineEventHandlerOnConnectionInterruptedJsonToJson(this); } -extension RtcEngineEventHandlerOnAudioSubscribeStateChangedJsonBufferExt - on RtcEngineEventHandlerOnAudioSubscribeStateChangedJson { - RtcEngineEventHandlerOnAudioSubscribeStateChangedJson fillBuffers( +extension RtcEngineEventHandlerOnConnectionInterruptedJsonBufferExt + on RtcEngineEventHandlerOnConnectionInterruptedJson { + RtcEngineEventHandlerOnConnectionInterruptedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2636,34 +2568,21 @@ extension RtcEngineEventHandlerOnAudioSubscribeStateChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnVideoSubscribeStateChangedJson { - const RtcEngineEventHandlerOnVideoSubscribeStateChangedJson( - {this.channel, - this.uid, - this.oldState, - this.newState, - this.elapseSinceLastState}); +class RtcEngineEventHandlerOnConnectionBannedJson { + const RtcEngineEventHandlerOnConnectionBannedJson({this.connection}); - @JsonKey(name: 'channel') - final String? channel; - @JsonKey(name: 'uid') - final int? uid; - @JsonKey(name: 'oldState') - final StreamSubscribeState? oldState; - @JsonKey(name: 'newState') - final StreamSubscribeState? newState; - @JsonKey(name: 'elapseSinceLastState') - final int? elapseSinceLastState; - factory RtcEngineEventHandlerOnVideoSubscribeStateChangedJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + factory RtcEngineEventHandlerOnConnectionBannedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnVideoSubscribeStateChangedJsonFromJson(json); + _$RtcEngineEventHandlerOnConnectionBannedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnVideoSubscribeStateChangedJsonToJson(this); + _$RtcEngineEventHandlerOnConnectionBannedJsonToJson(this); } -extension RtcEngineEventHandlerOnVideoSubscribeStateChangedJsonBufferExt - on RtcEngineEventHandlerOnVideoSubscribeStateChangedJson { - RtcEngineEventHandlerOnVideoSubscribeStateChangedJson fillBuffers( +extension RtcEngineEventHandlerOnConnectionBannedJsonBufferExt + on RtcEngineEventHandlerOnConnectionBannedJson { + RtcEngineEventHandlerOnConnectionBannedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2676,68 +2595,93 @@ extension RtcEngineEventHandlerOnVideoSubscribeStateChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnAudioPublishStateChangedJson { - const RtcEngineEventHandlerOnAudioPublishStateChangedJson( - {this.channel, this.oldState, this.newState, this.elapseSinceLastState}); +class RtcEngineEventHandlerOnStreamMessageJson { + const RtcEngineEventHandlerOnStreamMessageJson( + {this.connection, + this.remoteUid, + this.streamId, + this.data, + this.length, + this.sentTs}); - @JsonKey(name: 'channel') - final String? channel; - @JsonKey(name: 'oldState') - final StreamPublishState? oldState; - @JsonKey(name: 'newState') - final StreamPublishState? newState; - @JsonKey(name: 'elapseSinceLastState') - final int? elapseSinceLastState; - factory RtcEngineEventHandlerOnAudioPublishStateChangedJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'remoteUid') + final int? remoteUid; + @JsonKey(name: 'streamId') + final int? streamId; + @JsonKey(name: 'data', ignore: true) + final Uint8List? data; + @JsonKey(name: 'length') + final int? length; + @JsonKey(name: 'sentTs') + final int? sentTs; + factory RtcEngineEventHandlerOnStreamMessageJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnAudioPublishStateChangedJsonFromJson(json); + _$RtcEngineEventHandlerOnStreamMessageJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnAudioPublishStateChangedJsonToJson(this); + _$RtcEngineEventHandlerOnStreamMessageJsonToJson(this); } -extension RtcEngineEventHandlerOnAudioPublishStateChangedJsonBufferExt - on RtcEngineEventHandlerOnAudioPublishStateChangedJson { - RtcEngineEventHandlerOnAudioPublishStateChangedJson fillBuffers( +extension RtcEngineEventHandlerOnStreamMessageJsonBufferExt + on RtcEngineEventHandlerOnStreamMessageJson { + RtcEngineEventHandlerOnStreamMessageJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; - return this; + Uint8List? data; + if (bufferList.length > 0) { + data = bufferList[0]; + } + return RtcEngineEventHandlerOnStreamMessageJson( + connection: connection, + remoteUid: remoteUid, + streamId: streamId, + data: data, + length: length, + sentTs: sentTs); } List collectBufferList() { final bufferList = []; + if (data != null) { + bufferList.add(data!); + } return bufferList; } } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnVideoPublishStateChangedJson { - const RtcEngineEventHandlerOnVideoPublishStateChangedJson( - {this.source, - this.channel, - this.oldState, - this.newState, - this.elapseSinceLastState}); +class RtcEngineEventHandlerOnStreamMessageErrorJson { + const RtcEngineEventHandlerOnStreamMessageErrorJson( + {this.connection, + this.remoteUid, + this.streamId, + this.code, + this.missed, + this.cached}); - @JsonKey(name: 'source') - final VideoSourceType? source; - @JsonKey(name: 'channel') - final String? channel; - @JsonKey(name: 'oldState') - final StreamPublishState? oldState; - @JsonKey(name: 'newState') - final StreamPublishState? newState; - @JsonKey(name: 'elapseSinceLastState') - final int? elapseSinceLastState; - factory RtcEngineEventHandlerOnVideoPublishStateChangedJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'remoteUid') + final int? remoteUid; + @JsonKey(name: 'streamId') + final int? streamId; + @JsonKey(name: 'code') + final ErrorCodeType? code; + @JsonKey(name: 'missed') + final int? missed; + @JsonKey(name: 'cached') + final int? cached; + factory RtcEngineEventHandlerOnStreamMessageErrorJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnVideoPublishStateChangedJsonFromJson(json); + _$RtcEngineEventHandlerOnStreamMessageErrorJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnVideoPublishStateChangedJsonToJson(this); + _$RtcEngineEventHandlerOnStreamMessageErrorJsonToJson(this); } -extension RtcEngineEventHandlerOnVideoPublishStateChangedJsonBufferExt - on RtcEngineEventHandlerOnVideoPublishStateChangedJson { - RtcEngineEventHandlerOnVideoPublishStateChangedJson fillBuffers( +extension RtcEngineEventHandlerOnStreamMessageErrorJsonBufferExt + on RtcEngineEventHandlerOnStreamMessageErrorJson { + RtcEngineEventHandlerOnStreamMessageErrorJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2750,28 +2694,21 @@ extension RtcEngineEventHandlerOnVideoPublishStateChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnExtensionEventJson { - const RtcEngineEventHandlerOnExtensionEventJson( - {this.provider, this.extension, this.key, this.value}); +class RtcEngineEventHandlerOnRequestTokenJson { + const RtcEngineEventHandlerOnRequestTokenJson({this.connection}); - @JsonKey(name: 'provider') - final String? provider; - @JsonKey(name: 'extension') - final String? extension; - @JsonKey(name: 'key') - final String? key; - @JsonKey(name: 'value') - final String? value; - factory RtcEngineEventHandlerOnExtensionEventJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + factory RtcEngineEventHandlerOnRequestTokenJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnExtensionEventJsonFromJson(json); + _$RtcEngineEventHandlerOnRequestTokenJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnExtensionEventJsonToJson(this); + _$RtcEngineEventHandlerOnRequestTokenJsonToJson(this); } -extension RtcEngineEventHandlerOnExtensionEventJsonBufferExt - on RtcEngineEventHandlerOnExtensionEventJson { - RtcEngineEventHandlerOnExtensionEventJson fillBuffers( +extension RtcEngineEventHandlerOnRequestTokenJsonBufferExt + on RtcEngineEventHandlerOnRequestTokenJson { + RtcEngineEventHandlerOnRequestTokenJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2784,24 +2721,24 @@ extension RtcEngineEventHandlerOnExtensionEventJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnExtensionStartedJson { - const RtcEngineEventHandlerOnExtensionStartedJson( - {this.provider, this.extension}); +class RtcEngineEventHandlerOnTokenPrivilegeWillExpireJson { + const RtcEngineEventHandlerOnTokenPrivilegeWillExpireJson( + {this.connection, this.token}); - @JsonKey(name: 'provider') - final String? provider; - @JsonKey(name: 'extension') - final String? extension; - factory RtcEngineEventHandlerOnExtensionStartedJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'token') + final String? token; + factory RtcEngineEventHandlerOnTokenPrivilegeWillExpireJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnExtensionStartedJsonFromJson(json); + _$RtcEngineEventHandlerOnTokenPrivilegeWillExpireJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnExtensionStartedJsonToJson(this); + _$RtcEngineEventHandlerOnTokenPrivilegeWillExpireJsonToJson(this); } -extension RtcEngineEventHandlerOnExtensionStartedJsonBufferExt - on RtcEngineEventHandlerOnExtensionStartedJson { - RtcEngineEventHandlerOnExtensionStartedJson fillBuffers( +extension RtcEngineEventHandlerOnTokenPrivilegeWillExpireJsonBufferExt + on RtcEngineEventHandlerOnTokenPrivilegeWillExpireJson { + RtcEngineEventHandlerOnTokenPrivilegeWillExpireJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2814,24 +2751,24 @@ extension RtcEngineEventHandlerOnExtensionStartedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnExtensionStoppedJson { - const RtcEngineEventHandlerOnExtensionStoppedJson( - {this.provider, this.extension}); +class RtcEngineEventHandlerOnLicenseValidationFailureJson { + const RtcEngineEventHandlerOnLicenseValidationFailureJson( + {this.connection, this.reason}); - @JsonKey(name: 'provider') - final String? provider; - @JsonKey(name: 'extension') - final String? extension; - factory RtcEngineEventHandlerOnExtensionStoppedJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'reason') + final LicenseErrorType? reason; + factory RtcEngineEventHandlerOnLicenseValidationFailureJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnExtensionStoppedJsonFromJson(json); + _$RtcEngineEventHandlerOnLicenseValidationFailureJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnExtensionStoppedJsonToJson(this); + _$RtcEngineEventHandlerOnLicenseValidationFailureJsonToJson(this); } -extension RtcEngineEventHandlerOnExtensionStoppedJsonBufferExt - on RtcEngineEventHandlerOnExtensionStoppedJson { - RtcEngineEventHandlerOnExtensionStoppedJson fillBuffers( +extension RtcEngineEventHandlerOnLicenseValidationFailureJsonBufferExt + on RtcEngineEventHandlerOnLicenseValidationFailureJson { + RtcEngineEventHandlerOnLicenseValidationFailureJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2844,28 +2781,56 @@ extension RtcEngineEventHandlerOnExtensionStoppedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnExtensionErrorJson { - const RtcEngineEventHandlerOnExtensionErrorJson( - {this.provider, this.extension, this.error, this.message}); +class RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJson { + const RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJson( + {this.connection, this.elapsed}); - @JsonKey(name: 'provider') - final String? provider; - @JsonKey(name: 'extension') - final String? extension; - @JsonKey(name: 'error') - final int? error; - @JsonKey(name: 'message') - final String? message; - factory RtcEngineEventHandlerOnExtensionErrorJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'elapsed') + final int? elapsed; + factory RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJson.fromJson( + Map json) => + _$RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJsonFromJson(json); + Map toJson() => + _$RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJsonToJson(this); +} + +extension RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJsonBufferExt + on RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJson { + RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJson fillBuffers( + List bufferList) { + if (bufferList.isEmpty) return this; + return this; + } + + List collectBufferList() { + final bufferList = []; + return bufferList; + } +} + +@JsonSerializable(explicitToJson: true) +class RtcEngineEventHandlerOnFirstRemoteAudioFrameJson { + const RtcEngineEventHandlerOnFirstRemoteAudioFrameJson( + {this.connection, this.userId, this.elapsed}); + + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'userId') + final int? userId; + @JsonKey(name: 'elapsed') + final int? elapsed; + factory RtcEngineEventHandlerOnFirstRemoteAudioFrameJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnExtensionErrorJsonFromJson(json); + _$RtcEngineEventHandlerOnFirstRemoteAudioFrameJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnExtensionErrorJsonToJson(this); + _$RtcEngineEventHandlerOnFirstRemoteAudioFrameJsonToJson(this); } -extension RtcEngineEventHandlerOnExtensionErrorJsonBufferExt - on RtcEngineEventHandlerOnExtensionErrorJson { - RtcEngineEventHandlerOnExtensionErrorJson fillBuffers( +extension RtcEngineEventHandlerOnFirstRemoteAudioFrameJsonBufferExt + on RtcEngineEventHandlerOnFirstRemoteAudioFrameJson { + RtcEngineEventHandlerOnFirstRemoteAudioFrameJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2878,26 +2843,26 @@ extension RtcEngineEventHandlerOnExtensionErrorJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnUserAccountUpdatedJson { - const RtcEngineEventHandlerOnUserAccountUpdatedJson( - {this.connection, this.remoteUid, this.userAccount}); +class RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson { + const RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson( + {this.connection, this.uid, this.elapsed}); @JsonKey(name: 'connection') final RtcConnection? connection; - @JsonKey(name: 'remoteUid') - final int? remoteUid; - @JsonKey(name: 'userAccount') - final String? userAccount; - factory RtcEngineEventHandlerOnUserAccountUpdatedJson.fromJson( + @JsonKey(name: 'uid') + final int? uid; + @JsonKey(name: 'elapsed') + final int? elapsed; + factory RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnUserAccountUpdatedJsonFromJson(json); + _$RtcEngineEventHandlerOnFirstRemoteAudioDecodedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnUserAccountUpdatedJsonToJson(this); + _$RtcEngineEventHandlerOnFirstRemoteAudioDecodedJsonToJson(this); } -extension RtcEngineEventHandlerOnUserAccountUpdatedJsonBufferExt - on RtcEngineEventHandlerOnUserAccountUpdatedJson { - RtcEngineEventHandlerOnUserAccountUpdatedJson fillBuffers( +extension RtcEngineEventHandlerOnFirstRemoteAudioDecodedJsonBufferExt + on RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson { + RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2910,24 +2875,26 @@ extension RtcEngineEventHandlerOnUserAccountUpdatedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson { - const RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson( - {this.stream, this.error}); +class RtcEngineEventHandlerOnLocalAudioStateChangedJson { + const RtcEngineEventHandlerOnLocalAudioStateChangedJson( + {this.connection, this.state, this.error}); - @JsonKey(name: 'stream') - final TranscodingVideoStream? stream; + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'state') + final LocalAudioStreamState? state; @JsonKey(name: 'error') - final VideoTranscoderError? error; - factory RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson.fromJson( + final LocalAudioStreamError? error; + factory RtcEngineEventHandlerOnLocalAudioStateChangedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnLocalVideoTranscoderErrorJsonFromJson(json); + _$RtcEngineEventHandlerOnLocalAudioStateChangedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnLocalVideoTranscoderErrorJsonToJson(this); + _$RtcEngineEventHandlerOnLocalAudioStateChangedJsonToJson(this); } -extension RtcEngineEventHandlerOnLocalVideoTranscoderErrorJsonBufferExt - on RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson { - RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson fillBuffers( +extension RtcEngineEventHandlerOnLocalAudioStateChangedJsonBufferExt + on RtcEngineEventHandlerOnLocalAudioStateChangedJson { + RtcEngineEventHandlerOnLocalAudioStateChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2940,28 +2907,30 @@ extension RtcEngineEventHandlerOnLocalVideoTranscoderErrorJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnVideoRenderingTracingResultJson { - const RtcEngineEventHandlerOnVideoRenderingTracingResultJson( - {this.connection, this.uid, this.currentEvent, this.tracingInfo}); +class RtcEngineEventHandlerOnRemoteAudioStateChangedJson { + const RtcEngineEventHandlerOnRemoteAudioStateChangedJson( + {this.connection, this.remoteUid, this.state, this.reason, this.elapsed}); @JsonKey(name: 'connection') final RtcConnection? connection; - @JsonKey(name: 'uid') - final int? uid; - @JsonKey(name: 'currentEvent') - final MediaTraceEvent? currentEvent; - @JsonKey(name: 'tracingInfo') - final VideoRenderingTracingInfo? tracingInfo; - factory RtcEngineEventHandlerOnVideoRenderingTracingResultJson.fromJson( + @JsonKey(name: 'remoteUid') + final int? remoteUid; + @JsonKey(name: 'state') + final RemoteAudioState? state; + @JsonKey(name: 'reason') + final RemoteAudioStateReason? reason; + @JsonKey(name: 'elapsed') + final int? elapsed; + factory RtcEngineEventHandlerOnRemoteAudioStateChangedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnVideoRenderingTracingResultJsonFromJson(json); + _$RtcEngineEventHandlerOnRemoteAudioStateChangedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnVideoRenderingTracingResultJsonToJson(this); + _$RtcEngineEventHandlerOnRemoteAudioStateChangedJsonToJson(this); } -extension RtcEngineEventHandlerOnVideoRenderingTracingResultJsonBufferExt - on RtcEngineEventHandlerOnVideoRenderingTracingResultJson { - RtcEngineEventHandlerOnVideoRenderingTracingResultJson fillBuffers( +extension RtcEngineEventHandlerOnRemoteAudioStateChangedJsonBufferExt + on RtcEngineEventHandlerOnRemoteAudioStateChangedJson { + RtcEngineEventHandlerOnRemoteAudioStateChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2974,21 +2943,23 @@ extension RtcEngineEventHandlerOnVideoRenderingTracingResultJsonBufferExt } @JsonSerializable(explicitToJson: true) -class MetadataObserverOnMetadataReceivedJson { - const MetadataObserverOnMetadataReceivedJson({this.metadata}); +class RtcEngineEventHandlerOnActiveSpeakerJson { + const RtcEngineEventHandlerOnActiveSpeakerJson({this.connection, this.uid}); - @JsonKey(name: 'metadata') - final Metadata? metadata; - factory MetadataObserverOnMetadataReceivedJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'uid') + final int? uid; + factory RtcEngineEventHandlerOnActiveSpeakerJson.fromJson( Map json) => - _$MetadataObserverOnMetadataReceivedJsonFromJson(json); + _$RtcEngineEventHandlerOnActiveSpeakerJsonFromJson(json); Map toJson() => - _$MetadataObserverOnMetadataReceivedJsonToJson(this); + _$RtcEngineEventHandlerOnActiveSpeakerJsonToJson(this); } -extension MetadataObserverOnMetadataReceivedJsonBufferExt - on MetadataObserverOnMetadataReceivedJson { - MetadataObserverOnMetadataReceivedJson fillBuffers( +extension RtcEngineEventHandlerOnActiveSpeakerJsonBufferExt + on RtcEngineEventHandlerOnActiveSpeakerJson { + RtcEngineEventHandlerOnActiveSpeakerJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3001,29 +2972,22 @@ extension MetadataObserverOnMetadataReceivedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJson { - const DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJson( - {this.state, this.error, this.message}); +class RtcEngineEventHandlerOnContentInspectResultJson { + const RtcEngineEventHandlerOnContentInspectResultJson({this.result}); - @JsonKey(name: 'state') - final DirectCdnStreamingState? state; - @JsonKey(name: 'error') - final DirectCdnStreamingError? error; - @JsonKey(name: 'message') - final String? message; - factory DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJson.fromJson( + @JsonKey(name: 'result') + final ContentInspectResult? result; + factory RtcEngineEventHandlerOnContentInspectResultJson.fromJson( Map json) => - _$DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJsonFromJson( - json); + _$RtcEngineEventHandlerOnContentInspectResultJsonFromJson(json); Map toJson() => - _$DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJsonToJson( - this); + _$RtcEngineEventHandlerOnContentInspectResultJsonToJson(this); } -extension DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJsonBufferExt - on DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJson { - DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJson - fillBuffers(List bufferList) { +extension RtcEngineEventHandlerOnContentInspectResultJsonBufferExt + on RtcEngineEventHandlerOnContentInspectResultJson { + RtcEngineEventHandlerOnContentInspectResultJson fillBuffers( + List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -3035,23 +2999,37 @@ extension DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJsonBuff } @JsonSerializable(explicitToJson: true) -class DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJson { - const DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJson( - {this.stats}); +class RtcEngineEventHandlerOnSnapshotTakenJson { + const RtcEngineEventHandlerOnSnapshotTakenJson( + {this.connection, + this.uid, + this.filePath, + this.width, + this.height, + this.errCode}); - @JsonKey(name: 'stats') - final DirectCdnStreamingStats? stats; - factory DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'uid') + final int? uid; + @JsonKey(name: 'filePath') + final String? filePath; + @JsonKey(name: 'width') + final int? width; + @JsonKey(name: 'height') + final int? height; + @JsonKey(name: 'errCode') + final int? errCode; + factory RtcEngineEventHandlerOnSnapshotTakenJson.fromJson( Map json) => - _$DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJsonFromJson( - json); + _$RtcEngineEventHandlerOnSnapshotTakenJsonFromJson(json); Map toJson() => - _$DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJsonToJson(this); + _$RtcEngineEventHandlerOnSnapshotTakenJsonToJson(this); } -extension DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJsonBufferExt - on DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJson { - DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJson fillBuffers( +extension RtcEngineEventHandlerOnSnapshotTakenJsonBufferExt + on RtcEngineEventHandlerOnSnapshotTakenJson { + RtcEngineEventHandlerOnSnapshotTakenJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3064,145 +3042,125 @@ extension DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJsonBufferExt } @JsonSerializable(explicitToJson: true) -class AudioEncodedFrameObserverOnRecordAudioEncodedFrameJson { - const AudioEncodedFrameObserverOnRecordAudioEncodedFrameJson( - {this.frameBuffer, this.length, this.audioEncodedFrameInfo}); +class RtcEngineEventHandlerOnClientRoleChangedJson { + const RtcEngineEventHandlerOnClientRoleChangedJson( + {this.connection, this.oldRole, this.newRole, this.newRoleOptions}); - @JsonKey(name: 'frameBuffer', ignore: true) - final Uint8List? frameBuffer; - @JsonKey(name: 'length') - final int? length; - @JsonKey(name: 'audioEncodedFrameInfo') - final EncodedAudioFrameInfo? audioEncodedFrameInfo; - factory AudioEncodedFrameObserverOnRecordAudioEncodedFrameJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'oldRole') + final ClientRoleType? oldRole; + @JsonKey(name: 'newRole') + final ClientRoleType? newRole; + @JsonKey(name: 'newRoleOptions') + final ClientRoleOptions? newRoleOptions; + factory RtcEngineEventHandlerOnClientRoleChangedJson.fromJson( Map json) => - _$AudioEncodedFrameObserverOnRecordAudioEncodedFrameJsonFromJson(json); + _$RtcEngineEventHandlerOnClientRoleChangedJsonFromJson(json); Map toJson() => - _$AudioEncodedFrameObserverOnRecordAudioEncodedFrameJsonToJson(this); + _$RtcEngineEventHandlerOnClientRoleChangedJsonToJson(this); } -extension AudioEncodedFrameObserverOnRecordAudioEncodedFrameJsonBufferExt - on AudioEncodedFrameObserverOnRecordAudioEncodedFrameJson { - AudioEncodedFrameObserverOnRecordAudioEncodedFrameJson fillBuffers( +extension RtcEngineEventHandlerOnClientRoleChangedJsonBufferExt + on RtcEngineEventHandlerOnClientRoleChangedJson { + RtcEngineEventHandlerOnClientRoleChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; - Uint8List? frameBuffer; - if (bufferList.length > 0) { - frameBuffer = bufferList[0]; - } - return AudioEncodedFrameObserverOnRecordAudioEncodedFrameJson( - frameBuffer: frameBuffer, - length: length, - audioEncodedFrameInfo: audioEncodedFrameInfo); + return this; } List collectBufferList() { final bufferList = []; - if (frameBuffer != null) { - bufferList.add(frameBuffer!); - } return bufferList; } } @JsonSerializable(explicitToJson: true) -class AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJson { - const AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJson( - {this.frameBuffer, this.length, this.audioEncodedFrameInfo}); +class RtcEngineEventHandlerOnClientRoleChangeFailedJson { + const RtcEngineEventHandlerOnClientRoleChangeFailedJson( + {this.connection, this.reason, this.currentRole}); - @JsonKey(name: 'frameBuffer', ignore: true) - final Uint8List? frameBuffer; - @JsonKey(name: 'length') - final int? length; - @JsonKey(name: 'audioEncodedFrameInfo') - final EncodedAudioFrameInfo? audioEncodedFrameInfo; - factory AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'reason') + final ClientRoleChangeFailedReason? reason; + @JsonKey(name: 'currentRole') + final ClientRoleType? currentRole; + factory RtcEngineEventHandlerOnClientRoleChangeFailedJson.fromJson( Map json) => - _$AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJsonFromJson(json); + _$RtcEngineEventHandlerOnClientRoleChangeFailedJsonFromJson(json); Map toJson() => - _$AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJsonToJson(this); + _$RtcEngineEventHandlerOnClientRoleChangeFailedJsonToJson(this); } -extension AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJsonBufferExt - on AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJson { - AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJson fillBuffers( +extension RtcEngineEventHandlerOnClientRoleChangeFailedJsonBufferExt + on RtcEngineEventHandlerOnClientRoleChangeFailedJson { + RtcEngineEventHandlerOnClientRoleChangeFailedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; - Uint8List? frameBuffer; - if (bufferList.length > 0) { - frameBuffer = bufferList[0]; - } - return AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJson( - frameBuffer: frameBuffer, - length: length, - audioEncodedFrameInfo: audioEncodedFrameInfo); + return this; } List collectBufferList() { final bufferList = []; - if (frameBuffer != null) { - bufferList.add(frameBuffer!); - } return bufferList; } } @JsonSerializable(explicitToJson: true) -class AudioEncodedFrameObserverOnMixedAudioEncodedFrameJson { - const AudioEncodedFrameObserverOnMixedAudioEncodedFrameJson( - {this.frameBuffer, this.length, this.audioEncodedFrameInfo}); +class RtcEngineEventHandlerOnAudioDeviceVolumeChangedJson { + const RtcEngineEventHandlerOnAudioDeviceVolumeChangedJson( + {this.deviceType, this.volume, this.muted}); - @JsonKey(name: 'frameBuffer', ignore: true) - final Uint8List? frameBuffer; - @JsonKey(name: 'length') - final int? length; - @JsonKey(name: 'audioEncodedFrameInfo') - final EncodedAudioFrameInfo? audioEncodedFrameInfo; - factory AudioEncodedFrameObserverOnMixedAudioEncodedFrameJson.fromJson( + @JsonKey(name: 'deviceType') + final MediaDeviceType? deviceType; + @JsonKey(name: 'volume') + final int? volume; + @JsonKey(name: 'muted') + final bool? muted; + factory RtcEngineEventHandlerOnAudioDeviceVolumeChangedJson.fromJson( Map json) => - _$AudioEncodedFrameObserverOnMixedAudioEncodedFrameJsonFromJson(json); + _$RtcEngineEventHandlerOnAudioDeviceVolumeChangedJsonFromJson(json); Map toJson() => - _$AudioEncodedFrameObserverOnMixedAudioEncodedFrameJsonToJson(this); + _$RtcEngineEventHandlerOnAudioDeviceVolumeChangedJsonToJson(this); } -extension AudioEncodedFrameObserverOnMixedAudioEncodedFrameJsonBufferExt - on AudioEncodedFrameObserverOnMixedAudioEncodedFrameJson { - AudioEncodedFrameObserverOnMixedAudioEncodedFrameJson fillBuffers( +extension RtcEngineEventHandlerOnAudioDeviceVolumeChangedJsonBufferExt + on RtcEngineEventHandlerOnAudioDeviceVolumeChangedJson { + RtcEngineEventHandlerOnAudioDeviceVolumeChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; - Uint8List? frameBuffer; - if (bufferList.length > 0) { - frameBuffer = bufferList[0]; - } - return AudioEncodedFrameObserverOnMixedAudioEncodedFrameJson( - frameBuffer: frameBuffer, - length: length, - audioEncodedFrameInfo: audioEncodedFrameInfo); + return this; } List collectBufferList() { final bufferList = []; - if (frameBuffer != null) { - bufferList.add(frameBuffer!); - } return bufferList; } } @JsonSerializable(explicitToJson: true) -class AudioPcmFrameSinkOnFrameJson { - const AudioPcmFrameSinkOnFrameJson({this.frame}); +class RtcEngineEventHandlerOnRtmpStreamingStateChangedJson { + const RtcEngineEventHandlerOnRtmpStreamingStateChangedJson( + {this.url, this.state, this.errCode}); - @JsonKey(name: 'frame') - final AudioPcmFrame? frame; - factory AudioPcmFrameSinkOnFrameJson.fromJson(Map json) => - _$AudioPcmFrameSinkOnFrameJsonFromJson(json); - Map toJson() => _$AudioPcmFrameSinkOnFrameJsonToJson(this); + @JsonKey(name: 'url') + final String? url; + @JsonKey(name: 'state') + final RtmpStreamPublishState? state; + @JsonKey(name: 'errCode') + final RtmpStreamPublishErrorType? errCode; + factory RtcEngineEventHandlerOnRtmpStreamingStateChangedJson.fromJson( + Map json) => + _$RtcEngineEventHandlerOnRtmpStreamingStateChangedJsonFromJson(json); + Map toJson() => + _$RtcEngineEventHandlerOnRtmpStreamingStateChangedJsonToJson(this); } -extension AudioPcmFrameSinkOnFrameJsonBufferExt - on AudioPcmFrameSinkOnFrameJson { - AudioPcmFrameSinkOnFrameJson fillBuffers(List bufferList) { +extension RtcEngineEventHandlerOnRtmpStreamingStateChangedJsonBufferExt + on RtcEngineEventHandlerOnRtmpStreamingStateChangedJson { + RtcEngineEventHandlerOnRtmpStreamingStateChangedJson fillBuffers( + List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -3214,24 +3172,24 @@ extension AudioPcmFrameSinkOnFrameJsonBufferExt } @JsonSerializable(explicitToJson: true) -class AudioFrameObserverBaseOnRecordAudioFrameJson { - const AudioFrameObserverBaseOnRecordAudioFrameJson( - {this.channelId, this.audioFrame}); +class RtcEngineEventHandlerOnRtmpStreamingEventJson { + const RtcEngineEventHandlerOnRtmpStreamingEventJson( + {this.url, this.eventCode}); - @JsonKey(name: 'channelId') - final String? channelId; - @JsonKey(name: 'audioFrame') - final AudioFrame? audioFrame; - factory AudioFrameObserverBaseOnRecordAudioFrameJson.fromJson( + @JsonKey(name: 'url') + final String? url; + @JsonKey(name: 'eventCode') + final RtmpStreamingEvent? eventCode; + factory RtcEngineEventHandlerOnRtmpStreamingEventJson.fromJson( Map json) => - _$AudioFrameObserverBaseOnRecordAudioFrameJsonFromJson(json); + _$RtcEngineEventHandlerOnRtmpStreamingEventJsonFromJson(json); Map toJson() => - _$AudioFrameObserverBaseOnRecordAudioFrameJsonToJson(this); + _$RtcEngineEventHandlerOnRtmpStreamingEventJsonToJson(this); } -extension AudioFrameObserverBaseOnRecordAudioFrameJsonBufferExt - on AudioFrameObserverBaseOnRecordAudioFrameJson { - AudioFrameObserverBaseOnRecordAudioFrameJson fillBuffers( +extension RtcEngineEventHandlerOnRtmpStreamingEventJsonBufferExt + on RtcEngineEventHandlerOnRtmpStreamingEventJson { + RtcEngineEventHandlerOnRtmpStreamingEventJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3244,24 +3202,19 @@ extension AudioFrameObserverBaseOnRecordAudioFrameJsonBufferExt } @JsonSerializable(explicitToJson: true) -class AudioFrameObserverBaseOnPlaybackAudioFrameJson { - const AudioFrameObserverBaseOnPlaybackAudioFrameJson( - {this.channelId, this.audioFrame}); +class RtcEngineEventHandlerOnTranscodingUpdatedJson { + const RtcEngineEventHandlerOnTranscodingUpdatedJson(); - @JsonKey(name: 'channelId') - final String? channelId; - @JsonKey(name: 'audioFrame') - final AudioFrame? audioFrame; - factory AudioFrameObserverBaseOnPlaybackAudioFrameJson.fromJson( + factory RtcEngineEventHandlerOnTranscodingUpdatedJson.fromJson( Map json) => - _$AudioFrameObserverBaseOnPlaybackAudioFrameJsonFromJson(json); + _$RtcEngineEventHandlerOnTranscodingUpdatedJsonFromJson(json); Map toJson() => - _$AudioFrameObserverBaseOnPlaybackAudioFrameJsonToJson(this); + _$RtcEngineEventHandlerOnTranscodingUpdatedJsonToJson(this); } -extension AudioFrameObserverBaseOnPlaybackAudioFrameJsonBufferExt - on AudioFrameObserverBaseOnPlaybackAudioFrameJson { - AudioFrameObserverBaseOnPlaybackAudioFrameJson fillBuffers( +extension RtcEngineEventHandlerOnTranscodingUpdatedJsonBufferExt + on RtcEngineEventHandlerOnTranscodingUpdatedJson { + RtcEngineEventHandlerOnTranscodingUpdatedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3274,24 +3227,21 @@ extension AudioFrameObserverBaseOnPlaybackAudioFrameJsonBufferExt } @JsonSerializable(explicitToJson: true) -class AudioFrameObserverBaseOnMixedAudioFrameJson { - const AudioFrameObserverBaseOnMixedAudioFrameJson( - {this.channelId, this.audioFrame}); +class RtcEngineEventHandlerOnAudioRoutingChangedJson { + const RtcEngineEventHandlerOnAudioRoutingChangedJson({this.routing}); - @JsonKey(name: 'channelId') - final String? channelId; - @JsonKey(name: 'audioFrame') - final AudioFrame? audioFrame; - factory AudioFrameObserverBaseOnMixedAudioFrameJson.fromJson( + @JsonKey(name: 'routing') + final int? routing; + factory RtcEngineEventHandlerOnAudioRoutingChangedJson.fromJson( Map json) => - _$AudioFrameObserverBaseOnMixedAudioFrameJsonFromJson(json); + _$RtcEngineEventHandlerOnAudioRoutingChangedJsonFromJson(json); Map toJson() => - _$AudioFrameObserverBaseOnMixedAudioFrameJsonToJson(this); + _$RtcEngineEventHandlerOnAudioRoutingChangedJsonToJson(this); } -extension AudioFrameObserverBaseOnMixedAudioFrameJsonBufferExt - on AudioFrameObserverBaseOnMixedAudioFrameJson { - AudioFrameObserverBaseOnMixedAudioFrameJson fillBuffers( +extension RtcEngineEventHandlerOnAudioRoutingChangedJsonBufferExt + on RtcEngineEventHandlerOnAudioRoutingChangedJson { + RtcEngineEventHandlerOnAudioRoutingChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3304,21 +3254,24 @@ extension AudioFrameObserverBaseOnMixedAudioFrameJsonBufferExt } @JsonSerializable(explicitToJson: true) -class AudioFrameObserverBaseOnEarMonitoringAudioFrameJson { - const AudioFrameObserverBaseOnEarMonitoringAudioFrameJson({this.audioFrame}); +class RtcEngineEventHandlerOnChannelMediaRelayStateChangedJson { + const RtcEngineEventHandlerOnChannelMediaRelayStateChangedJson( + {this.state, this.code}); - @JsonKey(name: 'audioFrame') - final AudioFrame? audioFrame; - factory AudioFrameObserverBaseOnEarMonitoringAudioFrameJson.fromJson( + @JsonKey(name: 'state') + final ChannelMediaRelayState? state; + @JsonKey(name: 'code') + final ChannelMediaRelayError? code; + factory RtcEngineEventHandlerOnChannelMediaRelayStateChangedJson.fromJson( Map json) => - _$AudioFrameObserverBaseOnEarMonitoringAudioFrameJsonFromJson(json); + _$RtcEngineEventHandlerOnChannelMediaRelayStateChangedJsonFromJson(json); Map toJson() => - _$AudioFrameObserverBaseOnEarMonitoringAudioFrameJsonToJson(this); + _$RtcEngineEventHandlerOnChannelMediaRelayStateChangedJsonToJson(this); } -extension AudioFrameObserverBaseOnEarMonitoringAudioFrameJsonBufferExt - on AudioFrameObserverBaseOnEarMonitoringAudioFrameJson { - AudioFrameObserverBaseOnEarMonitoringAudioFrameJson fillBuffers( +extension RtcEngineEventHandlerOnChannelMediaRelayStateChangedJsonBufferExt + on RtcEngineEventHandlerOnChannelMediaRelayStateChangedJson { + RtcEngineEventHandlerOnChannelMediaRelayStateChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3331,26 +3284,21 @@ extension AudioFrameObserverBaseOnEarMonitoringAudioFrameJsonBufferExt } @JsonSerializable(explicitToJson: true) -class AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJson { - const AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJson( - {this.channelId, this.uid, this.audioFrame}); +class RtcEngineEventHandlerOnChannelMediaRelayEventJson { + const RtcEngineEventHandlerOnChannelMediaRelayEventJson({this.code}); - @JsonKey(name: 'channelId') - final String? channelId; - @JsonKey(name: 'uid') - final int? uid; - @JsonKey(name: 'audioFrame') - final AudioFrame? audioFrame; - factory AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJson.fromJson( + @JsonKey(name: 'code') + final ChannelMediaRelayEvent? code; + factory RtcEngineEventHandlerOnChannelMediaRelayEventJson.fromJson( Map json) => - _$AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJsonFromJson(json); + _$RtcEngineEventHandlerOnChannelMediaRelayEventJsonFromJson(json); Map toJson() => - _$AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJsonToJson(this); + _$RtcEngineEventHandlerOnChannelMediaRelayEventJsonToJson(this); } -extension AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJsonBufferExt - on AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJson { - AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJson fillBuffers( +extension RtcEngineEventHandlerOnChannelMediaRelayEventJsonBufferExt + on RtcEngineEventHandlerOnChannelMediaRelayEventJson { + RtcEngineEventHandlerOnChannelMediaRelayEventJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3363,21 +3311,23 @@ extension AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJsonBufferExt } @JsonSerializable(explicitToJson: true) -class AudioSpectrumObserverOnLocalAudioSpectrumJson { - const AudioSpectrumObserverOnLocalAudioSpectrumJson({this.data}); +class RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJson { + const RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJson( + {this.isFallbackOrRecover}); - @JsonKey(name: 'data') - final AudioSpectrumData? data; - factory AudioSpectrumObserverOnLocalAudioSpectrumJson.fromJson( + @JsonKey(name: 'isFallbackOrRecover') + final bool? isFallbackOrRecover; + factory RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJson.fromJson( Map json) => - _$AudioSpectrumObserverOnLocalAudioSpectrumJsonFromJson(json); + _$RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJsonFromJson( + json); Map toJson() => - _$AudioSpectrumObserverOnLocalAudioSpectrumJsonToJson(this); + _$RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJsonToJson(this); } -extension AudioSpectrumObserverOnLocalAudioSpectrumJsonBufferExt - on AudioSpectrumObserverOnLocalAudioSpectrumJson { - AudioSpectrumObserverOnLocalAudioSpectrumJson fillBuffers( +extension RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJsonBufferExt + on RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJson { + RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3390,24 +3340,26 @@ extension AudioSpectrumObserverOnLocalAudioSpectrumJsonBufferExt } @JsonSerializable(explicitToJson: true) -class AudioSpectrumObserverOnRemoteAudioSpectrumJson { - const AudioSpectrumObserverOnRemoteAudioSpectrumJson( - {this.spectrums, this.spectrumNumber}); +class RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJson { + const RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJson( + {this.uid, this.isFallbackOrRecover}); - @JsonKey(name: 'spectrums') - final List? spectrums; - @JsonKey(name: 'spectrumNumber') - final int? spectrumNumber; - factory AudioSpectrumObserverOnRemoteAudioSpectrumJson.fromJson( + @JsonKey(name: 'uid') + final int? uid; + @JsonKey(name: 'isFallbackOrRecover') + final bool? isFallbackOrRecover; + factory RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJson.fromJson( Map json) => - _$AudioSpectrumObserverOnRemoteAudioSpectrumJsonFromJson(json); + _$RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJsonFromJson( + json); Map toJson() => - _$AudioSpectrumObserverOnRemoteAudioSpectrumJsonToJson(this); + _$RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJsonToJson( + this); } -extension AudioSpectrumObserverOnRemoteAudioSpectrumJsonBufferExt - on AudioSpectrumObserverOnRemoteAudioSpectrumJson { - AudioSpectrumObserverOnRemoteAudioSpectrumJson fillBuffers( +extension RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJsonBufferExt + on RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJson { + RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3420,69 +3372,74 @@ extension AudioSpectrumObserverOnRemoteAudioSpectrumJsonBufferExt } @JsonSerializable(explicitToJson: true) -class VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJson { - const VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJson( - {this.uid, this.imageBuffer, this.length, this.videoEncodedFrameInfo}); +class RtcEngineEventHandlerOnRemoteAudioTransportStatsJson { + const RtcEngineEventHandlerOnRemoteAudioTransportStatsJson( + {this.connection, + this.remoteUid, + this.delay, + this.lost, + this.rxKBitRate}); - @JsonKey(name: 'uid') - final int? uid; - @JsonKey(name: 'imageBuffer', ignore: true) - final Uint8List? imageBuffer; - @JsonKey(name: 'length') - final int? length; - @JsonKey(name: 'videoEncodedFrameInfo') - final EncodedVideoFrameInfo? videoEncodedFrameInfo; - factory VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'remoteUid') + final int? remoteUid; + @JsonKey(name: 'delay') + final int? delay; + @JsonKey(name: 'lost') + final int? lost; + @JsonKey(name: 'rxKBitRate') + final int? rxKBitRate; + factory RtcEngineEventHandlerOnRemoteAudioTransportStatsJson.fromJson( Map json) => - _$VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJsonFromJson(json); + _$RtcEngineEventHandlerOnRemoteAudioTransportStatsJsonFromJson(json); Map toJson() => - _$VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJsonToJson(this); + _$RtcEngineEventHandlerOnRemoteAudioTransportStatsJsonToJson(this); } -extension VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJsonBufferExt - on VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJson { - VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJson fillBuffers( +extension RtcEngineEventHandlerOnRemoteAudioTransportStatsJsonBufferExt + on RtcEngineEventHandlerOnRemoteAudioTransportStatsJson { + RtcEngineEventHandlerOnRemoteAudioTransportStatsJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; - Uint8List? imageBuffer; - if (bufferList.length > 0) { - imageBuffer = bufferList[0]; - } - return VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJson( - uid: uid, - imageBuffer: imageBuffer, - length: length, - videoEncodedFrameInfo: videoEncodedFrameInfo); + return this; } List collectBufferList() { final bufferList = []; - if (imageBuffer != null) { - bufferList.add(imageBuffer!); - } return bufferList; } } @JsonSerializable(explicitToJson: true) -class VideoFrameObserverOnCaptureVideoFrameJson { - const VideoFrameObserverOnCaptureVideoFrameJson( - {this.sourceType, this.videoFrame}); +class RtcEngineEventHandlerOnRemoteVideoTransportStatsJson { + const RtcEngineEventHandlerOnRemoteVideoTransportStatsJson( + {this.connection, + this.remoteUid, + this.delay, + this.lost, + this.rxKBitRate}); - @JsonKey(name: 'sourceType') - final VideoSourceType? sourceType; - @JsonKey(name: 'videoFrame') - final VideoFrame? videoFrame; - factory VideoFrameObserverOnCaptureVideoFrameJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'remoteUid') + final int? remoteUid; + @JsonKey(name: 'delay') + final int? delay; + @JsonKey(name: 'lost') + final int? lost; + @JsonKey(name: 'rxKBitRate') + final int? rxKBitRate; + factory RtcEngineEventHandlerOnRemoteVideoTransportStatsJson.fromJson( Map json) => - _$VideoFrameObserverOnCaptureVideoFrameJsonFromJson(json); + _$RtcEngineEventHandlerOnRemoteVideoTransportStatsJsonFromJson(json); Map toJson() => - _$VideoFrameObserverOnCaptureVideoFrameJsonToJson(this); + _$RtcEngineEventHandlerOnRemoteVideoTransportStatsJsonToJson(this); } -extension VideoFrameObserverOnCaptureVideoFrameJsonBufferExt - on VideoFrameObserverOnCaptureVideoFrameJson { - VideoFrameObserverOnCaptureVideoFrameJson fillBuffers( +extension RtcEngineEventHandlerOnRemoteVideoTransportStatsJsonBufferExt + on RtcEngineEventHandlerOnRemoteVideoTransportStatsJson { + RtcEngineEventHandlerOnRemoteVideoTransportStatsJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3495,24 +3452,26 @@ extension VideoFrameObserverOnCaptureVideoFrameJsonBufferExt } @JsonSerializable(explicitToJson: true) -class VideoFrameObserverOnPreEncodeVideoFrameJson { - const VideoFrameObserverOnPreEncodeVideoFrameJson( - {this.sourceType, this.videoFrame}); +class RtcEngineEventHandlerOnConnectionStateChangedJson { + const RtcEngineEventHandlerOnConnectionStateChangedJson( + {this.connection, this.state, this.reason}); - @JsonKey(name: 'sourceType') - final VideoSourceType? sourceType; - @JsonKey(name: 'videoFrame') - final VideoFrame? videoFrame; - factory VideoFrameObserverOnPreEncodeVideoFrameJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'state') + final ConnectionStateType? state; + @JsonKey(name: 'reason') + final ConnectionChangedReasonType? reason; + factory RtcEngineEventHandlerOnConnectionStateChangedJson.fromJson( Map json) => - _$VideoFrameObserverOnPreEncodeVideoFrameJsonFromJson(json); + _$RtcEngineEventHandlerOnConnectionStateChangedJsonFromJson(json); Map toJson() => - _$VideoFrameObserverOnPreEncodeVideoFrameJsonToJson(this); + _$RtcEngineEventHandlerOnConnectionStateChangedJsonToJson(this); } -extension VideoFrameObserverOnPreEncodeVideoFrameJsonBufferExt - on VideoFrameObserverOnPreEncodeVideoFrameJson { - VideoFrameObserverOnPreEncodeVideoFrameJson fillBuffers( +extension RtcEngineEventHandlerOnConnectionStateChangedJsonBufferExt + on RtcEngineEventHandlerOnConnectionStateChangedJson { + RtcEngineEventHandlerOnConnectionStateChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3525,24 +3484,28 @@ extension VideoFrameObserverOnPreEncodeVideoFrameJsonBufferExt } @JsonSerializable(explicitToJson: true) -class VideoFrameObserverOnMediaPlayerVideoFrameJson { - const VideoFrameObserverOnMediaPlayerVideoFrameJson( - {this.videoFrame, this.mediaPlayerId}); +class RtcEngineEventHandlerOnWlAccMessageJson { + const RtcEngineEventHandlerOnWlAccMessageJson( + {this.connection, this.reason, this.action, this.wlAccMsg}); - @JsonKey(name: 'videoFrame') - final VideoFrame? videoFrame; - @JsonKey(name: 'mediaPlayerId') - final int? mediaPlayerId; - factory VideoFrameObserverOnMediaPlayerVideoFrameJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'reason') + final WlaccMessageReason? reason; + @JsonKey(name: 'action') + final WlaccSuggestAction? action; + @JsonKey(name: 'wlAccMsg') + final String? wlAccMsg; + factory RtcEngineEventHandlerOnWlAccMessageJson.fromJson( Map json) => - _$VideoFrameObserverOnMediaPlayerVideoFrameJsonFromJson(json); + _$RtcEngineEventHandlerOnWlAccMessageJsonFromJson(json); Map toJson() => - _$VideoFrameObserverOnMediaPlayerVideoFrameJsonToJson(this); + _$RtcEngineEventHandlerOnWlAccMessageJsonToJson(this); } -extension VideoFrameObserverOnMediaPlayerVideoFrameJsonBufferExt - on VideoFrameObserverOnMediaPlayerVideoFrameJson { - VideoFrameObserverOnMediaPlayerVideoFrameJson fillBuffers( +extension RtcEngineEventHandlerOnWlAccMessageJsonBufferExt + on RtcEngineEventHandlerOnWlAccMessageJson { + RtcEngineEventHandlerOnWlAccMessageJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3555,26 +3518,26 @@ extension VideoFrameObserverOnMediaPlayerVideoFrameJsonBufferExt } @JsonSerializable(explicitToJson: true) -class VideoFrameObserverOnRenderVideoFrameJson { - const VideoFrameObserverOnRenderVideoFrameJson( - {this.channelId, this.remoteUid, this.videoFrame}); +class RtcEngineEventHandlerOnWlAccStatsJson { + const RtcEngineEventHandlerOnWlAccStatsJson( + {this.connection, this.currentStats, this.averageStats}); - @JsonKey(name: 'channelId') - final String? channelId; - @JsonKey(name: 'remoteUid') - final int? remoteUid; - @JsonKey(name: 'videoFrame') - final VideoFrame? videoFrame; - factory VideoFrameObserverOnRenderVideoFrameJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'currentStats') + final WlAccStats? currentStats; + @JsonKey(name: 'averageStats') + final WlAccStats? averageStats; + factory RtcEngineEventHandlerOnWlAccStatsJson.fromJson( Map json) => - _$VideoFrameObserverOnRenderVideoFrameJsonFromJson(json); + _$RtcEngineEventHandlerOnWlAccStatsJsonFromJson(json); Map toJson() => - _$VideoFrameObserverOnRenderVideoFrameJsonToJson(this); + _$RtcEngineEventHandlerOnWlAccStatsJsonToJson(this); } -extension VideoFrameObserverOnRenderVideoFrameJsonBufferExt - on VideoFrameObserverOnRenderVideoFrameJson { - VideoFrameObserverOnRenderVideoFrameJson fillBuffers( +extension RtcEngineEventHandlerOnWlAccStatsJsonBufferExt + on RtcEngineEventHandlerOnWlAccStatsJson { + RtcEngineEventHandlerOnWlAccStatsJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3587,21 +3550,24 @@ extension VideoFrameObserverOnRenderVideoFrameJsonBufferExt } @JsonSerializable(explicitToJson: true) -class VideoFrameObserverOnTranscodedVideoFrameJson { - const VideoFrameObserverOnTranscodedVideoFrameJson({this.videoFrame}); +class RtcEngineEventHandlerOnNetworkTypeChangedJson { + const RtcEngineEventHandlerOnNetworkTypeChangedJson( + {this.connection, this.type}); - @JsonKey(name: 'videoFrame') - final VideoFrame? videoFrame; - factory VideoFrameObserverOnTranscodedVideoFrameJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'type') + final NetworkType? type; + factory RtcEngineEventHandlerOnNetworkTypeChangedJson.fromJson( Map json) => - _$VideoFrameObserverOnTranscodedVideoFrameJsonFromJson(json); + _$RtcEngineEventHandlerOnNetworkTypeChangedJsonFromJson(json); Map toJson() => - _$VideoFrameObserverOnTranscodedVideoFrameJsonToJson(this); + _$RtcEngineEventHandlerOnNetworkTypeChangedJsonToJson(this); } -extension VideoFrameObserverOnTranscodedVideoFrameJsonBufferExt - on VideoFrameObserverOnTranscodedVideoFrameJson { - VideoFrameObserverOnTranscodedVideoFrameJson fillBuffers( +extension RtcEngineEventHandlerOnNetworkTypeChangedJsonBufferExt + on RtcEngineEventHandlerOnNetworkTypeChangedJson { + RtcEngineEventHandlerOnNetworkTypeChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3614,28 +3580,24 @@ extension VideoFrameObserverOnTranscodedVideoFrameJsonBufferExt } @JsonSerializable(explicitToJson: true) -class MediaRecorderObserverOnRecorderStateChangedJson { - const MediaRecorderObserverOnRecorderStateChangedJson( - {this.channelId, this.uid, this.state, this.error}); +class RtcEngineEventHandlerOnEncryptionErrorJson { + const RtcEngineEventHandlerOnEncryptionErrorJson( + {this.connection, this.errorType}); - @JsonKey(name: 'channelId') - final String? channelId; - @JsonKey(name: 'uid') - final int? uid; - @JsonKey(name: 'state') - final RecorderState? state; - @JsonKey(name: 'error') - final RecorderErrorCode? error; - factory MediaRecorderObserverOnRecorderStateChangedJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'errorType') + final EncryptionErrorType? errorType; + factory RtcEngineEventHandlerOnEncryptionErrorJson.fromJson( Map json) => - _$MediaRecorderObserverOnRecorderStateChangedJsonFromJson(json); + _$RtcEngineEventHandlerOnEncryptionErrorJsonFromJson(json); Map toJson() => - _$MediaRecorderObserverOnRecorderStateChangedJsonToJson(this); + _$RtcEngineEventHandlerOnEncryptionErrorJsonToJson(this); } -extension MediaRecorderObserverOnRecorderStateChangedJsonBufferExt - on MediaRecorderObserverOnRecorderStateChangedJson { - MediaRecorderObserverOnRecorderStateChangedJson fillBuffers( +extension RtcEngineEventHandlerOnEncryptionErrorJsonBufferExt + on RtcEngineEventHandlerOnEncryptionErrorJson { + RtcEngineEventHandlerOnEncryptionErrorJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3648,26 +3610,21 @@ extension MediaRecorderObserverOnRecorderStateChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class MediaRecorderObserverOnRecorderInfoUpdatedJson { - const MediaRecorderObserverOnRecorderInfoUpdatedJson( - {this.channelId, this.uid, this.info}); +class RtcEngineEventHandlerOnPermissionErrorJson { + const RtcEngineEventHandlerOnPermissionErrorJson({this.permissionType}); - @JsonKey(name: 'channelId') - final String? channelId; - @JsonKey(name: 'uid') - final int? uid; - @JsonKey(name: 'info') - final RecorderInfo? info; - factory MediaRecorderObserverOnRecorderInfoUpdatedJson.fromJson( + @JsonKey(name: 'permissionType') + final PermissionType? permissionType; + factory RtcEngineEventHandlerOnPermissionErrorJson.fromJson( Map json) => - _$MediaRecorderObserverOnRecorderInfoUpdatedJsonFromJson(json); + _$RtcEngineEventHandlerOnPermissionErrorJsonFromJson(json); Map toJson() => - _$MediaRecorderObserverOnRecorderInfoUpdatedJsonToJson(this); + _$RtcEngineEventHandlerOnPermissionErrorJsonToJson(this); } -extension MediaRecorderObserverOnRecorderInfoUpdatedJsonBufferExt - on MediaRecorderObserverOnRecorderInfoUpdatedJson { - MediaRecorderObserverOnRecorderInfoUpdatedJson fillBuffers( +extension RtcEngineEventHandlerOnPermissionErrorJsonBufferExt + on RtcEngineEventHandlerOnPermissionErrorJson { + RtcEngineEventHandlerOnPermissionErrorJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3680,21 +3637,24 @@ extension MediaRecorderObserverOnRecorderInfoUpdatedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class MediaPlayerVideoFrameObserverOnFrameJson { - const MediaPlayerVideoFrameObserverOnFrameJson({this.frame}); +class RtcEngineEventHandlerOnLocalUserRegisteredJson { + const RtcEngineEventHandlerOnLocalUserRegisteredJson( + {this.uid, this.userAccount}); - @JsonKey(name: 'frame') - final VideoFrame? frame; - factory MediaPlayerVideoFrameObserverOnFrameJson.fromJson( + @JsonKey(name: 'uid') + final int? uid; + @JsonKey(name: 'userAccount') + final String? userAccount; + factory RtcEngineEventHandlerOnLocalUserRegisteredJson.fromJson( Map json) => - _$MediaPlayerVideoFrameObserverOnFrameJsonFromJson(json); + _$RtcEngineEventHandlerOnLocalUserRegisteredJsonFromJson(json); Map toJson() => - _$MediaPlayerVideoFrameObserverOnFrameJsonToJson(this); + _$RtcEngineEventHandlerOnLocalUserRegisteredJsonToJson(this); } -extension MediaPlayerVideoFrameObserverOnFrameJsonBufferExt - on MediaPlayerVideoFrameObserverOnFrameJson { - MediaPlayerVideoFrameObserverOnFrameJson fillBuffers( +extension RtcEngineEventHandlerOnLocalUserRegisteredJsonBufferExt + on RtcEngineEventHandlerOnLocalUserRegisteredJson { + RtcEngineEventHandlerOnLocalUserRegisteredJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3707,24 +3667,23 @@ extension MediaPlayerVideoFrameObserverOnFrameJsonBufferExt } @JsonSerializable(explicitToJson: true) -class MediaPlayerSourceObserverOnPlayerSourceStateChangedJson { - const MediaPlayerSourceObserverOnPlayerSourceStateChangedJson( - {this.state, this.ec}); +class RtcEngineEventHandlerOnUserInfoUpdatedJson { + const RtcEngineEventHandlerOnUserInfoUpdatedJson({this.uid, this.info}); - @JsonKey(name: 'state') - final MediaPlayerState? state; - @JsonKey(name: 'ec') - final MediaPlayerError? ec; - factory MediaPlayerSourceObserverOnPlayerSourceStateChangedJson.fromJson( + @JsonKey(name: 'uid') + final int? uid; + @JsonKey(name: 'info') + final UserInfo? info; + factory RtcEngineEventHandlerOnUserInfoUpdatedJson.fromJson( Map json) => - _$MediaPlayerSourceObserverOnPlayerSourceStateChangedJsonFromJson(json); + _$RtcEngineEventHandlerOnUserInfoUpdatedJsonFromJson(json); Map toJson() => - _$MediaPlayerSourceObserverOnPlayerSourceStateChangedJsonToJson(this); + _$RtcEngineEventHandlerOnUserInfoUpdatedJsonToJson(this); } -extension MediaPlayerSourceObserverOnPlayerSourceStateChangedJsonBufferExt - on MediaPlayerSourceObserverOnPlayerSourceStateChangedJson { - MediaPlayerSourceObserverOnPlayerSourceStateChangedJson fillBuffers( +extension RtcEngineEventHandlerOnUserInfoUpdatedJsonBufferExt + on RtcEngineEventHandlerOnUserInfoUpdatedJson { + RtcEngineEventHandlerOnUserInfoUpdatedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3737,21 +3696,28 @@ extension MediaPlayerSourceObserverOnPlayerSourceStateChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class MediaPlayerSourceObserverOnPositionChangedJson { - const MediaPlayerSourceObserverOnPositionChangedJson({this.positionMs}); +class RtcEngineEventHandlerOnUploadLogResultJson { + const RtcEngineEventHandlerOnUploadLogResultJson( + {this.connection, this.requestId, this.success, this.reason}); - @JsonKey(name: 'position_ms') - final int? positionMs; - factory MediaPlayerSourceObserverOnPositionChangedJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'requestId') + final String? requestId; + @JsonKey(name: 'success') + final bool? success; + @JsonKey(name: 'reason') + final UploadErrorReason? reason; + factory RtcEngineEventHandlerOnUploadLogResultJson.fromJson( Map json) => - _$MediaPlayerSourceObserverOnPositionChangedJsonFromJson(json); + _$RtcEngineEventHandlerOnUploadLogResultJsonFromJson(json); Map toJson() => - _$MediaPlayerSourceObserverOnPositionChangedJsonToJson(this); + _$RtcEngineEventHandlerOnUploadLogResultJsonToJson(this); } -extension MediaPlayerSourceObserverOnPositionChangedJsonBufferExt - on MediaPlayerSourceObserverOnPositionChangedJson { - MediaPlayerSourceObserverOnPositionChangedJson fillBuffers( +extension RtcEngineEventHandlerOnUploadLogResultJsonBufferExt + on RtcEngineEventHandlerOnUploadLogResultJson { + RtcEngineEventHandlerOnUploadLogResultJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3764,26 +3730,34 @@ extension MediaPlayerSourceObserverOnPositionChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class MediaPlayerSourceObserverOnPlayerEventJson { - const MediaPlayerSourceObserverOnPlayerEventJson( - {this.eventCode, this.elapsedTime, this.message}); +class RtcEngineEventHandlerOnAudioSubscribeStateChangedJson { + const RtcEngineEventHandlerOnAudioSubscribeStateChangedJson( + {this.channel, + this.uid, + this.oldState, + this.newState, + this.elapseSinceLastState}); - @JsonKey(name: 'eventCode') - final MediaPlayerEvent? eventCode; - @JsonKey(name: 'elapsedTime') - final int? elapsedTime; - @JsonKey(name: 'message') - final String? message; - factory MediaPlayerSourceObserverOnPlayerEventJson.fromJson( + @JsonKey(name: 'channel') + final String? channel; + @JsonKey(name: 'uid') + final int? uid; + @JsonKey(name: 'oldState') + final StreamSubscribeState? oldState; + @JsonKey(name: 'newState') + final StreamSubscribeState? newState; + @JsonKey(name: 'elapseSinceLastState') + final int? elapseSinceLastState; + factory RtcEngineEventHandlerOnAudioSubscribeStateChangedJson.fromJson( Map json) => - _$MediaPlayerSourceObserverOnPlayerEventJsonFromJson(json); + _$RtcEngineEventHandlerOnAudioSubscribeStateChangedJsonFromJson(json); Map toJson() => - _$MediaPlayerSourceObserverOnPlayerEventJsonToJson(this); + _$RtcEngineEventHandlerOnAudioSubscribeStateChangedJsonToJson(this); } -extension MediaPlayerSourceObserverOnPlayerEventJsonBufferExt - on MediaPlayerSourceObserverOnPlayerEventJson { - MediaPlayerSourceObserverOnPlayerEventJson fillBuffers( +extension RtcEngineEventHandlerOnAudioSubscribeStateChangedJsonBufferExt + on RtcEngineEventHandlerOnAudioSubscribeStateChangedJson { + RtcEngineEventHandlerOnAudioSubscribeStateChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3796,58 +3770,68 @@ extension MediaPlayerSourceObserverOnPlayerEventJsonBufferExt } @JsonSerializable(explicitToJson: true) -class MediaPlayerSourceObserverOnMetaDataJson { - const MediaPlayerSourceObserverOnMetaDataJson({this.data, this.length}); +class RtcEngineEventHandlerOnVideoSubscribeStateChangedJson { + const RtcEngineEventHandlerOnVideoSubscribeStateChangedJson( + {this.channel, + this.uid, + this.oldState, + this.newState, + this.elapseSinceLastState}); - @JsonKey(name: 'data', ignore: true) - final Uint8List? data; - @JsonKey(name: 'length') - final int? length; - factory MediaPlayerSourceObserverOnMetaDataJson.fromJson( + @JsonKey(name: 'channel') + final String? channel; + @JsonKey(name: 'uid') + final int? uid; + @JsonKey(name: 'oldState') + final StreamSubscribeState? oldState; + @JsonKey(name: 'newState') + final StreamSubscribeState? newState; + @JsonKey(name: 'elapseSinceLastState') + final int? elapseSinceLastState; + factory RtcEngineEventHandlerOnVideoSubscribeStateChangedJson.fromJson( Map json) => - _$MediaPlayerSourceObserverOnMetaDataJsonFromJson(json); + _$RtcEngineEventHandlerOnVideoSubscribeStateChangedJsonFromJson(json); Map toJson() => - _$MediaPlayerSourceObserverOnMetaDataJsonToJson(this); + _$RtcEngineEventHandlerOnVideoSubscribeStateChangedJsonToJson(this); } -extension MediaPlayerSourceObserverOnMetaDataJsonBufferExt - on MediaPlayerSourceObserverOnMetaDataJson { - MediaPlayerSourceObserverOnMetaDataJson fillBuffers( +extension RtcEngineEventHandlerOnVideoSubscribeStateChangedJsonBufferExt + on RtcEngineEventHandlerOnVideoSubscribeStateChangedJson { + RtcEngineEventHandlerOnVideoSubscribeStateChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; - Uint8List? data; - if (bufferList.length > 0) { - data = bufferList[0]; - } - return MediaPlayerSourceObserverOnMetaDataJson(data: data, length: length); + return this; } List collectBufferList() { final bufferList = []; - if (data != null) { - bufferList.add(data!); - } return bufferList; } } @JsonSerializable(explicitToJson: true) -class MediaPlayerSourceObserverOnPlayBufferUpdatedJson { - const MediaPlayerSourceObserverOnPlayBufferUpdatedJson( - {this.playCachedBuffer}); +class RtcEngineEventHandlerOnAudioPublishStateChangedJson { + const RtcEngineEventHandlerOnAudioPublishStateChangedJson( + {this.channel, this.oldState, this.newState, this.elapseSinceLastState}); - @JsonKey(name: 'playCachedBuffer') - final int? playCachedBuffer; - factory MediaPlayerSourceObserverOnPlayBufferUpdatedJson.fromJson( + @JsonKey(name: 'channel') + final String? channel; + @JsonKey(name: 'oldState') + final StreamPublishState? oldState; + @JsonKey(name: 'newState') + final StreamPublishState? newState; + @JsonKey(name: 'elapseSinceLastState') + final int? elapseSinceLastState; + factory RtcEngineEventHandlerOnAudioPublishStateChangedJson.fromJson( Map json) => - _$MediaPlayerSourceObserverOnPlayBufferUpdatedJsonFromJson(json); + _$RtcEngineEventHandlerOnAudioPublishStateChangedJsonFromJson(json); Map toJson() => - _$MediaPlayerSourceObserverOnPlayBufferUpdatedJsonToJson(this); + _$RtcEngineEventHandlerOnAudioPublishStateChangedJsonToJson(this); } -extension MediaPlayerSourceObserverOnPlayBufferUpdatedJsonBufferExt - on MediaPlayerSourceObserverOnPlayBufferUpdatedJson { - MediaPlayerSourceObserverOnPlayBufferUpdatedJson fillBuffers( +extension RtcEngineEventHandlerOnAudioPublishStateChangedJsonBufferExt + on RtcEngineEventHandlerOnAudioPublishStateChangedJson { + RtcEngineEventHandlerOnAudioPublishStateChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3860,23 +3844,34 @@ extension MediaPlayerSourceObserverOnPlayBufferUpdatedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class MediaPlayerSourceObserverOnPreloadEventJson { - const MediaPlayerSourceObserverOnPreloadEventJson({this.src, this.event}); +class RtcEngineEventHandlerOnVideoPublishStateChangedJson { + const RtcEngineEventHandlerOnVideoPublishStateChangedJson( + {this.source, + this.channel, + this.oldState, + this.newState, + this.elapseSinceLastState}); - @JsonKey(name: 'src') - final String? src; - @JsonKey(name: 'event') - final PlayerPreloadEvent? event; - factory MediaPlayerSourceObserverOnPreloadEventJson.fromJson( + @JsonKey(name: 'source') + final VideoSourceType? source; + @JsonKey(name: 'channel') + final String? channel; + @JsonKey(name: 'oldState') + final StreamPublishState? oldState; + @JsonKey(name: 'newState') + final StreamPublishState? newState; + @JsonKey(name: 'elapseSinceLastState') + final int? elapseSinceLastState; + factory RtcEngineEventHandlerOnVideoPublishStateChangedJson.fromJson( Map json) => - _$MediaPlayerSourceObserverOnPreloadEventJsonFromJson(json); + _$RtcEngineEventHandlerOnVideoPublishStateChangedJsonFromJson(json); Map toJson() => - _$MediaPlayerSourceObserverOnPreloadEventJsonToJson(this); + _$RtcEngineEventHandlerOnVideoPublishStateChangedJsonToJson(this); } -extension MediaPlayerSourceObserverOnPreloadEventJsonBufferExt - on MediaPlayerSourceObserverOnPreloadEventJson { - MediaPlayerSourceObserverOnPreloadEventJson fillBuffers( +extension RtcEngineEventHandlerOnVideoPublishStateChangedJsonBufferExt + on RtcEngineEventHandlerOnVideoPublishStateChangedJson { + RtcEngineEventHandlerOnVideoPublishStateChangedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3889,19 +3884,28 @@ extension MediaPlayerSourceObserverOnPreloadEventJsonBufferExt } @JsonSerializable(explicitToJson: true) -class MediaPlayerSourceObserverOnCompletedJson { - const MediaPlayerSourceObserverOnCompletedJson(); +class RtcEngineEventHandlerOnExtensionEventJson { + const RtcEngineEventHandlerOnExtensionEventJson( + {this.provider, this.extension, this.key, this.value}); - factory MediaPlayerSourceObserverOnCompletedJson.fromJson( + @JsonKey(name: 'provider') + final String? provider; + @JsonKey(name: 'extension') + final String? extension; + @JsonKey(name: 'key') + final String? key; + @JsonKey(name: 'value') + final String? value; + factory RtcEngineEventHandlerOnExtensionEventJson.fromJson( Map json) => - _$MediaPlayerSourceObserverOnCompletedJsonFromJson(json); + _$RtcEngineEventHandlerOnExtensionEventJsonFromJson(json); Map toJson() => - _$MediaPlayerSourceObserverOnCompletedJsonToJson(this); + _$RtcEngineEventHandlerOnExtensionEventJsonToJson(this); } -extension MediaPlayerSourceObserverOnCompletedJsonBufferExt - on MediaPlayerSourceObserverOnCompletedJson { - MediaPlayerSourceObserverOnCompletedJson fillBuffers( +extension RtcEngineEventHandlerOnExtensionEventJsonBufferExt + on RtcEngineEventHandlerOnExtensionEventJson { + RtcEngineEventHandlerOnExtensionEventJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3914,19 +3918,24 @@ extension MediaPlayerSourceObserverOnCompletedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJson { - const MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJson(); +class RtcEngineEventHandlerOnExtensionStartedJson { + const RtcEngineEventHandlerOnExtensionStartedJson( + {this.provider, this.extension}); - factory MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJson.fromJson( + @JsonKey(name: 'provider') + final String? provider; + @JsonKey(name: 'extension') + final String? extension; + factory RtcEngineEventHandlerOnExtensionStartedJson.fromJson( Map json) => - _$MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJsonFromJson(json); + _$RtcEngineEventHandlerOnExtensionStartedJsonFromJson(json); Map toJson() => - _$MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJsonToJson(this); + _$RtcEngineEventHandlerOnExtensionStartedJsonToJson(this); } -extension MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJsonBufferExt - on MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJson { - MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJson fillBuffers( +extension RtcEngineEventHandlerOnExtensionStartedJsonBufferExt + on RtcEngineEventHandlerOnExtensionStartedJson { + RtcEngineEventHandlerOnExtensionStartedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3939,24 +3948,24 @@ extension MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJsonBufferExt } @JsonSerializable(explicitToJson: true) -class MediaPlayerSourceObserverOnPlayerSrcInfoChangedJson { - const MediaPlayerSourceObserverOnPlayerSrcInfoChangedJson( - {this.from, this.to}); +class RtcEngineEventHandlerOnExtensionStoppedJson { + const RtcEngineEventHandlerOnExtensionStoppedJson( + {this.provider, this.extension}); - @JsonKey(name: 'from') - final SrcInfo? from; - @JsonKey(name: 'to') - final SrcInfo? to; - factory MediaPlayerSourceObserverOnPlayerSrcInfoChangedJson.fromJson( + @JsonKey(name: 'provider') + final String? provider; + @JsonKey(name: 'extension') + final String? extension; + factory RtcEngineEventHandlerOnExtensionStoppedJson.fromJson( Map json) => - _$MediaPlayerSourceObserverOnPlayerSrcInfoChangedJsonFromJson(json); + _$RtcEngineEventHandlerOnExtensionStoppedJsonFromJson(json); Map toJson() => - _$MediaPlayerSourceObserverOnPlayerSrcInfoChangedJsonToJson(this); + _$RtcEngineEventHandlerOnExtensionStoppedJsonToJson(this); } -extension MediaPlayerSourceObserverOnPlayerSrcInfoChangedJsonBufferExt - on MediaPlayerSourceObserverOnPlayerSrcInfoChangedJson { - MediaPlayerSourceObserverOnPlayerSrcInfoChangedJson fillBuffers( +extension RtcEngineEventHandlerOnExtensionStoppedJsonBufferExt + on RtcEngineEventHandlerOnExtensionStoppedJson { + RtcEngineEventHandlerOnExtensionStoppedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3969,21 +3978,28 @@ extension MediaPlayerSourceObserverOnPlayerSrcInfoChangedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class MediaPlayerSourceObserverOnPlayerInfoUpdatedJson { - const MediaPlayerSourceObserverOnPlayerInfoUpdatedJson({this.info}); +class RtcEngineEventHandlerOnExtensionErrorJson { + const RtcEngineEventHandlerOnExtensionErrorJson( + {this.provider, this.extension, this.error, this.message}); - @JsonKey(name: 'info') - final PlayerUpdatedInfo? info; - factory MediaPlayerSourceObserverOnPlayerInfoUpdatedJson.fromJson( + @JsonKey(name: 'provider') + final String? provider; + @JsonKey(name: 'extension') + final String? extension; + @JsonKey(name: 'error') + final int? error; + @JsonKey(name: 'message') + final String? message; + factory RtcEngineEventHandlerOnExtensionErrorJson.fromJson( Map json) => - _$MediaPlayerSourceObserverOnPlayerInfoUpdatedJsonFromJson(json); + _$RtcEngineEventHandlerOnExtensionErrorJsonFromJson(json); Map toJson() => - _$MediaPlayerSourceObserverOnPlayerInfoUpdatedJsonToJson(this); + _$RtcEngineEventHandlerOnExtensionErrorJsonToJson(this); } -extension MediaPlayerSourceObserverOnPlayerInfoUpdatedJsonBufferExt - on MediaPlayerSourceObserverOnPlayerInfoUpdatedJson { - MediaPlayerSourceObserverOnPlayerInfoUpdatedJson fillBuffers( +extension RtcEngineEventHandlerOnExtensionErrorJsonBufferExt + on RtcEngineEventHandlerOnExtensionErrorJson { + RtcEngineEventHandlerOnExtensionErrorJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -3996,21 +4012,26 @@ extension MediaPlayerSourceObserverOnPlayerInfoUpdatedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class MediaPlayerSourceObserverOnAudioVolumeIndicationJson { - const MediaPlayerSourceObserverOnAudioVolumeIndicationJson({this.volume}); +class RtcEngineEventHandlerOnUserAccountUpdatedJson { + const RtcEngineEventHandlerOnUserAccountUpdatedJson( + {this.connection, this.remoteUid, this.userAccount}); - @JsonKey(name: 'volume') - final int? volume; - factory MediaPlayerSourceObserverOnAudioVolumeIndicationJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'remoteUid') + final int? remoteUid; + @JsonKey(name: 'userAccount') + final String? userAccount; + factory RtcEngineEventHandlerOnUserAccountUpdatedJson.fromJson( Map json) => - _$MediaPlayerSourceObserverOnAudioVolumeIndicationJsonFromJson(json); + _$RtcEngineEventHandlerOnUserAccountUpdatedJsonFromJson(json); Map toJson() => - _$MediaPlayerSourceObserverOnAudioVolumeIndicationJsonToJson(this); + _$RtcEngineEventHandlerOnUserAccountUpdatedJsonToJson(this); } -extension MediaPlayerSourceObserverOnAudioVolumeIndicationJsonBufferExt - on MediaPlayerSourceObserverOnAudioVolumeIndicationJson { - MediaPlayerSourceObserverOnAudioVolumeIndicationJson fillBuffers( +extension RtcEngineEventHandlerOnUserAccountUpdatedJsonBufferExt + on RtcEngineEventHandlerOnUserAccountUpdatedJson { + RtcEngineEventHandlerOnUserAccountUpdatedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -4023,26 +4044,24 @@ extension MediaPlayerSourceObserverOnAudioVolumeIndicationJsonBufferExt } @JsonSerializable(explicitToJson: true) -class MusicContentCenterEventHandlerOnMusicChartsResultJson { - const MusicContentCenterEventHandlerOnMusicChartsResultJson( - {this.requestId, this.result, this.errorCode}); +class RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson { + const RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson( + {this.stream, this.error}); - @JsonKey(name: 'requestId') - final String? requestId; - @JsonKey(name: 'result') - final List? result; - @JsonKey(name: 'errorCode') - final MusicContentCenterStatusCode? errorCode; - factory MusicContentCenterEventHandlerOnMusicChartsResultJson.fromJson( + @JsonKey(name: 'stream') + final TranscodingVideoStream? stream; + @JsonKey(name: 'error') + final VideoTranscoderError? error; + factory RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson.fromJson( Map json) => - _$MusicContentCenterEventHandlerOnMusicChartsResultJsonFromJson(json); + _$RtcEngineEventHandlerOnLocalVideoTranscoderErrorJsonFromJson(json); Map toJson() => - _$MusicContentCenterEventHandlerOnMusicChartsResultJsonToJson(this); + _$RtcEngineEventHandlerOnLocalVideoTranscoderErrorJsonToJson(this); } -extension MusicContentCenterEventHandlerOnMusicChartsResultJsonBufferExt - on MusicContentCenterEventHandlerOnMusicChartsResultJson { - MusicContentCenterEventHandlerOnMusicChartsResultJson fillBuffers( +extension RtcEngineEventHandlerOnLocalVideoTranscoderErrorJsonBufferExt + on RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson { + RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -4055,26 +4074,28 @@ extension MusicContentCenterEventHandlerOnMusicChartsResultJsonBufferExt } @JsonSerializable(explicitToJson: true) -class MusicContentCenterEventHandlerOnMusicCollectionResultJson { - const MusicContentCenterEventHandlerOnMusicCollectionResultJson( - {this.requestId, this.result, this.errorCode}); +class RtcEngineEventHandlerOnVideoRenderingTracingResultJson { + const RtcEngineEventHandlerOnVideoRenderingTracingResultJson( + {this.connection, this.uid, this.currentEvent, this.tracingInfo}); - @JsonKey(name: 'requestId') - final String? requestId; - @JsonKey(name: 'result', ignore: true) - final MusicCollection? result; - @JsonKey(name: 'errorCode') - final MusicContentCenterStatusCode? errorCode; - factory MusicContentCenterEventHandlerOnMusicCollectionResultJson.fromJson( + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'uid') + final int? uid; + @JsonKey(name: 'currentEvent') + final MediaTraceEvent? currentEvent; + @JsonKey(name: 'tracingInfo') + final VideoRenderingTracingInfo? tracingInfo; + factory RtcEngineEventHandlerOnVideoRenderingTracingResultJson.fromJson( Map json) => - _$MusicContentCenterEventHandlerOnMusicCollectionResultJsonFromJson(json); + _$RtcEngineEventHandlerOnVideoRenderingTracingResultJsonFromJson(json); Map toJson() => - _$MusicContentCenterEventHandlerOnMusicCollectionResultJsonToJson(this); + _$RtcEngineEventHandlerOnVideoRenderingTracingResultJsonToJson(this); } -extension MusicContentCenterEventHandlerOnMusicCollectionResultJsonBufferExt - on MusicContentCenterEventHandlerOnMusicCollectionResultJson { - MusicContentCenterEventHandlerOnMusicCollectionResultJson fillBuffers( +extension RtcEngineEventHandlerOnVideoRenderingTracingResultJsonBufferExt + on RtcEngineEventHandlerOnVideoRenderingTracingResultJson { + RtcEngineEventHandlerOnVideoRenderingTracingResultJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -4087,28 +4108,21 @@ extension MusicContentCenterEventHandlerOnMusicCollectionResultJsonBufferExt } @JsonSerializable(explicitToJson: true) -class MusicContentCenterEventHandlerOnLyricResultJson { - const MusicContentCenterEventHandlerOnLyricResultJson( - {this.requestId, this.songCode, this.lyricUrl, this.errorCode}); +class MetadataObserverOnMetadataReceivedJson { + const MetadataObserverOnMetadataReceivedJson({this.metadata}); - @JsonKey(name: 'requestId') - final String? requestId; - @JsonKey(name: 'songCode') - final int? songCode; - @JsonKey(name: 'lyricUrl') - final String? lyricUrl; - @JsonKey(name: 'errorCode') - final MusicContentCenterStatusCode? errorCode; - factory MusicContentCenterEventHandlerOnLyricResultJson.fromJson( + @JsonKey(name: 'metadata') + final Metadata? metadata; + factory MetadataObserverOnMetadataReceivedJson.fromJson( Map json) => - _$MusicContentCenterEventHandlerOnLyricResultJsonFromJson(json); + _$MetadataObserverOnMetadataReceivedJsonFromJson(json); Map toJson() => - _$MusicContentCenterEventHandlerOnLyricResultJsonToJson(this); + _$MetadataObserverOnMetadataReceivedJsonToJson(this); } -extension MusicContentCenterEventHandlerOnLyricResultJsonBufferExt - on MusicContentCenterEventHandlerOnLyricResultJson { - MusicContentCenterEventHandlerOnLyricResultJson fillBuffers( +extension MetadataObserverOnMetadataReceivedJsonBufferExt + on MetadataObserverOnMetadataReceivedJson { + MetadataObserverOnMetadataReceivedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -4121,29 +4135,29 @@ extension MusicContentCenterEventHandlerOnLyricResultJsonBufferExt } @JsonSerializable(explicitToJson: true) -class MusicContentCenterEventHandlerOnSongSimpleInfoResultJson { - const MusicContentCenterEventHandlerOnSongSimpleInfoResultJson( - {this.requestId, this.songCode, this.simpleInfo, this.errorCode}); +class DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJson { + const DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJson( + {this.state, this.error, this.message}); - @JsonKey(name: 'requestId') - final String? requestId; - @JsonKey(name: 'songCode') - final int? songCode; - @JsonKey(name: 'simpleInfo') - final String? simpleInfo; - @JsonKey(name: 'errorCode') - final MusicContentCenterStatusCode? errorCode; - factory MusicContentCenterEventHandlerOnSongSimpleInfoResultJson.fromJson( + @JsonKey(name: 'state') + final DirectCdnStreamingState? state; + @JsonKey(name: 'error') + final DirectCdnStreamingError? error; + @JsonKey(name: 'message') + final String? message; + factory DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJson.fromJson( Map json) => - _$MusicContentCenterEventHandlerOnSongSimpleInfoResultJsonFromJson(json); + _$DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJsonFromJson( + json); Map toJson() => - _$MusicContentCenterEventHandlerOnSongSimpleInfoResultJsonToJson(this); + _$DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJsonToJson( + this); } -extension MusicContentCenterEventHandlerOnSongSimpleInfoResultJsonBufferExt - on MusicContentCenterEventHandlerOnSongSimpleInfoResultJson { - MusicContentCenterEventHandlerOnSongSimpleInfoResultJson fillBuffers( - List bufferList) { +extension DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJsonBufferExt + on DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJson { + DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJson + fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -4155,37 +4169,23 @@ extension MusicContentCenterEventHandlerOnSongSimpleInfoResultJsonBufferExt } @JsonSerializable(explicitToJson: true) -class MusicContentCenterEventHandlerOnPreLoadEventJson { - const MusicContentCenterEventHandlerOnPreLoadEventJson( - {this.requestId, - this.songCode, - this.percent, - this.lyricUrl, - this.status, - this.errorCode}); +class DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJson { + const DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJson( + {this.stats}); - @JsonKey(name: 'requestId') - final String? requestId; - @JsonKey(name: 'songCode') - final int? songCode; - @JsonKey(name: 'percent') - final int? percent; - @JsonKey(name: 'lyricUrl') - final String? lyricUrl; - @JsonKey(name: 'status') - final PreloadStatusCode? status; - @JsonKey(name: 'errorCode') - final MusicContentCenterStatusCode? errorCode; - factory MusicContentCenterEventHandlerOnPreLoadEventJson.fromJson( + @JsonKey(name: 'stats') + final DirectCdnStreamingStats? stats; + factory DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJson.fromJson( Map json) => - _$MusicContentCenterEventHandlerOnPreLoadEventJsonFromJson(json); + _$DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJsonFromJson( + json); Map toJson() => - _$MusicContentCenterEventHandlerOnPreLoadEventJsonToJson(this); + _$DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJsonToJson(this); } -extension MusicContentCenterEventHandlerOnPreLoadEventJsonBufferExt - on MusicContentCenterEventHandlerOnPreLoadEventJson { - MusicContentCenterEventHandlerOnPreLoadEventJson fillBuffers( +extension DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJsonBufferExt + on DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJson { + DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; diff --git a/lib/src/binding/event_handler_param_json.g.dart b/lib/src/binding/event_handler_param_json.g.dart index 032201f9c..52fd6ba93 100644 --- a/lib/src/binding/event_handler_param_json.g.dart +++ b/lib/src/binding/event_handler_param_json.g.dart @@ -8,3046 +8,3056 @@ part of 'event_handler_param_json.dart'; // JsonSerializableGenerator // ************************************************************************** -RtcEngineEventHandlerOnJoinChannelSuccessJson - _$RtcEngineEventHandlerOnJoinChannelSuccessJsonFromJson( +AudioEncodedFrameObserverOnRecordAudioEncodedFrameJson + _$AudioEncodedFrameObserverOnRecordAudioEncodedFrameJsonFromJson( Map json) => - RtcEngineEventHandlerOnJoinChannelSuccessJson( - connection: json['connection'] == null + AudioEncodedFrameObserverOnRecordAudioEncodedFrameJson( + length: json['length'] as int?, + audioEncodedFrameInfo: json['audioEncodedFrameInfo'] == null ? null - : RtcConnection.fromJson( - json['connection'] as Map), - elapsed: json['elapsed'] as int?, + : EncodedAudioFrameInfo.fromJson( + json['audioEncodedFrameInfo'] as Map), ); -Map _$RtcEngineEventHandlerOnJoinChannelSuccessJsonToJson( - RtcEngineEventHandlerOnJoinChannelSuccessJson instance) => - { - 'connection': instance.connection?.toJson(), - 'elapsed': instance.elapsed, - }; +Map + _$AudioEncodedFrameObserverOnRecordAudioEncodedFrameJsonToJson( + AudioEncodedFrameObserverOnRecordAudioEncodedFrameJson instance) => + { + 'length': instance.length, + 'audioEncodedFrameInfo': instance.audioEncodedFrameInfo?.toJson(), + }; -RtcEngineEventHandlerOnRejoinChannelSuccessJson - _$RtcEngineEventHandlerOnRejoinChannelSuccessJsonFromJson( +AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJson + _$AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJsonFromJson( Map json) => - RtcEngineEventHandlerOnRejoinChannelSuccessJson( - connection: json['connection'] == null + AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJson( + length: json['length'] as int?, + audioEncodedFrameInfo: json['audioEncodedFrameInfo'] == null ? null - : RtcConnection.fromJson( - json['connection'] as Map), - elapsed: json['elapsed'] as int?, + : EncodedAudioFrameInfo.fromJson( + json['audioEncodedFrameInfo'] as Map), ); -Map _$RtcEngineEventHandlerOnRejoinChannelSuccessJsonToJson( - RtcEngineEventHandlerOnRejoinChannelSuccessJson instance) => +Map _$AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJsonToJson( + AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJson instance) => { - 'connection': instance.connection?.toJson(), - 'elapsed': instance.elapsed, + 'length': instance.length, + 'audioEncodedFrameInfo': instance.audioEncodedFrameInfo?.toJson(), }; -RtcEngineEventHandlerOnProxyConnectedJson - _$RtcEngineEventHandlerOnProxyConnectedJsonFromJson( +AudioEncodedFrameObserverOnMixedAudioEncodedFrameJson + _$AudioEncodedFrameObserverOnMixedAudioEncodedFrameJsonFromJson( Map json) => - RtcEngineEventHandlerOnProxyConnectedJson( - channel: json['channel'] as String?, - uid: json['uid'] as int?, - proxyType: $enumDecodeNullable(_$ProxyTypeEnumMap, json['proxyType']), - localProxyIp: json['localProxyIp'] as String?, - elapsed: json['elapsed'] as int?, + AudioEncodedFrameObserverOnMixedAudioEncodedFrameJson( + length: json['length'] as int?, + audioEncodedFrameInfo: json['audioEncodedFrameInfo'] == null + ? null + : EncodedAudioFrameInfo.fromJson( + json['audioEncodedFrameInfo'] as Map), ); -Map _$RtcEngineEventHandlerOnProxyConnectedJsonToJson( - RtcEngineEventHandlerOnProxyConnectedJson instance) => - { - 'channel': instance.channel, - 'uid': instance.uid, - 'proxyType': _$ProxyTypeEnumMap[instance.proxyType], - 'localProxyIp': instance.localProxyIp, - 'elapsed': instance.elapsed, - }; - -const _$ProxyTypeEnumMap = { - ProxyType.noneProxyType: 0, - ProxyType.udpProxyType: 1, - ProxyType.tcpProxyType: 2, - ProxyType.localProxyType: 3, - ProxyType.tcpProxyAutoFallbackType: 4, - ProxyType.httpProxyType: 5, - ProxyType.httpsProxyType: 6, -}; +Map + _$AudioEncodedFrameObserverOnMixedAudioEncodedFrameJsonToJson( + AudioEncodedFrameObserverOnMixedAudioEncodedFrameJson instance) => + { + 'length': instance.length, + 'audioEncodedFrameInfo': instance.audioEncodedFrameInfo?.toJson(), + }; -RtcEngineEventHandlerOnErrorJson _$RtcEngineEventHandlerOnErrorJsonFromJson( +AudioPcmFrameSinkOnFrameJson _$AudioPcmFrameSinkOnFrameJsonFromJson( Map json) => - RtcEngineEventHandlerOnErrorJson( - err: $enumDecodeNullable(_$ErrorCodeTypeEnumMap, json['err']), - msg: json['msg'] as String?, + AudioPcmFrameSinkOnFrameJson( + frame: json['frame'] == null + ? null + : AudioPcmFrame.fromJson(json['frame'] as Map), ); -Map _$RtcEngineEventHandlerOnErrorJsonToJson( - RtcEngineEventHandlerOnErrorJson instance) => +Map _$AudioPcmFrameSinkOnFrameJsonToJson( + AudioPcmFrameSinkOnFrameJson instance) => { - 'err': _$ErrorCodeTypeEnumMap[instance.err], - 'msg': instance.msg, + 'frame': instance.frame?.toJson(), }; -const _$ErrorCodeTypeEnumMap = { - ErrorCodeType.errOk: 0, - ErrorCodeType.errFailed: 1, - ErrorCodeType.errInvalidArgument: 2, - ErrorCodeType.errNotReady: 3, - ErrorCodeType.errNotSupported: 4, - ErrorCodeType.errRefused: 5, - ErrorCodeType.errBufferTooSmall: 6, - ErrorCodeType.errNotInitialized: 7, - ErrorCodeType.errInvalidState: 8, - ErrorCodeType.errNoPermission: 9, - ErrorCodeType.errTimedout: 10, - ErrorCodeType.errCanceled: 11, - ErrorCodeType.errTooOften: 12, - ErrorCodeType.errBindSocket: 13, - ErrorCodeType.errNetDown: 14, - ErrorCodeType.errJoinChannelRejected: 17, - ErrorCodeType.errLeaveChannelRejected: 18, - ErrorCodeType.errAlreadyInUse: 19, - ErrorCodeType.errAborted: 20, - ErrorCodeType.errInitNetEngine: 21, - ErrorCodeType.errResourceLimited: 22, - ErrorCodeType.errInvalidAppId: 101, - ErrorCodeType.errInvalidChannelName: 102, - ErrorCodeType.errNoServerResources: 103, - ErrorCodeType.errTokenExpired: 109, - ErrorCodeType.errInvalidToken: 110, - ErrorCodeType.errConnectionInterrupted: 111, - ErrorCodeType.errConnectionLost: 112, - ErrorCodeType.errNotInChannel: 113, - ErrorCodeType.errSizeTooLarge: 114, - ErrorCodeType.errBitrateLimit: 115, - ErrorCodeType.errTooManyDataStreams: 116, - ErrorCodeType.errStreamMessageTimeout: 117, - ErrorCodeType.errSetClientRoleNotAuthorized: 119, - ErrorCodeType.errDecryptionFailed: 120, - ErrorCodeType.errInvalidUserId: 121, - ErrorCodeType.errClientIsBannedByServer: 123, - ErrorCodeType.errEncryptedStreamNotAllowedPublish: 130, - ErrorCodeType.errLicenseCredentialInvalid: 131, - ErrorCodeType.errInvalidUserAccount: 134, - ErrorCodeType.errModuleNotFound: 157, - ErrorCodeType.errCertRaw: 157, - ErrorCodeType.errCertJsonPart: 158, - ErrorCodeType.errCertJsonInval: 159, - ErrorCodeType.errCertJsonNomem: 160, - ErrorCodeType.errCertCustom: 161, - ErrorCodeType.errCertCredential: 162, - ErrorCodeType.errCertSign: 163, - ErrorCodeType.errCertFail: 164, - ErrorCodeType.errCertBuf: 165, - ErrorCodeType.errCertNull: 166, - ErrorCodeType.errCertDuedate: 167, - ErrorCodeType.errCertRequest: 168, - ErrorCodeType.errPcmsendFormat: 200, - ErrorCodeType.errPcmsendBufferoverflow: 201, - ErrorCodeType.errLoginAlreadyLogin: 428, - ErrorCodeType.errLoadMediaEngine: 1001, - ErrorCodeType.errAdmGeneralError: 1005, - ErrorCodeType.errAdmInitPlayout: 1008, - ErrorCodeType.errAdmStartPlayout: 1009, - ErrorCodeType.errAdmStopPlayout: 1010, - ErrorCodeType.errAdmInitRecording: 1011, - ErrorCodeType.errAdmStartRecording: 1012, - ErrorCodeType.errAdmStopRecording: 1013, - ErrorCodeType.errVdmCameraNotAuthorized: 1501, -}; - -RtcEngineEventHandlerOnAudioQualityJson - _$RtcEngineEventHandlerOnAudioQualityJsonFromJson( +AudioFrameObserverBaseOnRecordAudioFrameJson + _$AudioFrameObserverBaseOnRecordAudioFrameJsonFromJson( Map json) => - RtcEngineEventHandlerOnAudioQualityJson( - connection: json['connection'] == null + AudioFrameObserverBaseOnRecordAudioFrameJson( + channelId: json['channelId'] as String?, + audioFrame: json['audioFrame'] == null ? null - : RtcConnection.fromJson( - json['connection'] as Map), - remoteUid: json['remoteUid'] as int?, - quality: $enumDecodeNullable(_$QualityTypeEnumMap, json['quality']), - delay: json['delay'] as int?, - lost: json['lost'] as int?, + : AudioFrame.fromJson(json['audioFrame'] as Map), ); -Map _$RtcEngineEventHandlerOnAudioQualityJsonToJson( - RtcEngineEventHandlerOnAudioQualityJson instance) => +Map _$AudioFrameObserverBaseOnRecordAudioFrameJsonToJson( + AudioFrameObserverBaseOnRecordAudioFrameJson instance) => { - 'connection': instance.connection?.toJson(), - 'remoteUid': instance.remoteUid, - 'quality': _$QualityTypeEnumMap[instance.quality], - 'delay': instance.delay, - 'lost': instance.lost, + 'channelId': instance.channelId, + 'audioFrame': instance.audioFrame?.toJson(), }; -const _$QualityTypeEnumMap = { - QualityType.qualityUnknown: 0, - QualityType.qualityExcellent: 1, - QualityType.qualityGood: 2, - QualityType.qualityPoor: 3, - QualityType.qualityBad: 4, - QualityType.qualityVbad: 5, - QualityType.qualityDown: 6, - QualityType.qualityUnsupported: 7, - QualityType.qualityDetecting: 8, -}; - -RtcEngineEventHandlerOnLastmileProbeResultJson - _$RtcEngineEventHandlerOnLastmileProbeResultJsonFromJson( +AudioFrameObserverBaseOnPlaybackAudioFrameJson + _$AudioFrameObserverBaseOnPlaybackAudioFrameJsonFromJson( Map json) => - RtcEngineEventHandlerOnLastmileProbeResultJson( - result: json['result'] == null + AudioFrameObserverBaseOnPlaybackAudioFrameJson( + channelId: json['channelId'] as String?, + audioFrame: json['audioFrame'] == null ? null - : LastmileProbeResult.fromJson( - json['result'] as Map), + : AudioFrame.fromJson(json['audioFrame'] as Map), ); -Map _$RtcEngineEventHandlerOnLastmileProbeResultJsonToJson( - RtcEngineEventHandlerOnLastmileProbeResultJson instance) => +Map _$AudioFrameObserverBaseOnPlaybackAudioFrameJsonToJson( + AudioFrameObserverBaseOnPlaybackAudioFrameJson instance) => { - 'result': instance.result?.toJson(), + 'channelId': instance.channelId, + 'audioFrame': instance.audioFrame?.toJson(), }; -RtcEngineEventHandlerOnAudioVolumeIndicationJson - _$RtcEngineEventHandlerOnAudioVolumeIndicationJsonFromJson( +AudioFrameObserverBaseOnMixedAudioFrameJson + _$AudioFrameObserverBaseOnMixedAudioFrameJsonFromJson( Map json) => - RtcEngineEventHandlerOnAudioVolumeIndicationJson( - connection: json['connection'] == null + AudioFrameObserverBaseOnMixedAudioFrameJson( + channelId: json['channelId'] as String?, + audioFrame: json['audioFrame'] == null ? null - : RtcConnection.fromJson( - json['connection'] as Map), - speakers: (json['speakers'] as List?) - ?.map((e) => AudioVolumeInfo.fromJson(e as Map)) - .toList(), - speakerNumber: json['speakerNumber'] as int?, - totalVolume: json['totalVolume'] as int?, + : AudioFrame.fromJson(json['audioFrame'] as Map), ); -Map _$RtcEngineEventHandlerOnAudioVolumeIndicationJsonToJson( - RtcEngineEventHandlerOnAudioVolumeIndicationJson instance) => +Map _$AudioFrameObserverBaseOnMixedAudioFrameJsonToJson( + AudioFrameObserverBaseOnMixedAudioFrameJson instance) => { - 'connection': instance.connection?.toJson(), - 'speakers': instance.speakers?.map((e) => e.toJson()).toList(), - 'speakerNumber': instance.speakerNumber, - 'totalVolume': instance.totalVolume, + 'channelId': instance.channelId, + 'audioFrame': instance.audioFrame?.toJson(), }; -RtcEngineEventHandlerOnLeaveChannelJson - _$RtcEngineEventHandlerOnLeaveChannelJsonFromJson( +AudioFrameObserverBaseOnEarMonitoringAudioFrameJson + _$AudioFrameObserverBaseOnEarMonitoringAudioFrameJsonFromJson( Map json) => - RtcEngineEventHandlerOnLeaveChannelJson( - connection: json['connection'] == null - ? null - : RtcConnection.fromJson( - json['connection'] as Map), - stats: json['stats'] == null + AudioFrameObserverBaseOnEarMonitoringAudioFrameJson( + audioFrame: json['audioFrame'] == null ? null - : RtcStats.fromJson(json['stats'] as Map), + : AudioFrame.fromJson(json['audioFrame'] as Map), ); -Map _$RtcEngineEventHandlerOnLeaveChannelJsonToJson( - RtcEngineEventHandlerOnLeaveChannelJson instance) => - { - 'connection': instance.connection?.toJson(), - 'stats': instance.stats?.toJson(), - }; +Map + _$AudioFrameObserverBaseOnEarMonitoringAudioFrameJsonToJson( + AudioFrameObserverBaseOnEarMonitoringAudioFrameJson instance) => + { + 'audioFrame': instance.audioFrame?.toJson(), + }; -RtcEngineEventHandlerOnRtcStatsJson - _$RtcEngineEventHandlerOnRtcStatsJsonFromJson(Map json) => - RtcEngineEventHandlerOnRtcStatsJson( - connection: json['connection'] == null - ? null - : RtcConnection.fromJson( - json['connection'] as Map), - stats: json['stats'] == null +AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJson + _$AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJsonFromJson( + Map json) => + AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJson( + channelId: json['channelId'] as String?, + uid: json['uid'] as int?, + audioFrame: json['audioFrame'] == null ? null - : RtcStats.fromJson(json['stats'] as Map), + : AudioFrame.fromJson(json['audioFrame'] as Map), ); -Map _$RtcEngineEventHandlerOnRtcStatsJsonToJson( - RtcEngineEventHandlerOnRtcStatsJson instance) => - { - 'connection': instance.connection?.toJson(), - 'stats': instance.stats?.toJson(), - }; +Map + _$AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJsonToJson( + AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJson instance) => + { + 'channelId': instance.channelId, + 'uid': instance.uid, + 'audioFrame': instance.audioFrame?.toJson(), + }; -RtcEngineEventHandlerOnAudioDeviceStateChangedJson - _$RtcEngineEventHandlerOnAudioDeviceStateChangedJsonFromJson( +AudioSpectrumObserverOnLocalAudioSpectrumJson + _$AudioSpectrumObserverOnLocalAudioSpectrumJsonFromJson( Map json) => - RtcEngineEventHandlerOnAudioDeviceStateChangedJson( - deviceId: json['deviceId'] as String?, - deviceType: - $enumDecodeNullable(_$MediaDeviceTypeEnumMap, json['deviceType']), - deviceState: $enumDecodeNullable( - _$MediaDeviceStateTypeEnumMap, json['deviceState']), + AudioSpectrumObserverOnLocalAudioSpectrumJson( + data: json['data'] == null + ? null + : AudioSpectrumData.fromJson( + json['data'] as Map), ); -Map _$RtcEngineEventHandlerOnAudioDeviceStateChangedJsonToJson( - RtcEngineEventHandlerOnAudioDeviceStateChangedJson instance) => +Map _$AudioSpectrumObserverOnLocalAudioSpectrumJsonToJson( + AudioSpectrumObserverOnLocalAudioSpectrumJson instance) => { - 'deviceId': instance.deviceId, - 'deviceType': _$MediaDeviceTypeEnumMap[instance.deviceType], - 'deviceState': _$MediaDeviceStateTypeEnumMap[instance.deviceState], + 'data': instance.data?.toJson(), }; -const _$MediaDeviceTypeEnumMap = { - MediaDeviceType.unknownAudioDevice: -1, - MediaDeviceType.audioPlayoutDevice: 0, - MediaDeviceType.audioRecordingDevice: 1, - MediaDeviceType.videoRenderDevice: 2, - MediaDeviceType.videoCaptureDevice: 3, - MediaDeviceType.audioApplicationPlayoutDevice: 4, - MediaDeviceType.audioVirtualPlayoutDevice: 5, - MediaDeviceType.audioVirtualRecordingDevice: 6, -}; - -const _$MediaDeviceStateTypeEnumMap = { - MediaDeviceStateType.mediaDeviceStateIdle: 0, - MediaDeviceStateType.mediaDeviceStateActive: 1, - MediaDeviceStateType.mediaDeviceStateDisabled: 2, - MediaDeviceStateType.mediaDeviceStateNotPresent: 4, - MediaDeviceStateType.mediaDeviceStateUnplugged: 8, -}; - -RtcEngineEventHandlerOnAudioMixingPositionChangedJson - _$RtcEngineEventHandlerOnAudioMixingPositionChangedJsonFromJson( +AudioSpectrumObserverOnRemoteAudioSpectrumJson + _$AudioSpectrumObserverOnRemoteAudioSpectrumJsonFromJson( Map json) => - RtcEngineEventHandlerOnAudioMixingPositionChangedJson( - position: json['position'] as int?, + AudioSpectrumObserverOnRemoteAudioSpectrumJson( + spectrums: (json['spectrums'] as List?) + ?.map((e) => + UserAudioSpectrumInfo.fromJson(e as Map)) + .toList(), + spectrumNumber: json['spectrumNumber'] as int?, ); -Map - _$RtcEngineEventHandlerOnAudioMixingPositionChangedJsonToJson( - RtcEngineEventHandlerOnAudioMixingPositionChangedJson instance) => - { - 'position': instance.position, - }; - -RtcEngineEventHandlerOnAudioMixingFinishedJson - _$RtcEngineEventHandlerOnAudioMixingFinishedJsonFromJson( - Map json) => - RtcEngineEventHandlerOnAudioMixingFinishedJson(); - -Map _$RtcEngineEventHandlerOnAudioMixingFinishedJsonToJson( - RtcEngineEventHandlerOnAudioMixingFinishedJson instance) => - {}; +Map _$AudioSpectrumObserverOnRemoteAudioSpectrumJsonToJson( + AudioSpectrumObserverOnRemoteAudioSpectrumJson instance) => + { + 'spectrums': instance.spectrums?.map((e) => e.toJson()).toList(), + 'spectrumNumber': instance.spectrumNumber, + }; -RtcEngineEventHandlerOnAudioEffectFinishedJson - _$RtcEngineEventHandlerOnAudioEffectFinishedJsonFromJson( +VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJson + _$VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJsonFromJson( Map json) => - RtcEngineEventHandlerOnAudioEffectFinishedJson( - soundId: json['soundId'] as int?, + VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJson( + uid: json['uid'] as int?, + length: json['length'] as int?, + videoEncodedFrameInfo: json['videoEncodedFrameInfo'] == null + ? null + : EncodedVideoFrameInfo.fromJson( + json['videoEncodedFrameInfo'] as Map), ); -Map _$RtcEngineEventHandlerOnAudioEffectFinishedJsonToJson( - RtcEngineEventHandlerOnAudioEffectFinishedJson instance) => +Map _$VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJsonToJson( + VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJson instance) => { - 'soundId': instance.soundId, + 'uid': instance.uid, + 'length': instance.length, + 'videoEncodedFrameInfo': instance.videoEncodedFrameInfo?.toJson(), }; -RtcEngineEventHandlerOnVideoDeviceStateChangedJson - _$RtcEngineEventHandlerOnVideoDeviceStateChangedJsonFromJson( +VideoFrameObserverOnCaptureVideoFrameJson + _$VideoFrameObserverOnCaptureVideoFrameJsonFromJson( Map json) => - RtcEngineEventHandlerOnVideoDeviceStateChangedJson( - deviceId: json['deviceId'] as String?, - deviceType: - $enumDecodeNullable(_$MediaDeviceTypeEnumMap, json['deviceType']), - deviceState: $enumDecodeNullable( - _$MediaDeviceStateTypeEnumMap, json['deviceState']), + VideoFrameObserverOnCaptureVideoFrameJson( + sourceType: + $enumDecodeNullable(_$VideoSourceTypeEnumMap, json['sourceType']), + videoFrame: json['videoFrame'] == null + ? null + : VideoFrame.fromJson(json['videoFrame'] as Map), ); -Map _$RtcEngineEventHandlerOnVideoDeviceStateChangedJsonToJson( - RtcEngineEventHandlerOnVideoDeviceStateChangedJson instance) => +Map _$VideoFrameObserverOnCaptureVideoFrameJsonToJson( + VideoFrameObserverOnCaptureVideoFrameJson instance) => { - 'deviceId': instance.deviceId, - 'deviceType': _$MediaDeviceTypeEnumMap[instance.deviceType], - 'deviceState': _$MediaDeviceStateTypeEnumMap[instance.deviceState], + 'sourceType': _$VideoSourceTypeEnumMap[instance.sourceType], + 'videoFrame': instance.videoFrame?.toJson(), }; -RtcEngineEventHandlerOnNetworkQualityJson - _$RtcEngineEventHandlerOnNetworkQualityJsonFromJson( +const _$VideoSourceTypeEnumMap = { + VideoSourceType.videoSourceCameraPrimary: 0, + VideoSourceType.videoSourceCamera: 0, + VideoSourceType.videoSourceCameraSecondary: 1, + VideoSourceType.videoSourceScreenPrimary: 2, + VideoSourceType.videoSourceScreen: 2, + VideoSourceType.videoSourceScreenSecondary: 3, + VideoSourceType.videoSourceCustom: 4, + VideoSourceType.videoSourceMediaPlayer: 5, + VideoSourceType.videoSourceRtcImagePng: 6, + VideoSourceType.videoSourceRtcImageJpeg: 7, + VideoSourceType.videoSourceRtcImageGif: 8, + VideoSourceType.videoSourceRemote: 9, + VideoSourceType.videoSourceTranscoded: 10, + VideoSourceType.videoSourceCameraThird: 11, + VideoSourceType.videoSourceCameraFourth: 12, + VideoSourceType.videoSourceScreenThird: 13, + VideoSourceType.videoSourceScreenFourth: 14, + VideoSourceType.videoSourceUnknown: 100, +}; + +VideoFrameObserverOnPreEncodeVideoFrameJson + _$VideoFrameObserverOnPreEncodeVideoFrameJsonFromJson( Map json) => - RtcEngineEventHandlerOnNetworkQualityJson( - connection: json['connection'] == null + VideoFrameObserverOnPreEncodeVideoFrameJson( + sourceType: + $enumDecodeNullable(_$VideoSourceTypeEnumMap, json['sourceType']), + videoFrame: json['videoFrame'] == null ? null - : RtcConnection.fromJson( - json['connection'] as Map), - remoteUid: json['remoteUid'] as int?, - txQuality: - $enumDecodeNullable(_$QualityTypeEnumMap, json['txQuality']), - rxQuality: - $enumDecodeNullable(_$QualityTypeEnumMap, json['rxQuality']), + : VideoFrame.fromJson(json['videoFrame'] as Map), ); -Map _$RtcEngineEventHandlerOnNetworkQualityJsonToJson( - RtcEngineEventHandlerOnNetworkQualityJson instance) => +Map _$VideoFrameObserverOnPreEncodeVideoFrameJsonToJson( + VideoFrameObserverOnPreEncodeVideoFrameJson instance) => { - 'connection': instance.connection?.toJson(), - 'remoteUid': instance.remoteUid, - 'txQuality': _$QualityTypeEnumMap[instance.txQuality], - 'rxQuality': _$QualityTypeEnumMap[instance.rxQuality], + 'sourceType': _$VideoSourceTypeEnumMap[instance.sourceType], + 'videoFrame': instance.videoFrame?.toJson(), }; -RtcEngineEventHandlerOnIntraRequestReceivedJson - _$RtcEngineEventHandlerOnIntraRequestReceivedJsonFromJson( +VideoFrameObserverOnMediaPlayerVideoFrameJson + _$VideoFrameObserverOnMediaPlayerVideoFrameJsonFromJson( Map json) => - RtcEngineEventHandlerOnIntraRequestReceivedJson( - connection: json['connection'] == null + VideoFrameObserverOnMediaPlayerVideoFrameJson( + videoFrame: json['videoFrame'] == null ? null - : RtcConnection.fromJson( - json['connection'] as Map), + : VideoFrame.fromJson(json['videoFrame'] as Map), + mediaPlayerId: json['mediaPlayerId'] as int?, ); -Map _$RtcEngineEventHandlerOnIntraRequestReceivedJsonToJson( - RtcEngineEventHandlerOnIntraRequestReceivedJson instance) => +Map _$VideoFrameObserverOnMediaPlayerVideoFrameJsonToJson( + VideoFrameObserverOnMediaPlayerVideoFrameJson instance) => { - 'connection': instance.connection?.toJson(), + 'videoFrame': instance.videoFrame?.toJson(), + 'mediaPlayerId': instance.mediaPlayerId, }; -RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJson - _$RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJsonFromJson( +VideoFrameObserverOnRenderVideoFrameJson + _$VideoFrameObserverOnRenderVideoFrameJsonFromJson( Map json) => - RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJson( - info: json['info'] == null + VideoFrameObserverOnRenderVideoFrameJson( + channelId: json['channelId'] as String?, + remoteUid: json['remoteUid'] as int?, + videoFrame: json['videoFrame'] == null ? null - : UplinkNetworkInfo.fromJson( - json['info'] as Map), + : VideoFrame.fromJson(json['videoFrame'] as Map), ); -Map - _$RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJsonToJson( - RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJson instance) => - { - 'info': instance.info?.toJson(), - }; +Map _$VideoFrameObserverOnRenderVideoFrameJsonToJson( + VideoFrameObserverOnRenderVideoFrameJson instance) => + { + 'channelId': instance.channelId, + 'remoteUid': instance.remoteUid, + 'videoFrame': instance.videoFrame?.toJson(), + }; -RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJson - _$RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJsonFromJson( +VideoFrameObserverOnTranscodedVideoFrameJson + _$VideoFrameObserverOnTranscodedVideoFrameJsonFromJson( Map json) => - RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJson( - info: json['info'] == null + VideoFrameObserverOnTranscodedVideoFrameJson( + videoFrame: json['videoFrame'] == null ? null - : DownlinkNetworkInfo.fromJson( - json['info'] as Map), - ); - -Map - _$RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJsonToJson( - RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJson instance) => - { - 'info': instance.info?.toJson(), - }; - -RtcEngineEventHandlerOnLastmileQualityJson - _$RtcEngineEventHandlerOnLastmileQualityJsonFromJson( - Map json) => - RtcEngineEventHandlerOnLastmileQualityJson( - quality: $enumDecodeNullable(_$QualityTypeEnumMap, json['quality']), + : VideoFrame.fromJson(json['videoFrame'] as Map), ); -Map _$RtcEngineEventHandlerOnLastmileQualityJsonToJson( - RtcEngineEventHandlerOnLastmileQualityJson instance) => +Map _$VideoFrameObserverOnTranscodedVideoFrameJsonToJson( + VideoFrameObserverOnTranscodedVideoFrameJson instance) => { - 'quality': _$QualityTypeEnumMap[instance.quality], + 'videoFrame': instance.videoFrame?.toJson(), }; -RtcEngineEventHandlerOnFirstLocalVideoFrameJson - _$RtcEngineEventHandlerOnFirstLocalVideoFrameJsonFromJson( +MediaRecorderObserverOnRecorderStateChangedJson + _$MediaRecorderObserverOnRecorderStateChangedJsonFromJson( Map json) => - RtcEngineEventHandlerOnFirstLocalVideoFrameJson( - source: $enumDecodeNullable(_$VideoSourceTypeEnumMap, json['source']), - width: json['width'] as int?, - height: json['height'] as int?, - elapsed: json['elapsed'] as int?, + MediaRecorderObserverOnRecorderStateChangedJson( + channelId: json['channelId'] as String?, + uid: json['uid'] as int?, + state: $enumDecodeNullable(_$RecorderStateEnumMap, json['state']), + error: $enumDecodeNullable(_$RecorderErrorCodeEnumMap, json['error']), ); -Map _$RtcEngineEventHandlerOnFirstLocalVideoFrameJsonToJson( - RtcEngineEventHandlerOnFirstLocalVideoFrameJson instance) => +Map _$MediaRecorderObserverOnRecorderStateChangedJsonToJson( + MediaRecorderObserverOnRecorderStateChangedJson instance) => { - 'source': _$VideoSourceTypeEnumMap[instance.source], - 'width': instance.width, - 'height': instance.height, - 'elapsed': instance.elapsed, + 'channelId': instance.channelId, + 'uid': instance.uid, + 'state': _$RecorderStateEnumMap[instance.state], + 'error': _$RecorderErrorCodeEnumMap[instance.error], }; -const _$VideoSourceTypeEnumMap = { - VideoSourceType.videoSourceCameraPrimary: 0, - VideoSourceType.videoSourceCamera: 0, - VideoSourceType.videoSourceCameraSecondary: 1, - VideoSourceType.videoSourceScreenPrimary: 2, - VideoSourceType.videoSourceScreen: 2, - VideoSourceType.videoSourceScreenSecondary: 3, - VideoSourceType.videoSourceCustom: 4, - VideoSourceType.videoSourceMediaPlayer: 5, - VideoSourceType.videoSourceRtcImagePng: 6, - VideoSourceType.videoSourceRtcImageJpeg: 7, - VideoSourceType.videoSourceRtcImageGif: 8, - VideoSourceType.videoSourceRemote: 9, - VideoSourceType.videoSourceTranscoded: 10, - VideoSourceType.videoSourceCameraThird: 11, - VideoSourceType.videoSourceCameraFourth: 12, - VideoSourceType.videoSourceScreenThird: 13, - VideoSourceType.videoSourceScreenFourth: 14, - VideoSourceType.videoSourceUnknown: 100, +const _$RecorderStateEnumMap = { + RecorderState.recorderStateError: -1, + RecorderState.recorderStateStart: 2, + RecorderState.recorderStateStop: 3, }; -RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJson - _$RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJsonFromJson( +const _$RecorderErrorCodeEnumMap = { + RecorderErrorCode.recorderErrorNone: 0, + RecorderErrorCode.recorderErrorWriteFailed: 1, + RecorderErrorCode.recorderErrorNoStream: 2, + RecorderErrorCode.recorderErrorOverMaxDuration: 3, + RecorderErrorCode.recorderErrorConfigChanged: 4, +}; + +MediaRecorderObserverOnRecorderInfoUpdatedJson + _$MediaRecorderObserverOnRecorderInfoUpdatedJsonFromJson( Map json) => - RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJson( - source: $enumDecodeNullable(_$VideoSourceTypeEnumMap, json['source']), - elapsed: json['elapsed'] as int?, + MediaRecorderObserverOnRecorderInfoUpdatedJson( + channelId: json['channelId'] as String?, + uid: json['uid'] as int?, + info: json['info'] == null + ? null + : RecorderInfo.fromJson(json['info'] as Map), ); -Map _$RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJsonToJson( - RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJson instance) => +Map _$MediaRecorderObserverOnRecorderInfoUpdatedJsonToJson( + MediaRecorderObserverOnRecorderInfoUpdatedJson instance) => { - 'source': _$VideoSourceTypeEnumMap[instance.source], - 'elapsed': instance.elapsed, + 'channelId': instance.channelId, + 'uid': instance.uid, + 'info': instance.info?.toJson(), }; -RtcEngineEventHandlerOnFirstRemoteVideoDecodedJson - _$RtcEngineEventHandlerOnFirstRemoteVideoDecodedJsonFromJson( +MediaPlayerVideoFrameObserverOnFrameJson + _$MediaPlayerVideoFrameObserverOnFrameJsonFromJson( Map json) => - RtcEngineEventHandlerOnFirstRemoteVideoDecodedJson( - connection: json['connection'] == null + MediaPlayerVideoFrameObserverOnFrameJson( + frame: json['frame'] == null ? null - : RtcConnection.fromJson( - json['connection'] as Map), - remoteUid: json['remoteUid'] as int?, - width: json['width'] as int?, - height: json['height'] as int?, - elapsed: json['elapsed'] as int?, + : VideoFrame.fromJson(json['frame'] as Map), ); -Map _$RtcEngineEventHandlerOnFirstRemoteVideoDecodedJsonToJson( - RtcEngineEventHandlerOnFirstRemoteVideoDecodedJson instance) => +Map _$MediaPlayerVideoFrameObserverOnFrameJsonToJson( + MediaPlayerVideoFrameObserverOnFrameJson instance) => { - 'connection': instance.connection?.toJson(), - 'remoteUid': instance.remoteUid, - 'width': instance.width, - 'height': instance.height, - 'elapsed': instance.elapsed, + 'frame': instance.frame?.toJson(), }; -RtcEngineEventHandlerOnVideoSizeChangedJson - _$RtcEngineEventHandlerOnVideoSizeChangedJsonFromJson( +MediaPlayerSourceObserverOnPlayerSourceStateChangedJson + _$MediaPlayerSourceObserverOnPlayerSourceStateChangedJsonFromJson( Map json) => - RtcEngineEventHandlerOnVideoSizeChangedJson( - connection: json['connection'] == null - ? null - : RtcConnection.fromJson( - json['connection'] as Map), - sourceType: - $enumDecodeNullable(_$VideoSourceTypeEnumMap, json['sourceType']), - uid: json['uid'] as int?, - width: json['width'] as int?, - height: json['height'] as int?, - rotation: json['rotation'] as int?, + MediaPlayerSourceObserverOnPlayerSourceStateChangedJson( + state: $enumDecodeNullable(_$MediaPlayerStateEnumMap, json['state']), + ec: $enumDecodeNullable(_$MediaPlayerErrorEnumMap, json['ec']), ); -Map _$RtcEngineEventHandlerOnVideoSizeChangedJsonToJson( - RtcEngineEventHandlerOnVideoSizeChangedJson instance) => - { - 'connection': instance.connection?.toJson(), - 'sourceType': _$VideoSourceTypeEnumMap[instance.sourceType], - 'uid': instance.uid, - 'width': instance.width, - 'height': instance.height, - 'rotation': instance.rotation, - }; +Map + _$MediaPlayerSourceObserverOnPlayerSourceStateChangedJsonToJson( + MediaPlayerSourceObserverOnPlayerSourceStateChangedJson instance) => + { + 'state': _$MediaPlayerStateEnumMap[instance.state], + 'ec': _$MediaPlayerErrorEnumMap[instance.ec], + }; -RtcEngineEventHandlerOnLocalVideoStateChangedJson - _$RtcEngineEventHandlerOnLocalVideoStateChangedJsonFromJson( +const _$MediaPlayerStateEnumMap = { + MediaPlayerState.playerStateIdle: 0, + MediaPlayerState.playerStateOpening: 1, + MediaPlayerState.playerStateOpenCompleted: 2, + MediaPlayerState.playerStatePlaying: 3, + MediaPlayerState.playerStatePaused: 4, + MediaPlayerState.playerStatePlaybackCompleted: 5, + MediaPlayerState.playerStatePlaybackAllLoopsCompleted: 6, + MediaPlayerState.playerStateStopped: 7, + MediaPlayerState.playerStatePausingInternal: 50, + MediaPlayerState.playerStateStoppingInternal: 51, + MediaPlayerState.playerStateSeekingInternal: 52, + MediaPlayerState.playerStateGettingInternal: 53, + MediaPlayerState.playerStateNoneInternal: 54, + MediaPlayerState.playerStateDoNothingInternal: 55, + MediaPlayerState.playerStateSetTrackInternal: 56, + MediaPlayerState.playerStateFailed: 100, +}; + +const _$MediaPlayerErrorEnumMap = { + MediaPlayerError.playerErrorNone: 0, + MediaPlayerError.playerErrorInvalidArguments: -1, + MediaPlayerError.playerErrorInternal: -2, + MediaPlayerError.playerErrorNoResource: -3, + MediaPlayerError.playerErrorInvalidMediaSource: -4, + MediaPlayerError.playerErrorUnknownStreamType: -5, + MediaPlayerError.playerErrorObjNotInitialized: -6, + MediaPlayerError.playerErrorCodecNotSupported: -7, + MediaPlayerError.playerErrorVideoRenderFailed: -8, + MediaPlayerError.playerErrorInvalidState: -9, + MediaPlayerError.playerErrorUrlNotFound: -10, + MediaPlayerError.playerErrorInvalidConnectionState: -11, + MediaPlayerError.playerErrorSrcBufferUnderflow: -12, + MediaPlayerError.playerErrorInterrupted: -13, + MediaPlayerError.playerErrorNotSupported: -14, + MediaPlayerError.playerErrorTokenExpired: -15, + MediaPlayerError.playerErrorIpExpired: -16, + MediaPlayerError.playerErrorUnknown: -17, +}; + +MediaPlayerSourceObserverOnPositionChangedJson + _$MediaPlayerSourceObserverOnPositionChangedJsonFromJson( Map json) => - RtcEngineEventHandlerOnLocalVideoStateChangedJson( - source: $enumDecodeNullable(_$VideoSourceTypeEnumMap, json['source']), - state: $enumDecodeNullable( - _$LocalVideoStreamStateEnumMap, json['state']), - error: $enumDecodeNullable( - _$LocalVideoStreamErrorEnumMap, json['error']), + MediaPlayerSourceObserverOnPositionChangedJson( + positionMs: json['position_ms'] as int?, ); -Map _$RtcEngineEventHandlerOnLocalVideoStateChangedJsonToJson( - RtcEngineEventHandlerOnLocalVideoStateChangedJson instance) => +Map _$MediaPlayerSourceObserverOnPositionChangedJsonToJson( + MediaPlayerSourceObserverOnPositionChangedJson instance) => { - 'source': _$VideoSourceTypeEnumMap[instance.source], - 'state': _$LocalVideoStreamStateEnumMap[instance.state], - 'error': _$LocalVideoStreamErrorEnumMap[instance.error], + 'position_ms': instance.positionMs, }; -const _$LocalVideoStreamStateEnumMap = { - LocalVideoStreamState.localVideoStreamStateStopped: 0, - LocalVideoStreamState.localVideoStreamStateCapturing: 1, - LocalVideoStreamState.localVideoStreamStateEncoding: 2, - LocalVideoStreamState.localVideoStreamStateFailed: 3, -}; - -const _$LocalVideoStreamErrorEnumMap = { - LocalVideoStreamError.localVideoStreamErrorOk: 0, - LocalVideoStreamError.localVideoStreamErrorFailure: 1, - LocalVideoStreamError.localVideoStreamErrorDeviceNoPermission: 2, - LocalVideoStreamError.localVideoStreamErrorDeviceBusy: 3, - LocalVideoStreamError.localVideoStreamErrorCaptureFailure: 4, - LocalVideoStreamError.localVideoStreamErrorEncodeFailure: 5, - LocalVideoStreamError.localVideoStreamErrorCaptureInbackground: 6, - LocalVideoStreamError.localVideoStreamErrorCaptureMultipleForegroundApps: 7, - LocalVideoStreamError.localVideoStreamErrorDeviceNotFound: 8, - LocalVideoStreamError.localVideoStreamErrorDeviceDisconnected: 9, - LocalVideoStreamError.localVideoStreamErrorDeviceInvalidId: 10, - LocalVideoStreamError.localVideoStreamErrorDeviceSystemPressure: 101, - LocalVideoStreamError.localVideoStreamErrorScreenCaptureWindowMinimized: 11, - LocalVideoStreamError.localVideoStreamErrorScreenCaptureWindowClosed: 12, - LocalVideoStreamError.localVideoStreamErrorScreenCaptureWindowOccluded: 13, - LocalVideoStreamError.localVideoStreamErrorScreenCaptureWindowNotSupported: - 20, - LocalVideoStreamError.localVideoStreamErrorScreenCaptureFailure: 21, - LocalVideoStreamError.localVideoStreamErrorScreenCaptureNoPermission: 22, -}; - -RtcEngineEventHandlerOnRemoteVideoStateChangedJson - _$RtcEngineEventHandlerOnRemoteVideoStateChangedJsonFromJson( +MediaPlayerSourceObserverOnPlayerEventJson + _$MediaPlayerSourceObserverOnPlayerEventJsonFromJson( Map json) => - RtcEngineEventHandlerOnRemoteVideoStateChangedJson( - connection: json['connection'] == null - ? null - : RtcConnection.fromJson( - json['connection'] as Map), - remoteUid: json['remoteUid'] as int?, - state: $enumDecodeNullable(_$RemoteVideoStateEnumMap, json['state']), - reason: $enumDecodeNullable( - _$RemoteVideoStateReasonEnumMap, json['reason']), - elapsed: json['elapsed'] as int?, + MediaPlayerSourceObserverOnPlayerEventJson( + eventCode: + $enumDecodeNullable(_$MediaPlayerEventEnumMap, json['eventCode']), + elapsedTime: json['elapsedTime'] as int?, + message: json['message'] as String?, ); -Map _$RtcEngineEventHandlerOnRemoteVideoStateChangedJsonToJson( - RtcEngineEventHandlerOnRemoteVideoStateChangedJson instance) => +Map _$MediaPlayerSourceObserverOnPlayerEventJsonToJson( + MediaPlayerSourceObserverOnPlayerEventJson instance) => { - 'connection': instance.connection?.toJson(), - 'remoteUid': instance.remoteUid, - 'state': _$RemoteVideoStateEnumMap[instance.state], - 'reason': _$RemoteVideoStateReasonEnumMap[instance.reason], - 'elapsed': instance.elapsed, + 'eventCode': _$MediaPlayerEventEnumMap[instance.eventCode], + 'elapsedTime': instance.elapsedTime, + 'message': instance.message, }; -const _$RemoteVideoStateEnumMap = { - RemoteVideoState.remoteVideoStateStopped: 0, - RemoteVideoState.remoteVideoStateStarting: 1, - RemoteVideoState.remoteVideoStateDecoding: 2, - RemoteVideoState.remoteVideoStateFrozen: 3, - RemoteVideoState.remoteVideoStateFailed: 4, -}; - -const _$RemoteVideoStateReasonEnumMap = { - RemoteVideoStateReason.remoteVideoStateReasonInternal: 0, - RemoteVideoStateReason.remoteVideoStateReasonNetworkCongestion: 1, - RemoteVideoStateReason.remoteVideoStateReasonNetworkRecovery: 2, - RemoteVideoStateReason.remoteVideoStateReasonLocalMuted: 3, - RemoteVideoStateReason.remoteVideoStateReasonLocalUnmuted: 4, - RemoteVideoStateReason.remoteVideoStateReasonRemoteMuted: 5, - RemoteVideoStateReason.remoteVideoStateReasonRemoteUnmuted: 6, - RemoteVideoStateReason.remoteVideoStateReasonRemoteOffline: 7, - RemoteVideoStateReason.remoteVideoStateReasonAudioFallback: 8, - RemoteVideoStateReason.remoteVideoStateReasonAudioFallbackRecovery: 9, - RemoteVideoStateReason.remoteVideoStateReasonVideoStreamTypeChangeToLow: 10, - RemoteVideoStateReason.remoteVideoStateReasonVideoStreamTypeChangeToHigh: 11, - RemoteVideoStateReason.remoteVideoStateReasonSdkInBackground: 12, - RemoteVideoStateReason.remoteVideoStateReasonCodecNotSupport: 13, +const _$MediaPlayerEventEnumMap = { + MediaPlayerEvent.playerEventSeekBegin: 0, + MediaPlayerEvent.playerEventSeekComplete: 1, + MediaPlayerEvent.playerEventSeekError: 2, + MediaPlayerEvent.playerEventAudioTrackChanged: 5, + MediaPlayerEvent.playerEventBufferLow: 6, + MediaPlayerEvent.playerEventBufferRecover: 7, + MediaPlayerEvent.playerEventFreezeStart: 8, + MediaPlayerEvent.playerEventFreezeStop: 9, + MediaPlayerEvent.playerEventSwitchBegin: 10, + MediaPlayerEvent.playerEventSwitchComplete: 11, + MediaPlayerEvent.playerEventSwitchError: 12, + MediaPlayerEvent.playerEventFirstDisplayed: 13, + MediaPlayerEvent.playerEventReachCacheFileMaxCount: 14, + MediaPlayerEvent.playerEventReachCacheFileMaxSize: 15, + MediaPlayerEvent.playerEventTryOpenStart: 16, + MediaPlayerEvent.playerEventTryOpenSucceed: 17, + MediaPlayerEvent.playerEventTryOpenFailed: 18, }; -RtcEngineEventHandlerOnFirstRemoteVideoFrameJson - _$RtcEngineEventHandlerOnFirstRemoteVideoFrameJsonFromJson( +MediaPlayerSourceObserverOnMetaDataJson + _$MediaPlayerSourceObserverOnMetaDataJsonFromJson( Map json) => - RtcEngineEventHandlerOnFirstRemoteVideoFrameJson( - connection: json['connection'] == null - ? null - : RtcConnection.fromJson( - json['connection'] as Map), - remoteUid: json['remoteUid'] as int?, - width: json['width'] as int?, - height: json['height'] as int?, - elapsed: json['elapsed'] as int?, + MediaPlayerSourceObserverOnMetaDataJson( + length: json['length'] as int?, ); -Map _$RtcEngineEventHandlerOnFirstRemoteVideoFrameJsonToJson( - RtcEngineEventHandlerOnFirstRemoteVideoFrameJson instance) => +Map _$MediaPlayerSourceObserverOnMetaDataJsonToJson( + MediaPlayerSourceObserverOnMetaDataJson instance) => { - 'connection': instance.connection?.toJson(), - 'remoteUid': instance.remoteUid, - 'width': instance.width, - 'height': instance.height, - 'elapsed': instance.elapsed, + 'length': instance.length, }; -RtcEngineEventHandlerOnUserJoinedJson - _$RtcEngineEventHandlerOnUserJoinedJsonFromJson( +MediaPlayerSourceObserverOnPlayBufferUpdatedJson + _$MediaPlayerSourceObserverOnPlayBufferUpdatedJsonFromJson( Map json) => - RtcEngineEventHandlerOnUserJoinedJson( - connection: json['connection'] == null - ? null - : RtcConnection.fromJson( - json['connection'] as Map), - remoteUid: json['remoteUid'] as int?, - elapsed: json['elapsed'] as int?, + MediaPlayerSourceObserverOnPlayBufferUpdatedJson( + playCachedBuffer: json['playCachedBuffer'] as int?, ); -Map _$RtcEngineEventHandlerOnUserJoinedJsonToJson( - RtcEngineEventHandlerOnUserJoinedJson instance) => +Map _$MediaPlayerSourceObserverOnPlayBufferUpdatedJsonToJson( + MediaPlayerSourceObserverOnPlayBufferUpdatedJson instance) => { - 'connection': instance.connection?.toJson(), - 'remoteUid': instance.remoteUid, - 'elapsed': instance.elapsed, + 'playCachedBuffer': instance.playCachedBuffer, }; -RtcEngineEventHandlerOnUserOfflineJson - _$RtcEngineEventHandlerOnUserOfflineJsonFromJson( +MediaPlayerSourceObserverOnPreloadEventJson + _$MediaPlayerSourceObserverOnPreloadEventJsonFromJson( Map json) => - RtcEngineEventHandlerOnUserOfflineJson( - connection: json['connection'] == null - ? null - : RtcConnection.fromJson( - json['connection'] as Map), - remoteUid: json['remoteUid'] as int?, - reason: $enumDecodeNullable( - _$UserOfflineReasonTypeEnumMap, json['reason']), + MediaPlayerSourceObserverOnPreloadEventJson( + src: json['src'] as String?, + event: + $enumDecodeNullable(_$PlayerPreloadEventEnumMap, json['event']), ); -Map _$RtcEngineEventHandlerOnUserOfflineJsonToJson( - RtcEngineEventHandlerOnUserOfflineJson instance) => +Map _$MediaPlayerSourceObserverOnPreloadEventJsonToJson( + MediaPlayerSourceObserverOnPreloadEventJson instance) => { - 'connection': instance.connection?.toJson(), - 'remoteUid': instance.remoteUid, - 'reason': _$UserOfflineReasonTypeEnumMap[instance.reason], + 'src': instance.src, + 'event': _$PlayerPreloadEventEnumMap[instance.event], }; -const _$UserOfflineReasonTypeEnumMap = { - UserOfflineReasonType.userOfflineQuit: 0, - UserOfflineReasonType.userOfflineDropped: 1, - UserOfflineReasonType.userOfflineBecomeAudience: 2, +const _$PlayerPreloadEventEnumMap = { + PlayerPreloadEvent.playerPreloadEventBegin: 0, + PlayerPreloadEvent.playerPreloadEventComplete: 1, + PlayerPreloadEvent.playerPreloadEventError: 2, }; -RtcEngineEventHandlerOnUserMuteAudioJson - _$RtcEngineEventHandlerOnUserMuteAudioJsonFromJson( +MediaPlayerSourceObserverOnCompletedJson + _$MediaPlayerSourceObserverOnCompletedJsonFromJson( Map json) => - RtcEngineEventHandlerOnUserMuteAudioJson( - connection: json['connection'] == null + MediaPlayerSourceObserverOnCompletedJson(); + +Map _$MediaPlayerSourceObserverOnCompletedJsonToJson( + MediaPlayerSourceObserverOnCompletedJson instance) => + {}; + +MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJson + _$MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJsonFromJson( + Map json) => + MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJson(); + +Map + _$MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJsonToJson( + MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJson instance) => + {}; + +MediaPlayerSourceObserverOnPlayerSrcInfoChangedJson + _$MediaPlayerSourceObserverOnPlayerSrcInfoChangedJsonFromJson( + Map json) => + MediaPlayerSourceObserverOnPlayerSrcInfoChangedJson( + from: json['from'] == null ? null - : RtcConnection.fromJson( - json['connection'] as Map), - remoteUid: json['remoteUid'] as int?, - muted: json['muted'] as bool?, + : SrcInfo.fromJson(json['from'] as Map), + to: json['to'] == null + ? null + : SrcInfo.fromJson(json['to'] as Map), ); -Map _$RtcEngineEventHandlerOnUserMuteAudioJsonToJson( - RtcEngineEventHandlerOnUserMuteAudioJson instance) => - { - 'connection': instance.connection?.toJson(), - 'remoteUid': instance.remoteUid, - 'muted': instance.muted, - }; +Map + _$MediaPlayerSourceObserverOnPlayerSrcInfoChangedJsonToJson( + MediaPlayerSourceObserverOnPlayerSrcInfoChangedJson instance) => + { + 'from': instance.from?.toJson(), + 'to': instance.to?.toJson(), + }; -RtcEngineEventHandlerOnUserMuteVideoJson - _$RtcEngineEventHandlerOnUserMuteVideoJsonFromJson( +MediaPlayerSourceObserverOnPlayerInfoUpdatedJson + _$MediaPlayerSourceObserverOnPlayerInfoUpdatedJsonFromJson( Map json) => - RtcEngineEventHandlerOnUserMuteVideoJson( - connection: json['connection'] == null + MediaPlayerSourceObserverOnPlayerInfoUpdatedJson( + info: json['info'] == null ? null - : RtcConnection.fromJson( - json['connection'] as Map), - remoteUid: json['remoteUid'] as int?, - muted: json['muted'] as bool?, + : PlayerUpdatedInfo.fromJson( + json['info'] as Map), ); -Map _$RtcEngineEventHandlerOnUserMuteVideoJsonToJson( - RtcEngineEventHandlerOnUserMuteVideoJson instance) => +Map _$MediaPlayerSourceObserverOnPlayerInfoUpdatedJsonToJson( + MediaPlayerSourceObserverOnPlayerInfoUpdatedJson instance) => { - 'connection': instance.connection?.toJson(), - 'remoteUid': instance.remoteUid, - 'muted': instance.muted, + 'info': instance.info?.toJson(), }; -RtcEngineEventHandlerOnUserEnableVideoJson - _$RtcEngineEventHandlerOnUserEnableVideoJsonFromJson( +MediaPlayerSourceObserverOnAudioVolumeIndicationJson + _$MediaPlayerSourceObserverOnAudioVolumeIndicationJsonFromJson( Map json) => - RtcEngineEventHandlerOnUserEnableVideoJson( - connection: json['connection'] == null - ? null - : RtcConnection.fromJson( - json['connection'] as Map), - remoteUid: json['remoteUid'] as int?, - enabled: json['enabled'] as bool?, + MediaPlayerSourceObserverOnAudioVolumeIndicationJson( + volume: json['volume'] as int?, ); -Map _$RtcEngineEventHandlerOnUserEnableVideoJsonToJson( - RtcEngineEventHandlerOnUserEnableVideoJson instance) => - { - 'connection': instance.connection?.toJson(), - 'remoteUid': instance.remoteUid, - 'enabled': instance.enabled, - }; +Map + _$MediaPlayerSourceObserverOnAudioVolumeIndicationJsonToJson( + MediaPlayerSourceObserverOnAudioVolumeIndicationJson instance) => + { + 'volume': instance.volume, + }; -RtcEngineEventHandlerOnUserStateChangedJson - _$RtcEngineEventHandlerOnUserStateChangedJsonFromJson( +MusicContentCenterEventHandlerOnMusicChartsResultJson + _$MusicContentCenterEventHandlerOnMusicChartsResultJsonFromJson( Map json) => - RtcEngineEventHandlerOnUserStateChangedJson( - connection: json['connection'] == null - ? null - : RtcConnection.fromJson( - json['connection'] as Map), - remoteUid: json['remoteUid'] as int?, - state: json['state'] as int?, + MusicContentCenterEventHandlerOnMusicChartsResultJson( + requestId: json['requestId'] as String?, + result: (json['result'] as List?) + ?.map((e) => MusicChartInfo.fromJson(e as Map)) + .toList(), + errorCode: $enumDecodeNullable( + _$MusicContentCenterStatusCodeEnumMap, json['errorCode']), ); -Map _$RtcEngineEventHandlerOnUserStateChangedJsonToJson( - RtcEngineEventHandlerOnUserStateChangedJson instance) => - { - 'connection': instance.connection?.toJson(), - 'remoteUid': instance.remoteUid, - 'state': instance.state, - }; +Map + _$MusicContentCenterEventHandlerOnMusicChartsResultJsonToJson( + MusicContentCenterEventHandlerOnMusicChartsResultJson instance) => + { + 'requestId': instance.requestId, + 'result': instance.result?.map((e) => e.toJson()).toList(), + 'errorCode': + _$MusicContentCenterStatusCodeEnumMap[instance.errorCode], + }; -RtcEngineEventHandlerOnUserEnableLocalVideoJson - _$RtcEngineEventHandlerOnUserEnableLocalVideoJsonFromJson( +const _$MusicContentCenterStatusCodeEnumMap = { + MusicContentCenterStatusCode.kMusicContentCenterStatusOk: 0, + MusicContentCenterStatusCode.kMusicContentCenterStatusErr: 1, + MusicContentCenterStatusCode.kMusicContentCenterStatusErrGateway: 2, + MusicContentCenterStatusCode + .kMusicContentCenterStatusErrPermissionAndResource: 3, + MusicContentCenterStatusCode.kMusicContentCenterStatusErrInternalDataParse: 4, + MusicContentCenterStatusCode.kMusicContentCenterStatusErrMusicLoading: 5, + MusicContentCenterStatusCode.kMusicContentCenterStatusErrMusicDecryption: 6, + MusicContentCenterStatusCode.kMusicContentCenterStatusErrHttpInternalError: 7, +}; + +MusicContentCenterEventHandlerOnMusicCollectionResultJson + _$MusicContentCenterEventHandlerOnMusicCollectionResultJsonFromJson( Map json) => - RtcEngineEventHandlerOnUserEnableLocalVideoJson( - connection: json['connection'] == null - ? null - : RtcConnection.fromJson( - json['connection'] as Map), - remoteUid: json['remoteUid'] as int?, - enabled: json['enabled'] as bool?, + MusicContentCenterEventHandlerOnMusicCollectionResultJson( + requestId: json['requestId'] as String?, + errorCode: $enumDecodeNullable( + _$MusicContentCenterStatusCodeEnumMap, json['errorCode']), ); -Map _$RtcEngineEventHandlerOnUserEnableLocalVideoJsonToJson( - RtcEngineEventHandlerOnUserEnableLocalVideoJson instance) => +Map _$MusicContentCenterEventHandlerOnMusicCollectionResultJsonToJson( + MusicContentCenterEventHandlerOnMusicCollectionResultJson instance) => { - 'connection': instance.connection?.toJson(), - 'remoteUid': instance.remoteUid, - 'enabled': instance.enabled, + 'requestId': instance.requestId, + 'errorCode': _$MusicContentCenterStatusCodeEnumMap[instance.errorCode], }; -RtcEngineEventHandlerOnLocalAudioStatsJson - _$RtcEngineEventHandlerOnLocalAudioStatsJsonFromJson( +MusicContentCenterEventHandlerOnLyricResultJson + _$MusicContentCenterEventHandlerOnLyricResultJsonFromJson( Map json) => - RtcEngineEventHandlerOnLocalAudioStatsJson( - connection: json['connection'] == null - ? null - : RtcConnection.fromJson( - json['connection'] as Map), - stats: json['stats'] == null - ? null - : LocalAudioStats.fromJson(json['stats'] as Map), + MusicContentCenterEventHandlerOnLyricResultJson( + requestId: json['requestId'] as String?, + songCode: json['songCode'] as int?, + lyricUrl: json['lyricUrl'] as String?, + errorCode: $enumDecodeNullable( + _$MusicContentCenterStatusCodeEnumMap, json['errorCode']), ); -Map _$RtcEngineEventHandlerOnLocalAudioStatsJsonToJson( - RtcEngineEventHandlerOnLocalAudioStatsJson instance) => +Map _$MusicContentCenterEventHandlerOnLyricResultJsonToJson( + MusicContentCenterEventHandlerOnLyricResultJson instance) => { - 'connection': instance.connection?.toJson(), - 'stats': instance.stats?.toJson(), + 'requestId': instance.requestId, + 'songCode': instance.songCode, + 'lyricUrl': instance.lyricUrl, + 'errorCode': _$MusicContentCenterStatusCodeEnumMap[instance.errorCode], }; -RtcEngineEventHandlerOnRemoteAudioStatsJson - _$RtcEngineEventHandlerOnRemoteAudioStatsJsonFromJson( +MusicContentCenterEventHandlerOnSongSimpleInfoResultJson + _$MusicContentCenterEventHandlerOnSongSimpleInfoResultJsonFromJson( Map json) => - RtcEngineEventHandlerOnRemoteAudioStatsJson( - connection: json['connection'] == null - ? null - : RtcConnection.fromJson( - json['connection'] as Map), - stats: json['stats'] == null - ? null - : RemoteAudioStats.fromJson( - json['stats'] as Map), + MusicContentCenterEventHandlerOnSongSimpleInfoResultJson( + requestId: json['requestId'] as String?, + songCode: json['songCode'] as int?, + simpleInfo: json['simpleInfo'] as String?, + errorCode: $enumDecodeNullable( + _$MusicContentCenterStatusCodeEnumMap, json['errorCode']), ); -Map _$RtcEngineEventHandlerOnRemoteAudioStatsJsonToJson( - RtcEngineEventHandlerOnRemoteAudioStatsJson instance) => +Map _$MusicContentCenterEventHandlerOnSongSimpleInfoResultJsonToJson( + MusicContentCenterEventHandlerOnSongSimpleInfoResultJson instance) => { - 'connection': instance.connection?.toJson(), - 'stats': instance.stats?.toJson(), + 'requestId': instance.requestId, + 'songCode': instance.songCode, + 'simpleInfo': instance.simpleInfo, + 'errorCode': _$MusicContentCenterStatusCodeEnumMap[instance.errorCode], }; -RtcEngineEventHandlerOnLocalVideoStatsJson - _$RtcEngineEventHandlerOnLocalVideoStatsJsonFromJson( +MusicContentCenterEventHandlerOnPreLoadEventJson + _$MusicContentCenterEventHandlerOnPreLoadEventJsonFromJson( Map json) => - RtcEngineEventHandlerOnLocalVideoStatsJson( - source: $enumDecodeNullable(_$VideoSourceTypeEnumMap, json['source']), - stats: json['stats'] == null - ? null - : LocalVideoStats.fromJson(json['stats'] as Map), + MusicContentCenterEventHandlerOnPreLoadEventJson( + requestId: json['requestId'] as String?, + songCode: json['songCode'] as int?, + percent: json['percent'] as int?, + lyricUrl: json['lyricUrl'] as String?, + status: + $enumDecodeNullable(_$PreloadStatusCodeEnumMap, json['status']), + errorCode: $enumDecodeNullable( + _$MusicContentCenterStatusCodeEnumMap, json['errorCode']), ); -Map _$RtcEngineEventHandlerOnLocalVideoStatsJsonToJson( - RtcEngineEventHandlerOnLocalVideoStatsJson instance) => +Map _$MusicContentCenterEventHandlerOnPreLoadEventJsonToJson( + MusicContentCenterEventHandlerOnPreLoadEventJson instance) => { - 'source': _$VideoSourceTypeEnumMap[instance.source], - 'stats': instance.stats?.toJson(), + 'requestId': instance.requestId, + 'songCode': instance.songCode, + 'percent': instance.percent, + 'lyricUrl': instance.lyricUrl, + 'status': _$PreloadStatusCodeEnumMap[instance.status], + 'errorCode': _$MusicContentCenterStatusCodeEnumMap[instance.errorCode], }; -RtcEngineEventHandlerOnRemoteVideoStatsJson - _$RtcEngineEventHandlerOnRemoteVideoStatsJsonFromJson( +const _$PreloadStatusCodeEnumMap = { + PreloadStatusCode.kPreloadStatusCompleted: 0, + PreloadStatusCode.kPreloadStatusFailed: 1, + PreloadStatusCode.kPreloadStatusPreloading: 2, + PreloadStatusCode.kPreloadStatusRemoved: 3, +}; + +RtcEngineEventHandlerOnJoinChannelSuccessJson + _$RtcEngineEventHandlerOnJoinChannelSuccessJsonFromJson( Map json) => - RtcEngineEventHandlerOnRemoteVideoStatsJson( + RtcEngineEventHandlerOnJoinChannelSuccessJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), - stats: json['stats'] == null - ? null - : RemoteVideoStats.fromJson( - json['stats'] as Map), + elapsed: json['elapsed'] as int?, ); -Map _$RtcEngineEventHandlerOnRemoteVideoStatsJsonToJson( - RtcEngineEventHandlerOnRemoteVideoStatsJson instance) => +Map _$RtcEngineEventHandlerOnJoinChannelSuccessJsonToJson( + RtcEngineEventHandlerOnJoinChannelSuccessJson instance) => { 'connection': instance.connection?.toJson(), - 'stats': instance.stats?.toJson(), + 'elapsed': instance.elapsed, }; -RtcEngineEventHandlerOnCameraReadyJson - _$RtcEngineEventHandlerOnCameraReadyJsonFromJson( - Map json) => - RtcEngineEventHandlerOnCameraReadyJson(); - -Map _$RtcEngineEventHandlerOnCameraReadyJsonToJson( - RtcEngineEventHandlerOnCameraReadyJson instance) => - {}; - -RtcEngineEventHandlerOnCameraFocusAreaChangedJson - _$RtcEngineEventHandlerOnCameraFocusAreaChangedJsonFromJson( +RtcEngineEventHandlerOnRejoinChannelSuccessJson + _$RtcEngineEventHandlerOnRejoinChannelSuccessJsonFromJson( Map json) => - RtcEngineEventHandlerOnCameraFocusAreaChangedJson( - x: json['x'] as int?, - y: json['y'] as int?, - width: json['width'] as int?, - height: json['height'] as int?, + RtcEngineEventHandlerOnRejoinChannelSuccessJson( + connection: json['connection'] == null + ? null + : RtcConnection.fromJson( + json['connection'] as Map), + elapsed: json['elapsed'] as int?, ); -Map _$RtcEngineEventHandlerOnCameraFocusAreaChangedJsonToJson( - RtcEngineEventHandlerOnCameraFocusAreaChangedJson instance) => +Map _$RtcEngineEventHandlerOnRejoinChannelSuccessJsonToJson( + RtcEngineEventHandlerOnRejoinChannelSuccessJson instance) => { - 'x': instance.x, - 'y': instance.y, - 'width': instance.width, - 'height': instance.height, + 'connection': instance.connection?.toJson(), + 'elapsed': instance.elapsed, }; -RtcEngineEventHandlerOnCameraExposureAreaChangedJson - _$RtcEngineEventHandlerOnCameraExposureAreaChangedJsonFromJson( +RtcEngineEventHandlerOnProxyConnectedJson + _$RtcEngineEventHandlerOnProxyConnectedJsonFromJson( Map json) => - RtcEngineEventHandlerOnCameraExposureAreaChangedJson( - x: json['x'] as int?, - y: json['y'] as int?, - width: json['width'] as int?, - height: json['height'] as int?, + RtcEngineEventHandlerOnProxyConnectedJson( + channel: json['channel'] as String?, + uid: json['uid'] as int?, + proxyType: $enumDecodeNullable(_$ProxyTypeEnumMap, json['proxyType']), + localProxyIp: json['localProxyIp'] as String?, + elapsed: json['elapsed'] as int?, ); -Map - _$RtcEngineEventHandlerOnCameraExposureAreaChangedJsonToJson( - RtcEngineEventHandlerOnCameraExposureAreaChangedJson instance) => - { - 'x': instance.x, - 'y': instance.y, - 'width': instance.width, - 'height': instance.height, - }; - -RtcEngineEventHandlerOnFacePositionChangedJson - _$RtcEngineEventHandlerOnFacePositionChangedJsonFromJson( - Map json) => - RtcEngineEventHandlerOnFacePositionChangedJson( - imageWidth: json['imageWidth'] as int?, - imageHeight: json['imageHeight'] as int?, - vecRectangle: (json['vecRectangle'] as List?) - ?.map((e) => Rectangle.fromJson(e as Map)) - .toList(), - vecDistance: (json['vecDistance'] as List?) - ?.map((e) => e as int) - .toList(), - numFaces: json['numFaces'] as int?, - ); - -Map _$RtcEngineEventHandlerOnFacePositionChangedJsonToJson( - RtcEngineEventHandlerOnFacePositionChangedJson instance) => +Map _$RtcEngineEventHandlerOnProxyConnectedJsonToJson( + RtcEngineEventHandlerOnProxyConnectedJson instance) => { - 'imageWidth': instance.imageWidth, - 'imageHeight': instance.imageHeight, - 'vecRectangle': instance.vecRectangle?.map((e) => e.toJson()).toList(), - 'vecDistance': instance.vecDistance, - 'numFaces': instance.numFaces, + 'channel': instance.channel, + 'uid': instance.uid, + 'proxyType': _$ProxyTypeEnumMap[instance.proxyType], + 'localProxyIp': instance.localProxyIp, + 'elapsed': instance.elapsed, }; -RtcEngineEventHandlerOnVideoStoppedJson - _$RtcEngineEventHandlerOnVideoStoppedJsonFromJson( - Map json) => - RtcEngineEventHandlerOnVideoStoppedJson(); - -Map _$RtcEngineEventHandlerOnVideoStoppedJsonToJson( - RtcEngineEventHandlerOnVideoStoppedJson instance) => - {}; +const _$ProxyTypeEnumMap = { + ProxyType.noneProxyType: 0, + ProxyType.udpProxyType: 1, + ProxyType.tcpProxyType: 2, + ProxyType.localProxyType: 3, + ProxyType.tcpProxyAutoFallbackType: 4, + ProxyType.httpProxyType: 5, + ProxyType.httpsProxyType: 6, +}; -RtcEngineEventHandlerOnAudioMixingStateChangedJson - _$RtcEngineEventHandlerOnAudioMixingStateChangedJsonFromJson( - Map json) => - RtcEngineEventHandlerOnAudioMixingStateChangedJson( - state: - $enumDecodeNullable(_$AudioMixingStateTypeEnumMap, json['state']), - reason: $enumDecodeNullable( - _$AudioMixingReasonTypeEnumMap, json['reason']), - ); +RtcEngineEventHandlerOnErrorJson _$RtcEngineEventHandlerOnErrorJsonFromJson( + Map json) => + RtcEngineEventHandlerOnErrorJson( + err: $enumDecodeNullable(_$ErrorCodeTypeEnumMap, json['err']), + msg: json['msg'] as String?, + ); -Map _$RtcEngineEventHandlerOnAudioMixingStateChangedJsonToJson( - RtcEngineEventHandlerOnAudioMixingStateChangedJson instance) => +Map _$RtcEngineEventHandlerOnErrorJsonToJson( + RtcEngineEventHandlerOnErrorJson instance) => { - 'state': _$AudioMixingStateTypeEnumMap[instance.state], - 'reason': _$AudioMixingReasonTypeEnumMap[instance.reason], + 'err': _$ErrorCodeTypeEnumMap[instance.err], + 'msg': instance.msg, }; -const _$AudioMixingStateTypeEnumMap = { - AudioMixingStateType.audioMixingStatePlaying: 710, - AudioMixingStateType.audioMixingStatePaused: 711, - AudioMixingStateType.audioMixingStateStopped: 713, - AudioMixingStateType.audioMixingStateFailed: 714, -}; - -const _$AudioMixingReasonTypeEnumMap = { - AudioMixingReasonType.audioMixingReasonCanNotOpen: 701, - AudioMixingReasonType.audioMixingReasonTooFrequentCall: 702, - AudioMixingReasonType.audioMixingReasonInterruptedEof: 703, - AudioMixingReasonType.audioMixingReasonOneLoopCompleted: 721, - AudioMixingReasonType.audioMixingReasonAllLoopsCompleted: 723, - AudioMixingReasonType.audioMixingReasonStoppedByUser: 724, - AudioMixingReasonType.audioMixingReasonOk: 0, +const _$ErrorCodeTypeEnumMap = { + ErrorCodeType.errOk: 0, + ErrorCodeType.errFailed: 1, + ErrorCodeType.errInvalidArgument: 2, + ErrorCodeType.errNotReady: 3, + ErrorCodeType.errNotSupported: 4, + ErrorCodeType.errRefused: 5, + ErrorCodeType.errBufferTooSmall: 6, + ErrorCodeType.errNotInitialized: 7, + ErrorCodeType.errInvalidState: 8, + ErrorCodeType.errNoPermission: 9, + ErrorCodeType.errTimedout: 10, + ErrorCodeType.errCanceled: 11, + ErrorCodeType.errTooOften: 12, + ErrorCodeType.errBindSocket: 13, + ErrorCodeType.errNetDown: 14, + ErrorCodeType.errJoinChannelRejected: 17, + ErrorCodeType.errLeaveChannelRejected: 18, + ErrorCodeType.errAlreadyInUse: 19, + ErrorCodeType.errAborted: 20, + ErrorCodeType.errInitNetEngine: 21, + ErrorCodeType.errResourceLimited: 22, + ErrorCodeType.errInvalidAppId: 101, + ErrorCodeType.errInvalidChannelName: 102, + ErrorCodeType.errNoServerResources: 103, + ErrorCodeType.errTokenExpired: 109, + ErrorCodeType.errInvalidToken: 110, + ErrorCodeType.errConnectionInterrupted: 111, + ErrorCodeType.errConnectionLost: 112, + ErrorCodeType.errNotInChannel: 113, + ErrorCodeType.errSizeTooLarge: 114, + ErrorCodeType.errBitrateLimit: 115, + ErrorCodeType.errTooManyDataStreams: 116, + ErrorCodeType.errStreamMessageTimeout: 117, + ErrorCodeType.errSetClientRoleNotAuthorized: 119, + ErrorCodeType.errDecryptionFailed: 120, + ErrorCodeType.errInvalidUserId: 121, + ErrorCodeType.errClientIsBannedByServer: 123, + ErrorCodeType.errEncryptedStreamNotAllowedPublish: 130, + ErrorCodeType.errLicenseCredentialInvalid: 131, + ErrorCodeType.errInvalidUserAccount: 134, + ErrorCodeType.errModuleNotFound: 157, + ErrorCodeType.errCertRaw: 157, + ErrorCodeType.errCertJsonPart: 158, + ErrorCodeType.errCertJsonInval: 159, + ErrorCodeType.errCertJsonNomem: 160, + ErrorCodeType.errCertCustom: 161, + ErrorCodeType.errCertCredential: 162, + ErrorCodeType.errCertSign: 163, + ErrorCodeType.errCertFail: 164, + ErrorCodeType.errCertBuf: 165, + ErrorCodeType.errCertNull: 166, + ErrorCodeType.errCertDuedate: 167, + ErrorCodeType.errCertRequest: 168, + ErrorCodeType.errPcmsendFormat: 200, + ErrorCodeType.errPcmsendBufferoverflow: 201, + ErrorCodeType.errLoginAlreadyLogin: 428, + ErrorCodeType.errLoadMediaEngine: 1001, + ErrorCodeType.errAdmGeneralError: 1005, + ErrorCodeType.errAdmInitPlayout: 1008, + ErrorCodeType.errAdmStartPlayout: 1009, + ErrorCodeType.errAdmStopPlayout: 1010, + ErrorCodeType.errAdmInitRecording: 1011, + ErrorCodeType.errAdmStartRecording: 1012, + ErrorCodeType.errAdmStopRecording: 1013, + ErrorCodeType.errVdmCameraNotAuthorized: 1501, + ErrorCodeType.errAdmApplicationLoopback: 2007, }; -RtcEngineEventHandlerOnRhythmPlayerStateChangedJson - _$RtcEngineEventHandlerOnRhythmPlayerStateChangedJsonFromJson( +RtcEngineEventHandlerOnAudioQualityJson + _$RtcEngineEventHandlerOnAudioQualityJsonFromJson( Map json) => - RtcEngineEventHandlerOnRhythmPlayerStateChangedJson( - state: $enumDecodeNullable( - _$RhythmPlayerStateTypeEnumMap, json['state']), - errorCode: $enumDecodeNullable( - _$RhythmPlayerErrorTypeEnumMap, json['errorCode']), + RtcEngineEventHandlerOnAudioQualityJson( + connection: json['connection'] == null + ? null + : RtcConnection.fromJson( + json['connection'] as Map), + remoteUid: json['remoteUid'] as int?, + quality: $enumDecodeNullable(_$QualityTypeEnumMap, json['quality']), + delay: json['delay'] as int?, + lost: json['lost'] as int?, ); -Map - _$RtcEngineEventHandlerOnRhythmPlayerStateChangedJsonToJson( - RtcEngineEventHandlerOnRhythmPlayerStateChangedJson instance) => - { - 'state': _$RhythmPlayerStateTypeEnumMap[instance.state], - 'errorCode': _$RhythmPlayerErrorTypeEnumMap[instance.errorCode], - }; - -const _$RhythmPlayerStateTypeEnumMap = { - RhythmPlayerStateType.rhythmPlayerStateIdle: 810, - RhythmPlayerStateType.rhythmPlayerStateOpening: 811, - RhythmPlayerStateType.rhythmPlayerStateDecoding: 812, - RhythmPlayerStateType.rhythmPlayerStatePlaying: 813, - RhythmPlayerStateType.rhythmPlayerStateFailed: 814, -}; +Map _$RtcEngineEventHandlerOnAudioQualityJsonToJson( + RtcEngineEventHandlerOnAudioQualityJson instance) => + { + 'connection': instance.connection?.toJson(), + 'remoteUid': instance.remoteUid, + 'quality': _$QualityTypeEnumMap[instance.quality], + 'delay': instance.delay, + 'lost': instance.lost, + }; -const _$RhythmPlayerErrorTypeEnumMap = { - RhythmPlayerErrorType.rhythmPlayerErrorOk: 0, - RhythmPlayerErrorType.rhythmPlayerErrorFailed: 1, - RhythmPlayerErrorType.rhythmPlayerErrorCanNotOpen: 801, - RhythmPlayerErrorType.rhythmPlayerErrorCanNotPlay: 802, - RhythmPlayerErrorType.rhythmPlayerErrorFileOverDurationLimit: 803, +const _$QualityTypeEnumMap = { + QualityType.qualityUnknown: 0, + QualityType.qualityExcellent: 1, + QualityType.qualityGood: 2, + QualityType.qualityPoor: 3, + QualityType.qualityBad: 4, + QualityType.qualityVbad: 5, + QualityType.qualityDown: 6, + QualityType.qualityUnsupported: 7, + QualityType.qualityDetecting: 8, }; -RtcEngineEventHandlerOnConnectionLostJson - _$RtcEngineEventHandlerOnConnectionLostJsonFromJson( +RtcEngineEventHandlerOnLastmileProbeResultJson + _$RtcEngineEventHandlerOnLastmileProbeResultJsonFromJson( Map json) => - RtcEngineEventHandlerOnConnectionLostJson( - connection: json['connection'] == null + RtcEngineEventHandlerOnLastmileProbeResultJson( + result: json['result'] == null ? null - : RtcConnection.fromJson( - json['connection'] as Map), + : LastmileProbeResult.fromJson( + json['result'] as Map), ); -Map _$RtcEngineEventHandlerOnConnectionLostJsonToJson( - RtcEngineEventHandlerOnConnectionLostJson instance) => +Map _$RtcEngineEventHandlerOnLastmileProbeResultJsonToJson( + RtcEngineEventHandlerOnLastmileProbeResultJson instance) => { - 'connection': instance.connection?.toJson(), + 'result': instance.result?.toJson(), }; -RtcEngineEventHandlerOnConnectionInterruptedJson - _$RtcEngineEventHandlerOnConnectionInterruptedJsonFromJson( +RtcEngineEventHandlerOnAudioVolumeIndicationJson + _$RtcEngineEventHandlerOnAudioVolumeIndicationJsonFromJson( Map json) => - RtcEngineEventHandlerOnConnectionInterruptedJson( + RtcEngineEventHandlerOnAudioVolumeIndicationJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), + speakers: (json['speakers'] as List?) + ?.map((e) => AudioVolumeInfo.fromJson(e as Map)) + .toList(), + speakerNumber: json['speakerNumber'] as int?, + totalVolume: json['totalVolume'] as int?, ); -Map _$RtcEngineEventHandlerOnConnectionInterruptedJsonToJson( - RtcEngineEventHandlerOnConnectionInterruptedJson instance) => +Map _$RtcEngineEventHandlerOnAudioVolumeIndicationJsonToJson( + RtcEngineEventHandlerOnAudioVolumeIndicationJson instance) => { 'connection': instance.connection?.toJson(), + 'speakers': instance.speakers?.map((e) => e.toJson()).toList(), + 'speakerNumber': instance.speakerNumber, + 'totalVolume': instance.totalVolume, }; -RtcEngineEventHandlerOnConnectionBannedJson - _$RtcEngineEventHandlerOnConnectionBannedJsonFromJson( +RtcEngineEventHandlerOnLeaveChannelJson + _$RtcEngineEventHandlerOnLeaveChannelJsonFromJson( Map json) => - RtcEngineEventHandlerOnConnectionBannedJson( + RtcEngineEventHandlerOnLeaveChannelJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), + stats: json['stats'] == null + ? null + : RtcStats.fromJson(json['stats'] as Map), ); -Map _$RtcEngineEventHandlerOnConnectionBannedJsonToJson( - RtcEngineEventHandlerOnConnectionBannedJson instance) => +Map _$RtcEngineEventHandlerOnLeaveChannelJsonToJson( + RtcEngineEventHandlerOnLeaveChannelJson instance) => { 'connection': instance.connection?.toJson(), + 'stats': instance.stats?.toJson(), }; -RtcEngineEventHandlerOnStreamMessageJson - _$RtcEngineEventHandlerOnStreamMessageJsonFromJson( - Map json) => - RtcEngineEventHandlerOnStreamMessageJson( +RtcEngineEventHandlerOnRtcStatsJson + _$RtcEngineEventHandlerOnRtcStatsJsonFromJson(Map json) => + RtcEngineEventHandlerOnRtcStatsJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), - remoteUid: json['remoteUid'] as int?, - streamId: json['streamId'] as int?, - length: json['length'] as int?, - sentTs: json['sentTs'] as int?, + stats: json['stats'] == null + ? null + : RtcStats.fromJson(json['stats'] as Map), ); -Map _$RtcEngineEventHandlerOnStreamMessageJsonToJson( - RtcEngineEventHandlerOnStreamMessageJson instance) => +Map _$RtcEngineEventHandlerOnRtcStatsJsonToJson( + RtcEngineEventHandlerOnRtcStatsJson instance) => { 'connection': instance.connection?.toJson(), - 'remoteUid': instance.remoteUid, - 'streamId': instance.streamId, - 'length': instance.length, - 'sentTs': instance.sentTs, + 'stats': instance.stats?.toJson(), }; -RtcEngineEventHandlerOnStreamMessageErrorJson - _$RtcEngineEventHandlerOnStreamMessageErrorJsonFromJson( +RtcEngineEventHandlerOnAudioDeviceStateChangedJson + _$RtcEngineEventHandlerOnAudioDeviceStateChangedJsonFromJson( Map json) => - RtcEngineEventHandlerOnStreamMessageErrorJson( + RtcEngineEventHandlerOnAudioDeviceStateChangedJson( + deviceId: json['deviceId'] as String?, + deviceType: + $enumDecodeNullable(_$MediaDeviceTypeEnumMap, json['deviceType']), + deviceState: $enumDecodeNullable( + _$MediaDeviceStateTypeEnumMap, json['deviceState']), + ); + +Map _$RtcEngineEventHandlerOnAudioDeviceStateChangedJsonToJson( + RtcEngineEventHandlerOnAudioDeviceStateChangedJson instance) => + { + 'deviceId': instance.deviceId, + 'deviceType': _$MediaDeviceTypeEnumMap[instance.deviceType], + 'deviceState': _$MediaDeviceStateTypeEnumMap[instance.deviceState], + }; + +const _$MediaDeviceTypeEnumMap = { + MediaDeviceType.unknownAudioDevice: -1, + MediaDeviceType.audioPlayoutDevice: 0, + MediaDeviceType.audioRecordingDevice: 1, + MediaDeviceType.videoRenderDevice: 2, + MediaDeviceType.videoCaptureDevice: 3, + MediaDeviceType.audioApplicationPlayoutDevice: 4, + MediaDeviceType.audioVirtualPlayoutDevice: 5, + MediaDeviceType.audioVirtualRecordingDevice: 6, +}; + +const _$MediaDeviceStateTypeEnumMap = { + MediaDeviceStateType.mediaDeviceStateIdle: 0, + MediaDeviceStateType.mediaDeviceStateActive: 1, + MediaDeviceStateType.mediaDeviceStateDisabled: 2, + MediaDeviceStateType.mediaDeviceStateNotPresent: 4, + MediaDeviceStateType.mediaDeviceStateUnplugged: 8, +}; + +RtcEngineEventHandlerOnAudioMixingPositionChangedJson + _$RtcEngineEventHandlerOnAudioMixingPositionChangedJsonFromJson( + Map json) => + RtcEngineEventHandlerOnAudioMixingPositionChangedJson( + position: json['position'] as int?, + ); + +Map + _$RtcEngineEventHandlerOnAudioMixingPositionChangedJsonToJson( + RtcEngineEventHandlerOnAudioMixingPositionChangedJson instance) => + { + 'position': instance.position, + }; + +RtcEngineEventHandlerOnAudioMixingFinishedJson + _$RtcEngineEventHandlerOnAudioMixingFinishedJsonFromJson( + Map json) => + RtcEngineEventHandlerOnAudioMixingFinishedJson(); + +Map _$RtcEngineEventHandlerOnAudioMixingFinishedJsonToJson( + RtcEngineEventHandlerOnAudioMixingFinishedJson instance) => + {}; + +RtcEngineEventHandlerOnAudioEffectFinishedJson + _$RtcEngineEventHandlerOnAudioEffectFinishedJsonFromJson( + Map json) => + RtcEngineEventHandlerOnAudioEffectFinishedJson( + soundId: json['soundId'] as int?, + ); + +Map _$RtcEngineEventHandlerOnAudioEffectFinishedJsonToJson( + RtcEngineEventHandlerOnAudioEffectFinishedJson instance) => + { + 'soundId': instance.soundId, + }; + +RtcEngineEventHandlerOnVideoDeviceStateChangedJson + _$RtcEngineEventHandlerOnVideoDeviceStateChangedJsonFromJson( + Map json) => + RtcEngineEventHandlerOnVideoDeviceStateChangedJson( + deviceId: json['deviceId'] as String?, + deviceType: + $enumDecodeNullable(_$MediaDeviceTypeEnumMap, json['deviceType']), + deviceState: $enumDecodeNullable( + _$MediaDeviceStateTypeEnumMap, json['deviceState']), + ); + +Map _$RtcEngineEventHandlerOnVideoDeviceStateChangedJsonToJson( + RtcEngineEventHandlerOnVideoDeviceStateChangedJson instance) => + { + 'deviceId': instance.deviceId, + 'deviceType': _$MediaDeviceTypeEnumMap[instance.deviceType], + 'deviceState': _$MediaDeviceStateTypeEnumMap[instance.deviceState], + }; + +RtcEngineEventHandlerOnNetworkQualityJson + _$RtcEngineEventHandlerOnNetworkQualityJsonFromJson( + Map json) => + RtcEngineEventHandlerOnNetworkQualityJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), remoteUid: json['remoteUid'] as int?, - streamId: json['streamId'] as int?, - code: $enumDecodeNullable(_$ErrorCodeTypeEnumMap, json['code']), - missed: json['missed'] as int?, - cached: json['cached'] as int?, + txQuality: + $enumDecodeNullable(_$QualityTypeEnumMap, json['txQuality']), + rxQuality: + $enumDecodeNullable(_$QualityTypeEnumMap, json['rxQuality']), ); -Map _$RtcEngineEventHandlerOnStreamMessageErrorJsonToJson( - RtcEngineEventHandlerOnStreamMessageErrorJson instance) => +Map _$RtcEngineEventHandlerOnNetworkQualityJsonToJson( + RtcEngineEventHandlerOnNetworkQualityJson instance) => { 'connection': instance.connection?.toJson(), 'remoteUid': instance.remoteUid, - 'streamId': instance.streamId, - 'code': _$ErrorCodeTypeEnumMap[instance.code], - 'missed': instance.missed, - 'cached': instance.cached, + 'txQuality': _$QualityTypeEnumMap[instance.txQuality], + 'rxQuality': _$QualityTypeEnumMap[instance.rxQuality], }; -RtcEngineEventHandlerOnRequestTokenJson - _$RtcEngineEventHandlerOnRequestTokenJsonFromJson( +RtcEngineEventHandlerOnIntraRequestReceivedJson + _$RtcEngineEventHandlerOnIntraRequestReceivedJsonFromJson( Map json) => - RtcEngineEventHandlerOnRequestTokenJson( + RtcEngineEventHandlerOnIntraRequestReceivedJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), ); -Map _$RtcEngineEventHandlerOnRequestTokenJsonToJson( - RtcEngineEventHandlerOnRequestTokenJson instance) => +Map _$RtcEngineEventHandlerOnIntraRequestReceivedJsonToJson( + RtcEngineEventHandlerOnIntraRequestReceivedJson instance) => { 'connection': instance.connection?.toJson(), }; -RtcEngineEventHandlerOnTokenPrivilegeWillExpireJson - _$RtcEngineEventHandlerOnTokenPrivilegeWillExpireJsonFromJson( +RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJson + _$RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJsonFromJson( Map json) => - RtcEngineEventHandlerOnTokenPrivilegeWillExpireJson( - connection: json['connection'] == null + RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJson( + info: json['info'] == null ? null - : RtcConnection.fromJson( - json['connection'] as Map), - token: json['token'] as String?, + : UplinkNetworkInfo.fromJson( + json['info'] as Map), ); Map - _$RtcEngineEventHandlerOnTokenPrivilegeWillExpireJsonToJson( - RtcEngineEventHandlerOnTokenPrivilegeWillExpireJson instance) => + _$RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJsonToJson( + RtcEngineEventHandlerOnUplinkNetworkInfoUpdatedJson instance) => { - 'connection': instance.connection?.toJson(), - 'token': instance.token, + 'info': instance.info?.toJson(), }; -RtcEngineEventHandlerOnLicenseValidationFailureJson - _$RtcEngineEventHandlerOnLicenseValidationFailureJsonFromJson( +RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJson + _$RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJsonFromJson( Map json) => - RtcEngineEventHandlerOnLicenseValidationFailureJson( - connection: json['connection'] == null + RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJson( + info: json['info'] == null ? null - : RtcConnection.fromJson( - json['connection'] as Map), - reason: - $enumDecodeNullable(_$LicenseErrorTypeEnumMap, json['reason']), + : DownlinkNetworkInfo.fromJson( + json['info'] as Map), ); Map - _$RtcEngineEventHandlerOnLicenseValidationFailureJsonToJson( - RtcEngineEventHandlerOnLicenseValidationFailureJson instance) => + _$RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJsonToJson( + RtcEngineEventHandlerOnDownlinkNetworkInfoUpdatedJson instance) => { - 'connection': instance.connection?.toJson(), - 'reason': _$LicenseErrorTypeEnumMap[instance.reason], + 'info': instance.info?.toJson(), }; -const _$LicenseErrorTypeEnumMap = { - LicenseErrorType.licenseErrInvalid: 1, - LicenseErrorType.licenseErrExpire: 2, - LicenseErrorType.licenseErrMinutesExceed: 3, - LicenseErrorType.licenseErrLimitedPeriod: 4, - LicenseErrorType.licenseErrDiffDevices: 5, - LicenseErrorType.licenseErrInternal: 99, -}; - -RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJson - _$RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJsonFromJson( +RtcEngineEventHandlerOnLastmileQualityJson + _$RtcEngineEventHandlerOnLastmileQualityJsonFromJson( Map json) => - RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJson( - connection: json['connection'] == null - ? null - : RtcConnection.fromJson( - json['connection'] as Map), - elapsed: json['elapsed'] as int?, + RtcEngineEventHandlerOnLastmileQualityJson( + quality: $enumDecodeNullable(_$QualityTypeEnumMap, json['quality']), ); -Map _$RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJsonToJson( - RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJson instance) => +Map _$RtcEngineEventHandlerOnLastmileQualityJsonToJson( + RtcEngineEventHandlerOnLastmileQualityJson instance) => { - 'connection': instance.connection?.toJson(), - 'elapsed': instance.elapsed, + 'quality': _$QualityTypeEnumMap[instance.quality], }; -RtcEngineEventHandlerOnFirstRemoteAudioFrameJson - _$RtcEngineEventHandlerOnFirstRemoteAudioFrameJsonFromJson( +RtcEngineEventHandlerOnFirstLocalVideoFrameJson + _$RtcEngineEventHandlerOnFirstLocalVideoFrameJsonFromJson( Map json) => - RtcEngineEventHandlerOnFirstRemoteAudioFrameJson( - connection: json['connection'] == null - ? null - : RtcConnection.fromJson( - json['connection'] as Map), - userId: json['userId'] as int?, + RtcEngineEventHandlerOnFirstLocalVideoFrameJson( + source: $enumDecodeNullable(_$VideoSourceTypeEnumMap, json['source']), + width: json['width'] as int?, + height: json['height'] as int?, elapsed: json['elapsed'] as int?, ); -Map _$RtcEngineEventHandlerOnFirstRemoteAudioFrameJsonToJson( - RtcEngineEventHandlerOnFirstRemoteAudioFrameJson instance) => +Map _$RtcEngineEventHandlerOnFirstLocalVideoFrameJsonToJson( + RtcEngineEventHandlerOnFirstLocalVideoFrameJson instance) => { - 'connection': instance.connection?.toJson(), - 'userId': instance.userId, + 'source': _$VideoSourceTypeEnumMap[instance.source], + 'width': instance.width, + 'height': instance.height, 'elapsed': instance.elapsed, }; -RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson - _$RtcEngineEventHandlerOnFirstRemoteAudioDecodedJsonFromJson( +RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJson + _$RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJsonFromJson( Map json) => - RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson( - connection: json['connection'] == null - ? null - : RtcConnection.fromJson( + RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJson( + source: $enumDecodeNullable(_$VideoSourceTypeEnumMap, json['source']), + elapsed: json['elapsed'] as int?, + ); + +Map _$RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJsonToJson( + RtcEngineEventHandlerOnFirstLocalVideoFramePublishedJson instance) => + { + 'source': _$VideoSourceTypeEnumMap[instance.source], + 'elapsed': instance.elapsed, + }; + +RtcEngineEventHandlerOnFirstRemoteVideoDecodedJson + _$RtcEngineEventHandlerOnFirstRemoteVideoDecodedJsonFromJson( + Map json) => + RtcEngineEventHandlerOnFirstRemoteVideoDecodedJson( + connection: json['connection'] == null + ? null + : RtcConnection.fromJson( json['connection'] as Map), - uid: json['uid'] as int?, + remoteUid: json['remoteUid'] as int?, + width: json['width'] as int?, + height: json['height'] as int?, elapsed: json['elapsed'] as int?, ); -Map _$RtcEngineEventHandlerOnFirstRemoteAudioDecodedJsonToJson( - RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson instance) => +Map _$RtcEngineEventHandlerOnFirstRemoteVideoDecodedJsonToJson( + RtcEngineEventHandlerOnFirstRemoteVideoDecodedJson instance) => { 'connection': instance.connection?.toJson(), - 'uid': instance.uid, + 'remoteUid': instance.remoteUid, + 'width': instance.width, + 'height': instance.height, 'elapsed': instance.elapsed, }; -RtcEngineEventHandlerOnLocalAudioStateChangedJson - _$RtcEngineEventHandlerOnLocalAudioStateChangedJsonFromJson( +RtcEngineEventHandlerOnVideoSizeChangedJson + _$RtcEngineEventHandlerOnVideoSizeChangedJsonFromJson( Map json) => - RtcEngineEventHandlerOnLocalAudioStateChangedJson( + RtcEngineEventHandlerOnVideoSizeChangedJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), + sourceType: + $enumDecodeNullable(_$VideoSourceTypeEnumMap, json['sourceType']), + uid: json['uid'] as int?, + width: json['width'] as int?, + height: json['height'] as int?, + rotation: json['rotation'] as int?, + ); + +Map _$RtcEngineEventHandlerOnVideoSizeChangedJsonToJson( + RtcEngineEventHandlerOnVideoSizeChangedJson instance) => + { + 'connection': instance.connection?.toJson(), + 'sourceType': _$VideoSourceTypeEnumMap[instance.sourceType], + 'uid': instance.uid, + 'width': instance.width, + 'height': instance.height, + 'rotation': instance.rotation, + }; + +RtcEngineEventHandlerOnLocalVideoStateChangedJson + _$RtcEngineEventHandlerOnLocalVideoStateChangedJsonFromJson( + Map json) => + RtcEngineEventHandlerOnLocalVideoStateChangedJson( + source: $enumDecodeNullable(_$VideoSourceTypeEnumMap, json['source']), state: $enumDecodeNullable( - _$LocalAudioStreamStateEnumMap, json['state']), + _$LocalVideoStreamStateEnumMap, json['state']), error: $enumDecodeNullable( - _$LocalAudioStreamErrorEnumMap, json['error']), + _$LocalVideoStreamErrorEnumMap, json['error']), ); -Map _$RtcEngineEventHandlerOnLocalAudioStateChangedJsonToJson( - RtcEngineEventHandlerOnLocalAudioStateChangedJson instance) => +Map _$RtcEngineEventHandlerOnLocalVideoStateChangedJsonToJson( + RtcEngineEventHandlerOnLocalVideoStateChangedJson instance) => { - 'connection': instance.connection?.toJson(), - 'state': _$LocalAudioStreamStateEnumMap[instance.state], - 'error': _$LocalAudioStreamErrorEnumMap[instance.error], + 'source': _$VideoSourceTypeEnumMap[instance.source], + 'state': _$LocalVideoStreamStateEnumMap[instance.state], + 'error': _$LocalVideoStreamErrorEnumMap[instance.error], }; -const _$LocalAudioStreamStateEnumMap = { - LocalAudioStreamState.localAudioStreamStateStopped: 0, - LocalAudioStreamState.localAudioStreamStateRecording: 1, - LocalAudioStreamState.localAudioStreamStateEncoding: 2, - LocalAudioStreamState.localAudioStreamStateFailed: 3, +const _$LocalVideoStreamStateEnumMap = { + LocalVideoStreamState.localVideoStreamStateStopped: 0, + LocalVideoStreamState.localVideoStreamStateCapturing: 1, + LocalVideoStreamState.localVideoStreamStateEncoding: 2, + LocalVideoStreamState.localVideoStreamStateFailed: 3, }; -const _$LocalAudioStreamErrorEnumMap = { - LocalAudioStreamError.localAudioStreamErrorOk: 0, - LocalAudioStreamError.localAudioStreamErrorFailure: 1, - LocalAudioStreamError.localAudioStreamErrorDeviceNoPermission: 2, - LocalAudioStreamError.localAudioStreamErrorDeviceBusy: 3, - LocalAudioStreamError.localAudioStreamErrorRecordFailure: 4, - LocalAudioStreamError.localAudioStreamErrorEncodeFailure: 5, - LocalAudioStreamError.localAudioStreamErrorNoRecordingDevice: 6, - LocalAudioStreamError.localAudioStreamErrorNoPlayoutDevice: 7, - LocalAudioStreamError.localAudioStreamErrorInterrupted: 8, - LocalAudioStreamError.localAudioStreamErrorRecordInvalidId: 9, - LocalAudioStreamError.localAudioStreamErrorPlayoutInvalidId: 10, +const _$LocalVideoStreamErrorEnumMap = { + LocalVideoStreamError.localVideoStreamErrorOk: 0, + LocalVideoStreamError.localVideoStreamErrorFailure: 1, + LocalVideoStreamError.localVideoStreamErrorDeviceNoPermission: 2, + LocalVideoStreamError.localVideoStreamErrorDeviceBusy: 3, + LocalVideoStreamError.localVideoStreamErrorCaptureFailure: 4, + LocalVideoStreamError.localVideoStreamErrorEncodeFailure: 5, + LocalVideoStreamError.localVideoStreamErrorCaptureInbackground: 6, + LocalVideoStreamError.localVideoStreamErrorCaptureMultipleForegroundApps: 7, + LocalVideoStreamError.localVideoStreamErrorDeviceNotFound: 8, + LocalVideoStreamError.localVideoStreamErrorDeviceDisconnected: 9, + LocalVideoStreamError.localVideoStreamErrorDeviceInvalidId: 10, + LocalVideoStreamError.localVideoStreamErrorDeviceSystemPressure: 101, + LocalVideoStreamError.localVideoStreamErrorScreenCaptureWindowMinimized: 11, + LocalVideoStreamError.localVideoStreamErrorScreenCaptureWindowClosed: 12, + LocalVideoStreamError.localVideoStreamErrorScreenCaptureWindowOccluded: 13, + LocalVideoStreamError.localVideoStreamErrorScreenCaptureWindowNotSupported: + 20, + LocalVideoStreamError.localVideoStreamErrorScreenCaptureFailure: 21, + LocalVideoStreamError.localVideoStreamErrorScreenCaptureNoPermission: 22, + LocalVideoStreamError.localVideoStreamErrorScreenCapturePaused: 23, + LocalVideoStreamError.localVideoStreamErrorScreenCaptureResumed: 24, + LocalVideoStreamError.localVideoStreamErrorScreenCaptureWindowHidden: 25, + LocalVideoStreamError + .localVideoStreamErrorScreenCaptureWindowRecoverFromHidden: 26, + LocalVideoStreamError + .localVideoStreamErrorScreenCaptureWindowRecoverFromMinimized: 27, }; -RtcEngineEventHandlerOnRemoteAudioStateChangedJson - _$RtcEngineEventHandlerOnRemoteAudioStateChangedJsonFromJson( +RtcEngineEventHandlerOnRemoteVideoStateChangedJson + _$RtcEngineEventHandlerOnRemoteVideoStateChangedJsonFromJson( Map json) => - RtcEngineEventHandlerOnRemoteAudioStateChangedJson( + RtcEngineEventHandlerOnRemoteVideoStateChangedJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), remoteUid: json['remoteUid'] as int?, - state: $enumDecodeNullable(_$RemoteAudioStateEnumMap, json['state']), + state: $enumDecodeNullable(_$RemoteVideoStateEnumMap, json['state']), reason: $enumDecodeNullable( - _$RemoteAudioStateReasonEnumMap, json['reason']), + _$RemoteVideoStateReasonEnumMap, json['reason']), elapsed: json['elapsed'] as int?, ); -Map _$RtcEngineEventHandlerOnRemoteAudioStateChangedJsonToJson( - RtcEngineEventHandlerOnRemoteAudioStateChangedJson instance) => +Map _$RtcEngineEventHandlerOnRemoteVideoStateChangedJsonToJson( + RtcEngineEventHandlerOnRemoteVideoStateChangedJson instance) => { 'connection': instance.connection?.toJson(), 'remoteUid': instance.remoteUid, - 'state': _$RemoteAudioStateEnumMap[instance.state], - 'reason': _$RemoteAudioStateReasonEnumMap[instance.reason], + 'state': _$RemoteVideoStateEnumMap[instance.state], + 'reason': _$RemoteVideoStateReasonEnumMap[instance.reason], 'elapsed': instance.elapsed, }; -const _$RemoteAudioStateEnumMap = { - RemoteAudioState.remoteAudioStateStopped: 0, - RemoteAudioState.remoteAudioStateStarting: 1, - RemoteAudioState.remoteAudioStateDecoding: 2, - RemoteAudioState.remoteAudioStateFrozen: 3, - RemoteAudioState.remoteAudioStateFailed: 4, +const _$RemoteVideoStateEnumMap = { + RemoteVideoState.remoteVideoStateStopped: 0, + RemoteVideoState.remoteVideoStateStarting: 1, + RemoteVideoState.remoteVideoStateDecoding: 2, + RemoteVideoState.remoteVideoStateFrozen: 3, + RemoteVideoState.remoteVideoStateFailed: 4, }; -const _$RemoteAudioStateReasonEnumMap = { - RemoteAudioStateReason.remoteAudioReasonInternal: 0, - RemoteAudioStateReason.remoteAudioReasonNetworkCongestion: 1, - RemoteAudioStateReason.remoteAudioReasonNetworkRecovery: 2, - RemoteAudioStateReason.remoteAudioReasonLocalMuted: 3, - RemoteAudioStateReason.remoteAudioReasonLocalUnmuted: 4, - RemoteAudioStateReason.remoteAudioReasonRemoteMuted: 5, - RemoteAudioStateReason.remoteAudioReasonRemoteUnmuted: 6, - RemoteAudioStateReason.remoteAudioReasonRemoteOffline: 7, +const _$RemoteVideoStateReasonEnumMap = { + RemoteVideoStateReason.remoteVideoStateReasonInternal: 0, + RemoteVideoStateReason.remoteVideoStateReasonNetworkCongestion: 1, + RemoteVideoStateReason.remoteVideoStateReasonNetworkRecovery: 2, + RemoteVideoStateReason.remoteVideoStateReasonLocalMuted: 3, + RemoteVideoStateReason.remoteVideoStateReasonLocalUnmuted: 4, + RemoteVideoStateReason.remoteVideoStateReasonRemoteMuted: 5, + RemoteVideoStateReason.remoteVideoStateReasonRemoteUnmuted: 6, + RemoteVideoStateReason.remoteVideoStateReasonRemoteOffline: 7, + RemoteVideoStateReason.remoteVideoStateReasonAudioFallback: 8, + RemoteVideoStateReason.remoteVideoStateReasonAudioFallbackRecovery: 9, + RemoteVideoStateReason.remoteVideoStateReasonVideoStreamTypeChangeToLow: 10, + RemoteVideoStateReason.remoteVideoStateReasonVideoStreamTypeChangeToHigh: 11, + RemoteVideoStateReason.remoteVideoStateReasonSdkInBackground: 12, + RemoteVideoStateReason.remoteVideoStateReasonCodecNotSupport: 13, }; -RtcEngineEventHandlerOnActiveSpeakerJson - _$RtcEngineEventHandlerOnActiveSpeakerJsonFromJson( +RtcEngineEventHandlerOnFirstRemoteVideoFrameJson + _$RtcEngineEventHandlerOnFirstRemoteVideoFrameJsonFromJson( Map json) => - RtcEngineEventHandlerOnActiveSpeakerJson( + RtcEngineEventHandlerOnFirstRemoteVideoFrameJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), - uid: json['uid'] as int?, + remoteUid: json['remoteUid'] as int?, + width: json['width'] as int?, + height: json['height'] as int?, + elapsed: json['elapsed'] as int?, ); -Map _$RtcEngineEventHandlerOnActiveSpeakerJsonToJson( - RtcEngineEventHandlerOnActiveSpeakerJson instance) => +Map _$RtcEngineEventHandlerOnFirstRemoteVideoFrameJsonToJson( + RtcEngineEventHandlerOnFirstRemoteVideoFrameJson instance) => { 'connection': instance.connection?.toJson(), - 'uid': instance.uid, - }; - -RtcEngineEventHandlerOnContentInspectResultJson - _$RtcEngineEventHandlerOnContentInspectResultJsonFromJson( - Map json) => - RtcEngineEventHandlerOnContentInspectResultJson( - result: $enumDecodeNullable( - _$ContentInspectResultEnumMap, json['result']), - ); - -Map _$RtcEngineEventHandlerOnContentInspectResultJsonToJson( - RtcEngineEventHandlerOnContentInspectResultJson instance) => - { - 'result': _$ContentInspectResultEnumMap[instance.result], + 'remoteUid': instance.remoteUid, + 'width': instance.width, + 'height': instance.height, + 'elapsed': instance.elapsed, }; -const _$ContentInspectResultEnumMap = { - ContentInspectResult.contentInspectNeutral: 1, - ContentInspectResult.contentInspectSexy: 2, - ContentInspectResult.contentInspectPorn: 3, -}; - -RtcEngineEventHandlerOnSnapshotTakenJson - _$RtcEngineEventHandlerOnSnapshotTakenJsonFromJson( +RtcEngineEventHandlerOnUserJoinedJson + _$RtcEngineEventHandlerOnUserJoinedJsonFromJson( Map json) => - RtcEngineEventHandlerOnSnapshotTakenJson( + RtcEngineEventHandlerOnUserJoinedJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), - uid: json['uid'] as int?, - filePath: json['filePath'] as String?, - width: json['width'] as int?, - height: json['height'] as int?, - errCode: json['errCode'] as int?, + remoteUid: json['remoteUid'] as int?, + elapsed: json['elapsed'] as int?, ); -Map _$RtcEngineEventHandlerOnSnapshotTakenJsonToJson( - RtcEngineEventHandlerOnSnapshotTakenJson instance) => +Map _$RtcEngineEventHandlerOnUserJoinedJsonToJson( + RtcEngineEventHandlerOnUserJoinedJson instance) => { 'connection': instance.connection?.toJson(), - 'uid': instance.uid, - 'filePath': instance.filePath, - 'width': instance.width, - 'height': instance.height, - 'errCode': instance.errCode, + 'remoteUid': instance.remoteUid, + 'elapsed': instance.elapsed, }; -RtcEngineEventHandlerOnClientRoleChangedJson - _$RtcEngineEventHandlerOnClientRoleChangedJsonFromJson( +RtcEngineEventHandlerOnUserOfflineJson + _$RtcEngineEventHandlerOnUserOfflineJsonFromJson( Map json) => - RtcEngineEventHandlerOnClientRoleChangedJson( + RtcEngineEventHandlerOnUserOfflineJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), - oldRole: - $enumDecodeNullable(_$ClientRoleTypeEnumMap, json['oldRole']), - newRole: - $enumDecodeNullable(_$ClientRoleTypeEnumMap, json['newRole']), - newRoleOptions: json['newRoleOptions'] == null - ? null - : ClientRoleOptions.fromJson( - json['newRoleOptions'] as Map), + remoteUid: json['remoteUid'] as int?, + reason: $enumDecodeNullable( + _$UserOfflineReasonTypeEnumMap, json['reason']), ); -Map _$RtcEngineEventHandlerOnClientRoleChangedJsonToJson( - RtcEngineEventHandlerOnClientRoleChangedJson instance) => - { +Map _$RtcEngineEventHandlerOnUserOfflineJsonToJson( + RtcEngineEventHandlerOnUserOfflineJson instance) => + { 'connection': instance.connection?.toJson(), - 'oldRole': _$ClientRoleTypeEnumMap[instance.oldRole], - 'newRole': _$ClientRoleTypeEnumMap[instance.newRole], - 'newRoleOptions': instance.newRoleOptions?.toJson(), + 'remoteUid': instance.remoteUid, + 'reason': _$UserOfflineReasonTypeEnumMap[instance.reason], }; -const _$ClientRoleTypeEnumMap = { - ClientRoleType.clientRoleBroadcaster: 1, - ClientRoleType.clientRoleAudience: 2, +const _$UserOfflineReasonTypeEnumMap = { + UserOfflineReasonType.userOfflineQuit: 0, + UserOfflineReasonType.userOfflineDropped: 1, + UserOfflineReasonType.userOfflineBecomeAudience: 2, }; -RtcEngineEventHandlerOnClientRoleChangeFailedJson - _$RtcEngineEventHandlerOnClientRoleChangeFailedJsonFromJson( +RtcEngineEventHandlerOnUserMuteAudioJson + _$RtcEngineEventHandlerOnUserMuteAudioJsonFromJson( Map json) => - RtcEngineEventHandlerOnClientRoleChangeFailedJson( + RtcEngineEventHandlerOnUserMuteAudioJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), - reason: $enumDecodeNullable( - _$ClientRoleChangeFailedReasonEnumMap, json['reason']), - currentRole: - $enumDecodeNullable(_$ClientRoleTypeEnumMap, json['currentRole']), + remoteUid: json['remoteUid'] as int?, + muted: json['muted'] as bool?, ); -Map _$RtcEngineEventHandlerOnClientRoleChangeFailedJsonToJson( - RtcEngineEventHandlerOnClientRoleChangeFailedJson instance) => +Map _$RtcEngineEventHandlerOnUserMuteAudioJsonToJson( + RtcEngineEventHandlerOnUserMuteAudioJson instance) => { 'connection': instance.connection?.toJson(), - 'reason': _$ClientRoleChangeFailedReasonEnumMap[instance.reason], - 'currentRole': _$ClientRoleTypeEnumMap[instance.currentRole], + 'remoteUid': instance.remoteUid, + 'muted': instance.muted, }; -const _$ClientRoleChangeFailedReasonEnumMap = { - ClientRoleChangeFailedReason.clientRoleChangeFailedTooManyBroadcasters: 1, - ClientRoleChangeFailedReason.clientRoleChangeFailedNotAuthorized: 2, - ClientRoleChangeFailedReason.clientRoleChangeFailedRequestTimeOut: 3, - ClientRoleChangeFailedReason.clientRoleChangeFailedConnectionFailed: 4, -}; - -RtcEngineEventHandlerOnAudioDeviceVolumeChangedJson - _$RtcEngineEventHandlerOnAudioDeviceVolumeChangedJsonFromJson( +RtcEngineEventHandlerOnUserMuteVideoJson + _$RtcEngineEventHandlerOnUserMuteVideoJsonFromJson( Map json) => - RtcEngineEventHandlerOnAudioDeviceVolumeChangedJson( - deviceType: - $enumDecodeNullable(_$MediaDeviceTypeEnumMap, json['deviceType']), - volume: json['volume'] as int?, + RtcEngineEventHandlerOnUserMuteVideoJson( + connection: json['connection'] == null + ? null + : RtcConnection.fromJson( + json['connection'] as Map), + remoteUid: json['remoteUid'] as int?, muted: json['muted'] as bool?, ); -Map - _$RtcEngineEventHandlerOnAudioDeviceVolumeChangedJsonToJson( - RtcEngineEventHandlerOnAudioDeviceVolumeChangedJson instance) => - { - 'deviceType': _$MediaDeviceTypeEnumMap[instance.deviceType], - 'volume': instance.volume, - 'muted': instance.muted, - }; +Map _$RtcEngineEventHandlerOnUserMuteVideoJsonToJson( + RtcEngineEventHandlerOnUserMuteVideoJson instance) => + { + 'connection': instance.connection?.toJson(), + 'remoteUid': instance.remoteUid, + 'muted': instance.muted, + }; -RtcEngineEventHandlerOnRtmpStreamingStateChangedJson - _$RtcEngineEventHandlerOnRtmpStreamingStateChangedJsonFromJson( +RtcEngineEventHandlerOnUserEnableVideoJson + _$RtcEngineEventHandlerOnUserEnableVideoJsonFromJson( Map json) => - RtcEngineEventHandlerOnRtmpStreamingStateChangedJson( - url: json['url'] as String?, - state: $enumDecodeNullable( - _$RtmpStreamPublishStateEnumMap, json['state']), - errCode: $enumDecodeNullable( - _$RtmpStreamPublishErrorTypeEnumMap, json['errCode']), + RtcEngineEventHandlerOnUserEnableVideoJson( + connection: json['connection'] == null + ? null + : RtcConnection.fromJson( + json['connection'] as Map), + remoteUid: json['remoteUid'] as int?, + enabled: json['enabled'] as bool?, ); -Map - _$RtcEngineEventHandlerOnRtmpStreamingStateChangedJsonToJson( - RtcEngineEventHandlerOnRtmpStreamingStateChangedJson instance) => - { - 'url': instance.url, - 'state': _$RtmpStreamPublishStateEnumMap[instance.state], - 'errCode': _$RtmpStreamPublishErrorTypeEnumMap[instance.errCode], - }; +Map _$RtcEngineEventHandlerOnUserEnableVideoJsonToJson( + RtcEngineEventHandlerOnUserEnableVideoJson instance) => + { + 'connection': instance.connection?.toJson(), + 'remoteUid': instance.remoteUid, + 'enabled': instance.enabled, + }; -const _$RtmpStreamPublishStateEnumMap = { - RtmpStreamPublishState.rtmpStreamPublishStateIdle: 0, - RtmpStreamPublishState.rtmpStreamPublishStateConnecting: 1, - RtmpStreamPublishState.rtmpStreamPublishStateRunning: 2, - RtmpStreamPublishState.rtmpStreamPublishStateRecovering: 3, - RtmpStreamPublishState.rtmpStreamPublishStateFailure: 4, - RtmpStreamPublishState.rtmpStreamPublishStateDisconnecting: 5, -}; +RtcEngineEventHandlerOnUserStateChangedJson + _$RtcEngineEventHandlerOnUserStateChangedJsonFromJson( + Map json) => + RtcEngineEventHandlerOnUserStateChangedJson( + connection: json['connection'] == null + ? null + : RtcConnection.fromJson( + json['connection'] as Map), + remoteUid: json['remoteUid'] as int?, + state: json['state'] as int?, + ); -const _$RtmpStreamPublishErrorTypeEnumMap = { - RtmpStreamPublishErrorType.rtmpStreamPublishErrorOk: 0, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorInvalidArgument: 1, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorEncryptedStreamNotAllowed: 2, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorConnectionTimeout: 3, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorInternalServerError: 4, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorRtmpServerError: 5, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorTooOften: 6, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorReachLimit: 7, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorNotAuthorized: 8, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorStreamNotFound: 9, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorFormatNotSupported: 10, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorNotBroadcaster: 11, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorTranscodingNoMixStream: 13, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorNetDown: 14, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorInvalidAppid: 15, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorInvalidPrivilege: 16, - RtmpStreamPublishErrorType.rtmpStreamUnpublishErrorOk: 100, -}; +Map _$RtcEngineEventHandlerOnUserStateChangedJsonToJson( + RtcEngineEventHandlerOnUserStateChangedJson instance) => + { + 'connection': instance.connection?.toJson(), + 'remoteUid': instance.remoteUid, + 'state': instance.state, + }; -RtcEngineEventHandlerOnRtmpStreamingEventJson - _$RtcEngineEventHandlerOnRtmpStreamingEventJsonFromJson( +RtcEngineEventHandlerOnUserEnableLocalVideoJson + _$RtcEngineEventHandlerOnUserEnableLocalVideoJsonFromJson( Map json) => - RtcEngineEventHandlerOnRtmpStreamingEventJson( - url: json['url'] as String?, - eventCode: $enumDecodeNullable( - _$RtmpStreamingEventEnumMap, json['eventCode']), + RtcEngineEventHandlerOnUserEnableLocalVideoJson( + connection: json['connection'] == null + ? null + : RtcConnection.fromJson( + json['connection'] as Map), + remoteUid: json['remoteUid'] as int?, + enabled: json['enabled'] as bool?, ); -Map _$RtcEngineEventHandlerOnRtmpStreamingEventJsonToJson( - RtcEngineEventHandlerOnRtmpStreamingEventJson instance) => +Map _$RtcEngineEventHandlerOnUserEnableLocalVideoJsonToJson( + RtcEngineEventHandlerOnUserEnableLocalVideoJson instance) => { - 'url': instance.url, - 'eventCode': _$RtmpStreamingEventEnumMap[instance.eventCode], + 'connection': instance.connection?.toJson(), + 'remoteUid': instance.remoteUid, + 'enabled': instance.enabled, }; -const _$RtmpStreamingEventEnumMap = { - RtmpStreamingEvent.rtmpStreamingEventFailedLoadImage: 1, - RtmpStreamingEvent.rtmpStreamingEventUrlAlreadyInUse: 2, - RtmpStreamingEvent.rtmpStreamingEventAdvancedFeatureNotSupport: 3, - RtmpStreamingEvent.rtmpStreamingEventRequestTooOften: 4, -}; - -RtcEngineEventHandlerOnTranscodingUpdatedJson - _$RtcEngineEventHandlerOnTranscodingUpdatedJsonFromJson( +RtcEngineEventHandlerOnLocalAudioStatsJson + _$RtcEngineEventHandlerOnLocalAudioStatsJsonFromJson( Map json) => - RtcEngineEventHandlerOnTranscodingUpdatedJson(); + RtcEngineEventHandlerOnLocalAudioStatsJson( + connection: json['connection'] == null + ? null + : RtcConnection.fromJson( + json['connection'] as Map), + stats: json['stats'] == null + ? null + : LocalAudioStats.fromJson(json['stats'] as Map), + ); -Map _$RtcEngineEventHandlerOnTranscodingUpdatedJsonToJson( - RtcEngineEventHandlerOnTranscodingUpdatedJson instance) => - {}; +Map _$RtcEngineEventHandlerOnLocalAudioStatsJsonToJson( + RtcEngineEventHandlerOnLocalAudioStatsJson instance) => + { + 'connection': instance.connection?.toJson(), + 'stats': instance.stats?.toJson(), + }; -RtcEngineEventHandlerOnAudioRoutingChangedJson - _$RtcEngineEventHandlerOnAudioRoutingChangedJsonFromJson( +RtcEngineEventHandlerOnRemoteAudioStatsJson + _$RtcEngineEventHandlerOnRemoteAudioStatsJsonFromJson( Map json) => - RtcEngineEventHandlerOnAudioRoutingChangedJson( - routing: json['routing'] as int?, + RtcEngineEventHandlerOnRemoteAudioStatsJson( + connection: json['connection'] == null + ? null + : RtcConnection.fromJson( + json['connection'] as Map), + stats: json['stats'] == null + ? null + : RemoteAudioStats.fromJson( + json['stats'] as Map), ); -Map _$RtcEngineEventHandlerOnAudioRoutingChangedJsonToJson( - RtcEngineEventHandlerOnAudioRoutingChangedJson instance) => +Map _$RtcEngineEventHandlerOnRemoteAudioStatsJsonToJson( + RtcEngineEventHandlerOnRemoteAudioStatsJson instance) => { - 'routing': instance.routing, + 'connection': instance.connection?.toJson(), + 'stats': instance.stats?.toJson(), }; -RtcEngineEventHandlerOnChannelMediaRelayStateChangedJson - _$RtcEngineEventHandlerOnChannelMediaRelayStateChangedJsonFromJson( +RtcEngineEventHandlerOnLocalVideoStatsJson + _$RtcEngineEventHandlerOnLocalVideoStatsJsonFromJson( Map json) => - RtcEngineEventHandlerOnChannelMediaRelayStateChangedJson( - state: $enumDecodeNullable( - _$ChannelMediaRelayStateEnumMap, json['state']), - code: $enumDecodeNullable( - _$ChannelMediaRelayErrorEnumMap, json['code']), + RtcEngineEventHandlerOnLocalVideoStatsJson( + source: $enumDecodeNullable(_$VideoSourceTypeEnumMap, json['source']), + stats: json['stats'] == null + ? null + : LocalVideoStats.fromJson(json['stats'] as Map), ); -Map _$RtcEngineEventHandlerOnChannelMediaRelayStateChangedJsonToJson( - RtcEngineEventHandlerOnChannelMediaRelayStateChangedJson instance) => +Map _$RtcEngineEventHandlerOnLocalVideoStatsJsonToJson( + RtcEngineEventHandlerOnLocalVideoStatsJson instance) => { - 'state': _$ChannelMediaRelayStateEnumMap[instance.state], - 'code': _$ChannelMediaRelayErrorEnumMap[instance.code], + 'source': _$VideoSourceTypeEnumMap[instance.source], + 'stats': instance.stats?.toJson(), }; -const _$ChannelMediaRelayStateEnumMap = { - ChannelMediaRelayState.relayStateIdle: 0, - ChannelMediaRelayState.relayStateConnecting: 1, - ChannelMediaRelayState.relayStateRunning: 2, - ChannelMediaRelayState.relayStateFailure: 3, -}; - -const _$ChannelMediaRelayErrorEnumMap = { - ChannelMediaRelayError.relayOk: 0, - ChannelMediaRelayError.relayErrorServerErrorResponse: 1, - ChannelMediaRelayError.relayErrorServerNoResponse: 2, - ChannelMediaRelayError.relayErrorNoResourceAvailable: 3, - ChannelMediaRelayError.relayErrorFailedJoinSrc: 4, - ChannelMediaRelayError.relayErrorFailedJoinDest: 5, - ChannelMediaRelayError.relayErrorFailedPacketReceivedFromSrc: 6, - ChannelMediaRelayError.relayErrorFailedPacketSentToDest: 7, - ChannelMediaRelayError.relayErrorServerConnectionLost: 8, - ChannelMediaRelayError.relayErrorInternalError: 9, - ChannelMediaRelayError.relayErrorSrcTokenExpired: 10, - ChannelMediaRelayError.relayErrorDestTokenExpired: 11, -}; - -RtcEngineEventHandlerOnChannelMediaRelayEventJson - _$RtcEngineEventHandlerOnChannelMediaRelayEventJsonFromJson( +RtcEngineEventHandlerOnRemoteVideoStatsJson + _$RtcEngineEventHandlerOnRemoteVideoStatsJsonFromJson( Map json) => - RtcEngineEventHandlerOnChannelMediaRelayEventJson( - code: $enumDecodeNullable( - _$ChannelMediaRelayEventEnumMap, json['code']), + RtcEngineEventHandlerOnRemoteVideoStatsJson( + connection: json['connection'] == null + ? null + : RtcConnection.fromJson( + json['connection'] as Map), + stats: json['stats'] == null + ? null + : RemoteVideoStats.fromJson( + json['stats'] as Map), ); -Map _$RtcEngineEventHandlerOnChannelMediaRelayEventJsonToJson( - RtcEngineEventHandlerOnChannelMediaRelayEventJson instance) => +Map _$RtcEngineEventHandlerOnRemoteVideoStatsJsonToJson( + RtcEngineEventHandlerOnRemoteVideoStatsJson instance) => { - 'code': _$ChannelMediaRelayEventEnumMap[instance.code], + 'connection': instance.connection?.toJson(), + 'stats': instance.stats?.toJson(), }; -const _$ChannelMediaRelayEventEnumMap = { - ChannelMediaRelayEvent.relayEventNetworkDisconnected: 0, - ChannelMediaRelayEvent.relayEventNetworkConnected: 1, - ChannelMediaRelayEvent.relayEventPacketJoinedSrcChannel: 2, - ChannelMediaRelayEvent.relayEventPacketJoinedDestChannel: 3, - ChannelMediaRelayEvent.relayEventPacketSentToDestChannel: 4, - ChannelMediaRelayEvent.relayEventPacketReceivedVideoFromSrc: 5, - ChannelMediaRelayEvent.relayEventPacketReceivedAudioFromSrc: 6, - ChannelMediaRelayEvent.relayEventPacketUpdateDestChannel: 7, - ChannelMediaRelayEvent.relayEventPacketUpdateDestChannelRefused: 8, - ChannelMediaRelayEvent.relayEventPacketUpdateDestChannelNotChange: 9, - ChannelMediaRelayEvent.relayEventPacketUpdateDestChannelIsNull: 10, - ChannelMediaRelayEvent.relayEventVideoProfileUpdate: 11, - ChannelMediaRelayEvent.relayEventPauseSendPacketToDestChannelSuccess: 12, - ChannelMediaRelayEvent.relayEventPauseSendPacketToDestChannelFailed: 13, - ChannelMediaRelayEvent.relayEventResumeSendPacketToDestChannelSuccess: 14, - ChannelMediaRelayEvent.relayEventResumeSendPacketToDestChannelFailed: 15, -}; +RtcEngineEventHandlerOnCameraReadyJson + _$RtcEngineEventHandlerOnCameraReadyJsonFromJson( + Map json) => + RtcEngineEventHandlerOnCameraReadyJson(); -RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJson - _$RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJsonFromJson( +Map _$RtcEngineEventHandlerOnCameraReadyJsonToJson( + RtcEngineEventHandlerOnCameraReadyJson instance) => + {}; + +RtcEngineEventHandlerOnCameraFocusAreaChangedJson + _$RtcEngineEventHandlerOnCameraFocusAreaChangedJsonFromJson( Map json) => - RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJson( - isFallbackOrRecover: json['isFallbackOrRecover'] as bool?, + RtcEngineEventHandlerOnCameraFocusAreaChangedJson( + x: json['x'] as int?, + y: json['y'] as int?, + width: json['width'] as int?, + height: json['height'] as int?, ); -Map _$RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJsonToJson( - RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJson instance) => +Map _$RtcEngineEventHandlerOnCameraFocusAreaChangedJsonToJson( + RtcEngineEventHandlerOnCameraFocusAreaChangedJson instance) => { - 'isFallbackOrRecover': instance.isFallbackOrRecover, + 'x': instance.x, + 'y': instance.y, + 'width': instance.width, + 'height': instance.height, }; -RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJson - _$RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJsonFromJson( +RtcEngineEventHandlerOnCameraExposureAreaChangedJson + _$RtcEngineEventHandlerOnCameraExposureAreaChangedJsonFromJson( Map json) => - RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJson( - uid: json['uid'] as int?, - isFallbackOrRecover: json['isFallbackOrRecover'] as bool?, + RtcEngineEventHandlerOnCameraExposureAreaChangedJson( + x: json['x'] as int?, + y: json['y'] as int?, + width: json['width'] as int?, + height: json['height'] as int?, ); Map - _$RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJsonToJson( - RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJson - instance) => + _$RtcEngineEventHandlerOnCameraExposureAreaChangedJsonToJson( + RtcEngineEventHandlerOnCameraExposureAreaChangedJson instance) => { - 'uid': instance.uid, - 'isFallbackOrRecover': instance.isFallbackOrRecover, + 'x': instance.x, + 'y': instance.y, + 'width': instance.width, + 'height': instance.height, }; -RtcEngineEventHandlerOnRemoteAudioTransportStatsJson - _$RtcEngineEventHandlerOnRemoteAudioTransportStatsJsonFromJson( +RtcEngineEventHandlerOnFacePositionChangedJson + _$RtcEngineEventHandlerOnFacePositionChangedJsonFromJson( Map json) => - RtcEngineEventHandlerOnRemoteAudioTransportStatsJson( - connection: json['connection'] == null - ? null - : RtcConnection.fromJson( - json['connection'] as Map), - remoteUid: json['remoteUid'] as int?, - delay: json['delay'] as int?, - lost: json['lost'] as int?, - rxKBitRate: json['rxKBitRate'] as int?, + RtcEngineEventHandlerOnFacePositionChangedJson( + imageWidth: json['imageWidth'] as int?, + imageHeight: json['imageHeight'] as int?, + vecRectangle: (json['vecRectangle'] as List?) + ?.map((e) => Rectangle.fromJson(e as Map)) + .toList(), + vecDistance: (json['vecDistance'] as List?) + ?.map((e) => e as int) + .toList(), + numFaces: json['numFaces'] as int?, ); -Map - _$RtcEngineEventHandlerOnRemoteAudioTransportStatsJsonToJson( - RtcEngineEventHandlerOnRemoteAudioTransportStatsJson instance) => - { - 'connection': instance.connection?.toJson(), - 'remoteUid': instance.remoteUid, - 'delay': instance.delay, - 'lost': instance.lost, - 'rxKBitRate': instance.rxKBitRate, - }; +Map _$RtcEngineEventHandlerOnFacePositionChangedJsonToJson( + RtcEngineEventHandlerOnFacePositionChangedJson instance) => + { + 'imageWidth': instance.imageWidth, + 'imageHeight': instance.imageHeight, + 'vecRectangle': instance.vecRectangle?.map((e) => e.toJson()).toList(), + 'vecDistance': instance.vecDistance, + 'numFaces': instance.numFaces, + }; -RtcEngineEventHandlerOnRemoteVideoTransportStatsJson - _$RtcEngineEventHandlerOnRemoteVideoTransportStatsJsonFromJson( +RtcEngineEventHandlerOnVideoStoppedJson + _$RtcEngineEventHandlerOnVideoStoppedJsonFromJson( Map json) => - RtcEngineEventHandlerOnRemoteVideoTransportStatsJson( - connection: json['connection'] == null - ? null - : RtcConnection.fromJson( - json['connection'] as Map), - remoteUid: json['remoteUid'] as int?, - delay: json['delay'] as int?, - lost: json['lost'] as int?, - rxKBitRate: json['rxKBitRate'] as int?, + RtcEngineEventHandlerOnVideoStoppedJson(); + +Map _$RtcEngineEventHandlerOnVideoStoppedJsonToJson( + RtcEngineEventHandlerOnVideoStoppedJson instance) => + {}; + +RtcEngineEventHandlerOnAudioMixingStateChangedJson + _$RtcEngineEventHandlerOnAudioMixingStateChangedJsonFromJson( + Map json) => + RtcEngineEventHandlerOnAudioMixingStateChangedJson( + state: + $enumDecodeNullable(_$AudioMixingStateTypeEnumMap, json['state']), + reason: $enumDecodeNullable( + _$AudioMixingReasonTypeEnumMap, json['reason']), + ); + +Map _$RtcEngineEventHandlerOnAudioMixingStateChangedJsonToJson( + RtcEngineEventHandlerOnAudioMixingStateChangedJson instance) => + { + 'state': _$AudioMixingStateTypeEnumMap[instance.state], + 'reason': _$AudioMixingReasonTypeEnumMap[instance.reason], + }; + +const _$AudioMixingStateTypeEnumMap = { + AudioMixingStateType.audioMixingStatePlaying: 710, + AudioMixingStateType.audioMixingStatePaused: 711, + AudioMixingStateType.audioMixingStateStopped: 713, + AudioMixingStateType.audioMixingStateFailed: 714, +}; + +const _$AudioMixingReasonTypeEnumMap = { + AudioMixingReasonType.audioMixingReasonCanNotOpen: 701, + AudioMixingReasonType.audioMixingReasonTooFrequentCall: 702, + AudioMixingReasonType.audioMixingReasonInterruptedEof: 703, + AudioMixingReasonType.audioMixingReasonOneLoopCompleted: 721, + AudioMixingReasonType.audioMixingReasonAllLoopsCompleted: 723, + AudioMixingReasonType.audioMixingReasonStoppedByUser: 724, + AudioMixingReasonType.audioMixingReasonOk: 0, +}; + +RtcEngineEventHandlerOnRhythmPlayerStateChangedJson + _$RtcEngineEventHandlerOnRhythmPlayerStateChangedJsonFromJson( + Map json) => + RtcEngineEventHandlerOnRhythmPlayerStateChangedJson( + state: $enumDecodeNullable( + _$RhythmPlayerStateTypeEnumMap, json['state']), + errorCode: $enumDecodeNullable( + _$RhythmPlayerErrorTypeEnumMap, json['errorCode']), ); Map - _$RtcEngineEventHandlerOnRemoteVideoTransportStatsJsonToJson( - RtcEngineEventHandlerOnRemoteVideoTransportStatsJson instance) => + _$RtcEngineEventHandlerOnRhythmPlayerStateChangedJsonToJson( + RtcEngineEventHandlerOnRhythmPlayerStateChangedJson instance) => { - 'connection': instance.connection?.toJson(), - 'remoteUid': instance.remoteUid, - 'delay': instance.delay, - 'lost': instance.lost, - 'rxKBitRate': instance.rxKBitRate, + 'state': _$RhythmPlayerStateTypeEnumMap[instance.state], + 'errorCode': _$RhythmPlayerErrorTypeEnumMap[instance.errorCode], }; -RtcEngineEventHandlerOnConnectionStateChangedJson - _$RtcEngineEventHandlerOnConnectionStateChangedJsonFromJson( +const _$RhythmPlayerStateTypeEnumMap = { + RhythmPlayerStateType.rhythmPlayerStateIdle: 810, + RhythmPlayerStateType.rhythmPlayerStateOpening: 811, + RhythmPlayerStateType.rhythmPlayerStateDecoding: 812, + RhythmPlayerStateType.rhythmPlayerStatePlaying: 813, + RhythmPlayerStateType.rhythmPlayerStateFailed: 814, +}; + +const _$RhythmPlayerErrorTypeEnumMap = { + RhythmPlayerErrorType.rhythmPlayerErrorOk: 0, + RhythmPlayerErrorType.rhythmPlayerErrorFailed: 1, + RhythmPlayerErrorType.rhythmPlayerErrorCanNotOpen: 801, + RhythmPlayerErrorType.rhythmPlayerErrorCanNotPlay: 802, + RhythmPlayerErrorType.rhythmPlayerErrorFileOverDurationLimit: 803, +}; + +RtcEngineEventHandlerOnConnectionLostJson + _$RtcEngineEventHandlerOnConnectionLostJsonFromJson( Map json) => - RtcEngineEventHandlerOnConnectionStateChangedJson( + RtcEngineEventHandlerOnConnectionLostJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), - state: - $enumDecodeNullable(_$ConnectionStateTypeEnumMap, json['state']), - reason: $enumDecodeNullable( - _$ConnectionChangedReasonTypeEnumMap, json['reason']), ); -Map _$RtcEngineEventHandlerOnConnectionStateChangedJsonToJson( - RtcEngineEventHandlerOnConnectionStateChangedJson instance) => +Map _$RtcEngineEventHandlerOnConnectionLostJsonToJson( + RtcEngineEventHandlerOnConnectionLostJson instance) => { 'connection': instance.connection?.toJson(), - 'state': _$ConnectionStateTypeEnumMap[instance.state], - 'reason': _$ConnectionChangedReasonTypeEnumMap[instance.reason], }; -const _$ConnectionStateTypeEnumMap = { - ConnectionStateType.connectionStateDisconnected: 1, - ConnectionStateType.connectionStateConnecting: 2, - ConnectionStateType.connectionStateConnected: 3, - ConnectionStateType.connectionStateReconnecting: 4, - ConnectionStateType.connectionStateFailed: 5, -}; - -const _$ConnectionChangedReasonTypeEnumMap = { - ConnectionChangedReasonType.connectionChangedConnecting: 0, - ConnectionChangedReasonType.connectionChangedJoinSuccess: 1, - ConnectionChangedReasonType.connectionChangedInterrupted: 2, - ConnectionChangedReasonType.connectionChangedBannedByServer: 3, - ConnectionChangedReasonType.connectionChangedJoinFailed: 4, - ConnectionChangedReasonType.connectionChangedLeaveChannel: 5, - ConnectionChangedReasonType.connectionChangedInvalidAppId: 6, - ConnectionChangedReasonType.connectionChangedInvalidChannelName: 7, - ConnectionChangedReasonType.connectionChangedInvalidToken: 8, - ConnectionChangedReasonType.connectionChangedTokenExpired: 9, - ConnectionChangedReasonType.connectionChangedRejectedByServer: 10, - ConnectionChangedReasonType.connectionChangedSettingProxyServer: 11, - ConnectionChangedReasonType.connectionChangedRenewToken: 12, - ConnectionChangedReasonType.connectionChangedClientIpAddressChanged: 13, - ConnectionChangedReasonType.connectionChangedKeepAliveTimeout: 14, - ConnectionChangedReasonType.connectionChangedRejoinSuccess: 15, - ConnectionChangedReasonType.connectionChangedLost: 16, - ConnectionChangedReasonType.connectionChangedEchoTest: 17, - ConnectionChangedReasonType.connectionChangedClientIpAddressChangedByUser: 18, - ConnectionChangedReasonType.connectionChangedSameUidLogin: 19, - ConnectionChangedReasonType.connectionChangedTooManyBroadcasters: 20, - ConnectionChangedReasonType.connectionChangedLicenseValidationFailure: 21, -}; - -RtcEngineEventHandlerOnWlAccMessageJson - _$RtcEngineEventHandlerOnWlAccMessageJsonFromJson( +RtcEngineEventHandlerOnConnectionInterruptedJson + _$RtcEngineEventHandlerOnConnectionInterruptedJsonFromJson( Map json) => - RtcEngineEventHandlerOnWlAccMessageJson( + RtcEngineEventHandlerOnConnectionInterruptedJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), - reason: - $enumDecodeNullable(_$WlaccMessageReasonEnumMap, json['reason']), - action: - $enumDecodeNullable(_$WlaccSuggestActionEnumMap, json['action']), - wlAccMsg: json['wlAccMsg'] as String?, ); -Map _$RtcEngineEventHandlerOnWlAccMessageJsonToJson( - RtcEngineEventHandlerOnWlAccMessageJson instance) => +Map _$RtcEngineEventHandlerOnConnectionInterruptedJsonToJson( + RtcEngineEventHandlerOnConnectionInterruptedJson instance) => { 'connection': instance.connection?.toJson(), - 'reason': _$WlaccMessageReasonEnumMap[instance.reason], - 'action': _$WlaccSuggestActionEnumMap[instance.action], - 'wlAccMsg': instance.wlAccMsg, }; -const _$WlaccMessageReasonEnumMap = { - WlaccMessageReason.wlaccMessageReasonWeakSignal: 0, - WlaccMessageReason.wlaccMessageReasonChannelCongestion: 1, -}; - -const _$WlaccSuggestActionEnumMap = { - WlaccSuggestAction.wlaccSuggestActionCloseToWifi: 0, - WlaccSuggestAction.wlaccSuggestActionConnectSsid: 1, - WlaccSuggestAction.wlaccSuggestActionCheck5g: 2, - WlaccSuggestAction.wlaccSuggestActionModifySsid: 3, -}; - -RtcEngineEventHandlerOnWlAccStatsJson - _$RtcEngineEventHandlerOnWlAccStatsJsonFromJson( +RtcEngineEventHandlerOnConnectionBannedJson + _$RtcEngineEventHandlerOnConnectionBannedJsonFromJson( Map json) => - RtcEngineEventHandlerOnWlAccStatsJson( + RtcEngineEventHandlerOnConnectionBannedJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), - currentStats: json['currentStats'] == null - ? null - : WlAccStats.fromJson( - json['currentStats'] as Map), - averageStats: json['averageStats'] == null - ? null - : WlAccStats.fromJson( - json['averageStats'] as Map), ); -Map _$RtcEngineEventHandlerOnWlAccStatsJsonToJson( - RtcEngineEventHandlerOnWlAccStatsJson instance) => +Map _$RtcEngineEventHandlerOnConnectionBannedJsonToJson( + RtcEngineEventHandlerOnConnectionBannedJson instance) => { 'connection': instance.connection?.toJson(), - 'currentStats': instance.currentStats?.toJson(), - 'averageStats': instance.averageStats?.toJson(), }; -RtcEngineEventHandlerOnNetworkTypeChangedJson - _$RtcEngineEventHandlerOnNetworkTypeChangedJsonFromJson( +RtcEngineEventHandlerOnStreamMessageJson + _$RtcEngineEventHandlerOnStreamMessageJsonFromJson( Map json) => - RtcEngineEventHandlerOnNetworkTypeChangedJson( + RtcEngineEventHandlerOnStreamMessageJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), - type: $enumDecodeNullable(_$NetworkTypeEnumMap, json['type']), + remoteUid: json['remoteUid'] as int?, + streamId: json['streamId'] as int?, + length: json['length'] as int?, + sentTs: json['sentTs'] as int?, ); -Map _$RtcEngineEventHandlerOnNetworkTypeChangedJsonToJson( - RtcEngineEventHandlerOnNetworkTypeChangedJson instance) => +Map _$RtcEngineEventHandlerOnStreamMessageJsonToJson( + RtcEngineEventHandlerOnStreamMessageJson instance) => { 'connection': instance.connection?.toJson(), - 'type': _$NetworkTypeEnumMap[instance.type], + 'remoteUid': instance.remoteUid, + 'streamId': instance.streamId, + 'length': instance.length, + 'sentTs': instance.sentTs, }; -const _$NetworkTypeEnumMap = { - NetworkType.networkTypeUnknown: -1, - NetworkType.networkTypeDisconnected: 0, - NetworkType.networkTypeLan: 1, - NetworkType.networkTypeWifi: 2, - NetworkType.networkTypeMobile2g: 3, - NetworkType.networkTypeMobile3g: 4, - NetworkType.networkTypeMobile4g: 5, - NetworkType.networkTypeMobile5g: 6, -}; - -RtcEngineEventHandlerOnEncryptionErrorJson - _$RtcEngineEventHandlerOnEncryptionErrorJsonFromJson( +RtcEngineEventHandlerOnStreamMessageErrorJson + _$RtcEngineEventHandlerOnStreamMessageErrorJsonFromJson( Map json) => - RtcEngineEventHandlerOnEncryptionErrorJson( + RtcEngineEventHandlerOnStreamMessageErrorJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), - errorType: $enumDecodeNullable( - _$EncryptionErrorTypeEnumMap, json['errorType']), + remoteUid: json['remoteUid'] as int?, + streamId: json['streamId'] as int?, + code: $enumDecodeNullable(_$ErrorCodeTypeEnumMap, json['code']), + missed: json['missed'] as int?, + cached: json['cached'] as int?, ); -Map _$RtcEngineEventHandlerOnEncryptionErrorJsonToJson( - RtcEngineEventHandlerOnEncryptionErrorJson instance) => +Map _$RtcEngineEventHandlerOnStreamMessageErrorJsonToJson( + RtcEngineEventHandlerOnStreamMessageErrorJson instance) => { 'connection': instance.connection?.toJson(), - 'errorType': _$EncryptionErrorTypeEnumMap[instance.errorType], + 'remoteUid': instance.remoteUid, + 'streamId': instance.streamId, + 'code': _$ErrorCodeTypeEnumMap[instance.code], + 'missed': instance.missed, + 'cached': instance.cached, }; -const _$EncryptionErrorTypeEnumMap = { - EncryptionErrorType.encryptionErrorInternalFailure: 0, - EncryptionErrorType.encryptionErrorDecryptionFailure: 1, - EncryptionErrorType.encryptionErrorEncryptionFailure: 2, -}; - -RtcEngineEventHandlerOnPermissionErrorJson - _$RtcEngineEventHandlerOnPermissionErrorJsonFromJson( +RtcEngineEventHandlerOnRequestTokenJson + _$RtcEngineEventHandlerOnRequestTokenJsonFromJson( Map json) => - RtcEngineEventHandlerOnPermissionErrorJson( - permissionType: $enumDecodeNullable( - _$PermissionTypeEnumMap, json['permissionType']), + RtcEngineEventHandlerOnRequestTokenJson( + connection: json['connection'] == null + ? null + : RtcConnection.fromJson( + json['connection'] as Map), ); -Map _$RtcEngineEventHandlerOnPermissionErrorJsonToJson( - RtcEngineEventHandlerOnPermissionErrorJson instance) => +Map _$RtcEngineEventHandlerOnRequestTokenJsonToJson( + RtcEngineEventHandlerOnRequestTokenJson instance) => { - 'permissionType': _$PermissionTypeEnumMap[instance.permissionType], + 'connection': instance.connection?.toJson(), }; -const _$PermissionTypeEnumMap = { - PermissionType.recordAudio: 0, - PermissionType.camera: 1, - PermissionType.screenCapture: 2, -}; - -RtcEngineEventHandlerOnLocalUserRegisteredJson - _$RtcEngineEventHandlerOnLocalUserRegisteredJsonFromJson( +RtcEngineEventHandlerOnTokenPrivilegeWillExpireJson + _$RtcEngineEventHandlerOnTokenPrivilegeWillExpireJsonFromJson( Map json) => - RtcEngineEventHandlerOnLocalUserRegisteredJson( - uid: json['uid'] as int?, - userAccount: json['userAccount'] as String?, + RtcEngineEventHandlerOnTokenPrivilegeWillExpireJson( + connection: json['connection'] == null + ? null + : RtcConnection.fromJson( + json['connection'] as Map), + token: json['token'] as String?, ); -Map _$RtcEngineEventHandlerOnLocalUserRegisteredJsonToJson( - RtcEngineEventHandlerOnLocalUserRegisteredJson instance) => - { - 'uid': instance.uid, - 'userAccount': instance.userAccount, - }; +Map + _$RtcEngineEventHandlerOnTokenPrivilegeWillExpireJsonToJson( + RtcEngineEventHandlerOnTokenPrivilegeWillExpireJson instance) => + { + 'connection': instance.connection?.toJson(), + 'token': instance.token, + }; -RtcEngineEventHandlerOnUserInfoUpdatedJson - _$RtcEngineEventHandlerOnUserInfoUpdatedJsonFromJson( +RtcEngineEventHandlerOnLicenseValidationFailureJson + _$RtcEngineEventHandlerOnLicenseValidationFailureJsonFromJson( Map json) => - RtcEngineEventHandlerOnUserInfoUpdatedJson( - uid: json['uid'] as int?, - info: json['info'] == null + RtcEngineEventHandlerOnLicenseValidationFailureJson( + connection: json['connection'] == null ? null - : UserInfo.fromJson(json['info'] as Map), + : RtcConnection.fromJson( + json['connection'] as Map), + reason: + $enumDecodeNullable(_$LicenseErrorTypeEnumMap, json['reason']), ); -Map _$RtcEngineEventHandlerOnUserInfoUpdatedJsonToJson( - RtcEngineEventHandlerOnUserInfoUpdatedJson instance) => - { - 'uid': instance.uid, - 'info': instance.info?.toJson(), - }; +Map + _$RtcEngineEventHandlerOnLicenseValidationFailureJsonToJson( + RtcEngineEventHandlerOnLicenseValidationFailureJson instance) => + { + 'connection': instance.connection?.toJson(), + 'reason': _$LicenseErrorTypeEnumMap[instance.reason], + }; -RtcEngineEventHandlerOnUploadLogResultJson - _$RtcEngineEventHandlerOnUploadLogResultJsonFromJson( +const _$LicenseErrorTypeEnumMap = { + LicenseErrorType.licenseErrInvalid: 1, + LicenseErrorType.licenseErrExpire: 2, + LicenseErrorType.licenseErrMinutesExceed: 3, + LicenseErrorType.licenseErrLimitedPeriod: 4, + LicenseErrorType.licenseErrDiffDevices: 5, + LicenseErrorType.licenseErrInternal: 99, +}; + +RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJson + _$RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJsonFromJson( Map json) => - RtcEngineEventHandlerOnUploadLogResultJson( + RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), - requestId: json['requestId'] as String?, - success: json['success'] as bool?, - reason: - $enumDecodeNullable(_$UploadErrorReasonEnumMap, json['reason']), + elapsed: json['elapsed'] as int?, ); -Map _$RtcEngineEventHandlerOnUploadLogResultJsonToJson( - RtcEngineEventHandlerOnUploadLogResultJson instance) => +Map _$RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJsonToJson( + RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJson instance) => { 'connection': instance.connection?.toJson(), - 'requestId': instance.requestId, - 'success': instance.success, - 'reason': _$UploadErrorReasonEnumMap[instance.reason], + 'elapsed': instance.elapsed, }; -const _$UploadErrorReasonEnumMap = { - UploadErrorReason.uploadSuccess: 0, - UploadErrorReason.uploadNetError: 1, - UploadErrorReason.uploadServerError: 2, -}; - -RtcEngineEventHandlerOnAudioSubscribeStateChangedJson - _$RtcEngineEventHandlerOnAudioSubscribeStateChangedJsonFromJson( +RtcEngineEventHandlerOnFirstRemoteAudioFrameJson + _$RtcEngineEventHandlerOnFirstRemoteAudioFrameJsonFromJson( Map json) => - RtcEngineEventHandlerOnAudioSubscribeStateChangedJson( - channel: json['channel'] as String?, - uid: json['uid'] as int?, - oldState: $enumDecodeNullable( - _$StreamSubscribeStateEnumMap, json['oldState']), - newState: $enumDecodeNullable( - _$StreamSubscribeStateEnumMap, json['newState']), - elapseSinceLastState: json['elapseSinceLastState'] as int?, + RtcEngineEventHandlerOnFirstRemoteAudioFrameJson( + connection: json['connection'] == null + ? null + : RtcConnection.fromJson( + json['connection'] as Map), + userId: json['userId'] as int?, + elapsed: json['elapsed'] as int?, ); -Map - _$RtcEngineEventHandlerOnAudioSubscribeStateChangedJsonToJson( - RtcEngineEventHandlerOnAudioSubscribeStateChangedJson instance) => - { - 'channel': instance.channel, - 'uid': instance.uid, - 'oldState': _$StreamSubscribeStateEnumMap[instance.oldState], - 'newState': _$StreamSubscribeStateEnumMap[instance.newState], - 'elapseSinceLastState': instance.elapseSinceLastState, - }; - -const _$StreamSubscribeStateEnumMap = { - StreamSubscribeState.subStateIdle: 0, - StreamSubscribeState.subStateNoSubscribed: 1, - StreamSubscribeState.subStateSubscribing: 2, - StreamSubscribeState.subStateSubscribed: 3, -}; +Map _$RtcEngineEventHandlerOnFirstRemoteAudioFrameJsonToJson( + RtcEngineEventHandlerOnFirstRemoteAudioFrameJson instance) => + { + 'connection': instance.connection?.toJson(), + 'userId': instance.userId, + 'elapsed': instance.elapsed, + }; -RtcEngineEventHandlerOnVideoSubscribeStateChangedJson - _$RtcEngineEventHandlerOnVideoSubscribeStateChangedJsonFromJson( +RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson + _$RtcEngineEventHandlerOnFirstRemoteAudioDecodedJsonFromJson( Map json) => - RtcEngineEventHandlerOnVideoSubscribeStateChangedJson( - channel: json['channel'] as String?, + RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson( + connection: json['connection'] == null + ? null + : RtcConnection.fromJson( + json['connection'] as Map), uid: json['uid'] as int?, - oldState: $enumDecodeNullable( - _$StreamSubscribeStateEnumMap, json['oldState']), - newState: $enumDecodeNullable( - _$StreamSubscribeStateEnumMap, json['newState']), - elapseSinceLastState: json['elapseSinceLastState'] as int?, - ); - -Map - _$RtcEngineEventHandlerOnVideoSubscribeStateChangedJsonToJson( - RtcEngineEventHandlerOnVideoSubscribeStateChangedJson instance) => - { - 'channel': instance.channel, - 'uid': instance.uid, - 'oldState': _$StreamSubscribeStateEnumMap[instance.oldState], - 'newState': _$StreamSubscribeStateEnumMap[instance.newState], - 'elapseSinceLastState': instance.elapseSinceLastState, - }; - -RtcEngineEventHandlerOnAudioPublishStateChangedJson - _$RtcEngineEventHandlerOnAudioPublishStateChangedJsonFromJson( - Map json) => - RtcEngineEventHandlerOnAudioPublishStateChangedJson( - channel: json['channel'] as String?, - oldState: $enumDecodeNullable( - _$StreamPublishStateEnumMap, json['oldState']), - newState: $enumDecodeNullable( - _$StreamPublishStateEnumMap, json['newState']), - elapseSinceLastState: json['elapseSinceLastState'] as int?, - ); - -Map - _$RtcEngineEventHandlerOnAudioPublishStateChangedJsonToJson( - RtcEngineEventHandlerOnAudioPublishStateChangedJson instance) => - { - 'channel': instance.channel, - 'oldState': _$StreamPublishStateEnumMap[instance.oldState], - 'newState': _$StreamPublishStateEnumMap[instance.newState], - 'elapseSinceLastState': instance.elapseSinceLastState, - }; - -const _$StreamPublishStateEnumMap = { - StreamPublishState.pubStateIdle: 0, - StreamPublishState.pubStateNoPublished: 1, - StreamPublishState.pubStatePublishing: 2, - StreamPublishState.pubStatePublished: 3, -}; - -RtcEngineEventHandlerOnVideoPublishStateChangedJson - _$RtcEngineEventHandlerOnVideoPublishStateChangedJsonFromJson( - Map json) => - RtcEngineEventHandlerOnVideoPublishStateChangedJson( - source: $enumDecodeNullable(_$VideoSourceTypeEnumMap, json['source']), - channel: json['channel'] as String?, - oldState: $enumDecodeNullable( - _$StreamPublishStateEnumMap, json['oldState']), - newState: $enumDecodeNullable( - _$StreamPublishStateEnumMap, json['newState']), - elapseSinceLastState: json['elapseSinceLastState'] as int?, - ); - -Map - _$RtcEngineEventHandlerOnVideoPublishStateChangedJsonToJson( - RtcEngineEventHandlerOnVideoPublishStateChangedJson instance) => - { - 'source': _$VideoSourceTypeEnumMap[instance.source], - 'channel': instance.channel, - 'oldState': _$StreamPublishStateEnumMap[instance.oldState], - 'newState': _$StreamPublishStateEnumMap[instance.newState], - 'elapseSinceLastState': instance.elapseSinceLastState, - }; - -RtcEngineEventHandlerOnExtensionEventJson - _$RtcEngineEventHandlerOnExtensionEventJsonFromJson( - Map json) => - RtcEngineEventHandlerOnExtensionEventJson( - provider: json['provider'] as String?, - extension: json['extension'] as String?, - key: json['key'] as String?, - value: json['value'] as String?, + elapsed: json['elapsed'] as int?, ); -Map _$RtcEngineEventHandlerOnExtensionEventJsonToJson( - RtcEngineEventHandlerOnExtensionEventJson instance) => +Map _$RtcEngineEventHandlerOnFirstRemoteAudioDecodedJsonToJson( + RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson instance) => { - 'provider': instance.provider, - 'extension': instance.extension, - 'key': instance.key, - 'value': instance.value, + 'connection': instance.connection?.toJson(), + 'uid': instance.uid, + 'elapsed': instance.elapsed, }; -RtcEngineEventHandlerOnExtensionStartedJson - _$RtcEngineEventHandlerOnExtensionStartedJsonFromJson( +RtcEngineEventHandlerOnLocalAudioStateChangedJson + _$RtcEngineEventHandlerOnLocalAudioStateChangedJsonFromJson( Map json) => - RtcEngineEventHandlerOnExtensionStartedJson( - provider: json['provider'] as String?, - extension: json['extension'] as String?, + RtcEngineEventHandlerOnLocalAudioStateChangedJson( + connection: json['connection'] == null + ? null + : RtcConnection.fromJson( + json['connection'] as Map), + state: $enumDecodeNullable( + _$LocalAudioStreamStateEnumMap, json['state']), + error: $enumDecodeNullable( + _$LocalAudioStreamErrorEnumMap, json['error']), ); -Map _$RtcEngineEventHandlerOnExtensionStartedJsonToJson( - RtcEngineEventHandlerOnExtensionStartedJson instance) => +Map _$RtcEngineEventHandlerOnLocalAudioStateChangedJsonToJson( + RtcEngineEventHandlerOnLocalAudioStateChangedJson instance) => { - 'provider': instance.provider, - 'extension': instance.extension, + 'connection': instance.connection?.toJson(), + 'state': _$LocalAudioStreamStateEnumMap[instance.state], + 'error': _$LocalAudioStreamErrorEnumMap[instance.error], }; -RtcEngineEventHandlerOnExtensionStoppedJson - _$RtcEngineEventHandlerOnExtensionStoppedJsonFromJson( - Map json) => - RtcEngineEventHandlerOnExtensionStoppedJson( - provider: json['provider'] as String?, - extension: json['extension'] as String?, - ); +const _$LocalAudioStreamStateEnumMap = { + LocalAudioStreamState.localAudioStreamStateStopped: 0, + LocalAudioStreamState.localAudioStreamStateRecording: 1, + LocalAudioStreamState.localAudioStreamStateEncoding: 2, + LocalAudioStreamState.localAudioStreamStateFailed: 3, +}; -Map _$RtcEngineEventHandlerOnExtensionStoppedJsonToJson( - RtcEngineEventHandlerOnExtensionStoppedJson instance) => - { - 'provider': instance.provider, - 'extension': instance.extension, - }; +const _$LocalAudioStreamErrorEnumMap = { + LocalAudioStreamError.localAudioStreamErrorOk: 0, + LocalAudioStreamError.localAudioStreamErrorFailure: 1, + LocalAudioStreamError.localAudioStreamErrorDeviceNoPermission: 2, + LocalAudioStreamError.localAudioStreamErrorDeviceBusy: 3, + LocalAudioStreamError.localAudioStreamErrorRecordFailure: 4, + LocalAudioStreamError.localAudioStreamErrorEncodeFailure: 5, + LocalAudioStreamError.localAudioStreamErrorNoRecordingDevice: 6, + LocalAudioStreamError.localAudioStreamErrorNoPlayoutDevice: 7, + LocalAudioStreamError.localAudioStreamErrorInterrupted: 8, + LocalAudioStreamError.localAudioStreamErrorRecordInvalidId: 9, + LocalAudioStreamError.localAudioStreamErrorPlayoutInvalidId: 10, +}; -RtcEngineEventHandlerOnExtensionErrorJson - _$RtcEngineEventHandlerOnExtensionErrorJsonFromJson( +RtcEngineEventHandlerOnRemoteAudioStateChangedJson + _$RtcEngineEventHandlerOnRemoteAudioStateChangedJsonFromJson( Map json) => - RtcEngineEventHandlerOnExtensionErrorJson( - provider: json['provider'] as String?, - extension: json['extension'] as String?, - error: json['error'] as int?, - message: json['message'] as String?, + RtcEngineEventHandlerOnRemoteAudioStateChangedJson( + connection: json['connection'] == null + ? null + : RtcConnection.fromJson( + json['connection'] as Map), + remoteUid: json['remoteUid'] as int?, + state: $enumDecodeNullable(_$RemoteAudioStateEnumMap, json['state']), + reason: $enumDecodeNullable( + _$RemoteAudioStateReasonEnumMap, json['reason']), + elapsed: json['elapsed'] as int?, ); -Map _$RtcEngineEventHandlerOnExtensionErrorJsonToJson( - RtcEngineEventHandlerOnExtensionErrorJson instance) => +Map _$RtcEngineEventHandlerOnRemoteAudioStateChangedJsonToJson( + RtcEngineEventHandlerOnRemoteAudioStateChangedJson instance) => { - 'provider': instance.provider, - 'extension': instance.extension, - 'error': instance.error, - 'message': instance.message, + 'connection': instance.connection?.toJson(), + 'remoteUid': instance.remoteUid, + 'state': _$RemoteAudioStateEnumMap[instance.state], + 'reason': _$RemoteAudioStateReasonEnumMap[instance.reason], + 'elapsed': instance.elapsed, }; -RtcEngineEventHandlerOnUserAccountUpdatedJson - _$RtcEngineEventHandlerOnUserAccountUpdatedJsonFromJson( +const _$RemoteAudioStateEnumMap = { + RemoteAudioState.remoteAudioStateStopped: 0, + RemoteAudioState.remoteAudioStateStarting: 1, + RemoteAudioState.remoteAudioStateDecoding: 2, + RemoteAudioState.remoteAudioStateFrozen: 3, + RemoteAudioState.remoteAudioStateFailed: 4, +}; + +const _$RemoteAudioStateReasonEnumMap = { + RemoteAudioStateReason.remoteAudioReasonInternal: 0, + RemoteAudioStateReason.remoteAudioReasonNetworkCongestion: 1, + RemoteAudioStateReason.remoteAudioReasonNetworkRecovery: 2, + RemoteAudioStateReason.remoteAudioReasonLocalMuted: 3, + RemoteAudioStateReason.remoteAudioReasonLocalUnmuted: 4, + RemoteAudioStateReason.remoteAudioReasonRemoteMuted: 5, + RemoteAudioStateReason.remoteAudioReasonRemoteUnmuted: 6, + RemoteAudioStateReason.remoteAudioReasonRemoteOffline: 7, +}; + +RtcEngineEventHandlerOnActiveSpeakerJson + _$RtcEngineEventHandlerOnActiveSpeakerJsonFromJson( Map json) => - RtcEngineEventHandlerOnUserAccountUpdatedJson( + RtcEngineEventHandlerOnActiveSpeakerJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), - remoteUid: json['remoteUid'] as int?, - userAccount: json['userAccount'] as String?, + uid: json['uid'] as int?, ); -Map _$RtcEngineEventHandlerOnUserAccountUpdatedJsonToJson( - RtcEngineEventHandlerOnUserAccountUpdatedJson instance) => +Map _$RtcEngineEventHandlerOnActiveSpeakerJsonToJson( + RtcEngineEventHandlerOnActiveSpeakerJson instance) => { 'connection': instance.connection?.toJson(), - 'remoteUid': instance.remoteUid, - 'userAccount': instance.userAccount, + 'uid': instance.uid, }; -RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson - _$RtcEngineEventHandlerOnLocalVideoTranscoderErrorJsonFromJson( +RtcEngineEventHandlerOnContentInspectResultJson + _$RtcEngineEventHandlerOnContentInspectResultJsonFromJson( Map json) => - RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson( - stream: json['stream'] == null - ? null - : TranscodingVideoStream.fromJson( - json['stream'] as Map), - error: - $enumDecodeNullable(_$VideoTranscoderErrorEnumMap, json['error']), + RtcEngineEventHandlerOnContentInspectResultJson( + result: $enumDecodeNullable( + _$ContentInspectResultEnumMap, json['result']), ); -Map - _$RtcEngineEventHandlerOnLocalVideoTranscoderErrorJsonToJson( - RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson instance) => - { - 'stream': instance.stream?.toJson(), - 'error': _$VideoTranscoderErrorEnumMap[instance.error], - }; +Map _$RtcEngineEventHandlerOnContentInspectResultJsonToJson( + RtcEngineEventHandlerOnContentInspectResultJson instance) => + { + 'result': _$ContentInspectResultEnumMap[instance.result], + }; -const _$VideoTranscoderErrorEnumMap = { - VideoTranscoderError.vtErrOk: 0, - VideoTranscoderError.vtErrVideoSourceNotReady: 1, - VideoTranscoderError.vtErrInvalidVideoSourceType: 2, - VideoTranscoderError.vtErrInvalidImagePath: 3, - VideoTranscoderError.vtErrUnsupportImageFormat: 4, - VideoTranscoderError.vtErrInvalidLayout: 5, - VideoTranscoderError.vtErrInternal: 20, +const _$ContentInspectResultEnumMap = { + ContentInspectResult.contentInspectNeutral: 1, + ContentInspectResult.contentInspectSexy: 2, + ContentInspectResult.contentInspectPorn: 3, }; -RtcEngineEventHandlerOnVideoRenderingTracingResultJson - _$RtcEngineEventHandlerOnVideoRenderingTracingResultJsonFromJson( +RtcEngineEventHandlerOnSnapshotTakenJson + _$RtcEngineEventHandlerOnSnapshotTakenJsonFromJson( Map json) => - RtcEngineEventHandlerOnVideoRenderingTracingResultJson( + RtcEngineEventHandlerOnSnapshotTakenJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), uid: json['uid'] as int?, - currentEvent: $enumDecodeNullable( - _$MediaTraceEventEnumMap, json['currentEvent']), - tracingInfo: json['tracingInfo'] == null - ? null - : VideoRenderingTracingInfo.fromJson( - json['tracingInfo'] as Map), + filePath: json['filePath'] as String?, + width: json['width'] as int?, + height: json['height'] as int?, + errCode: json['errCode'] as int?, ); -Map - _$RtcEngineEventHandlerOnVideoRenderingTracingResultJsonToJson( - RtcEngineEventHandlerOnVideoRenderingTracingResultJson instance) => - { - 'connection': instance.connection?.toJson(), - 'uid': instance.uid, - 'currentEvent': _$MediaTraceEventEnumMap[instance.currentEvent], - 'tracingInfo': instance.tracingInfo?.toJson(), - }; - -const _$MediaTraceEventEnumMap = { - MediaTraceEvent.mediaTraceEventVideoRendered: 0, - MediaTraceEvent.mediaTraceEventVideoDecoded: 1, -}; +Map _$RtcEngineEventHandlerOnSnapshotTakenJsonToJson( + RtcEngineEventHandlerOnSnapshotTakenJson instance) => + { + 'connection': instance.connection?.toJson(), + 'uid': instance.uid, + 'filePath': instance.filePath, + 'width': instance.width, + 'height': instance.height, + 'errCode': instance.errCode, + }; -MetadataObserverOnMetadataReceivedJson - _$MetadataObserverOnMetadataReceivedJsonFromJson( +RtcEngineEventHandlerOnClientRoleChangedJson + _$RtcEngineEventHandlerOnClientRoleChangedJsonFromJson( Map json) => - MetadataObserverOnMetadataReceivedJson( - metadata: json['metadata'] == null + RtcEngineEventHandlerOnClientRoleChangedJson( + connection: json['connection'] == null ? null - : Metadata.fromJson(json['metadata'] as Map), + : RtcConnection.fromJson( + json['connection'] as Map), + oldRole: + $enumDecodeNullable(_$ClientRoleTypeEnumMap, json['oldRole']), + newRole: + $enumDecodeNullable(_$ClientRoleTypeEnumMap, json['newRole']), + newRoleOptions: json['newRoleOptions'] == null + ? null + : ClientRoleOptions.fromJson( + json['newRoleOptions'] as Map), ); -Map _$MetadataObserverOnMetadataReceivedJsonToJson( - MetadataObserverOnMetadataReceivedJson instance) => +Map _$RtcEngineEventHandlerOnClientRoleChangedJsonToJson( + RtcEngineEventHandlerOnClientRoleChangedJson instance) => { - 'metadata': instance.metadata?.toJson(), + 'connection': instance.connection?.toJson(), + 'oldRole': _$ClientRoleTypeEnumMap[instance.oldRole], + 'newRole': _$ClientRoleTypeEnumMap[instance.newRole], + 'newRoleOptions': instance.newRoleOptions?.toJson(), }; -DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJson - _$DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJsonFromJson( +const _$ClientRoleTypeEnumMap = { + ClientRoleType.clientRoleBroadcaster: 1, + ClientRoleType.clientRoleAudience: 2, +}; + +RtcEngineEventHandlerOnClientRoleChangeFailedJson + _$RtcEngineEventHandlerOnClientRoleChangeFailedJsonFromJson( Map json) => - DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJson( - state: $enumDecodeNullable( - _$DirectCdnStreamingStateEnumMap, json['state']), - error: $enumDecodeNullable( - _$DirectCdnStreamingErrorEnumMap, json['error']), - message: json['message'] as String?, + RtcEngineEventHandlerOnClientRoleChangeFailedJson( + connection: json['connection'] == null + ? null + : RtcConnection.fromJson( + json['connection'] as Map), + reason: $enumDecodeNullable( + _$ClientRoleChangeFailedReasonEnumMap, json['reason']), + currentRole: + $enumDecodeNullable(_$ClientRoleTypeEnumMap, json['currentRole']), ); -Map - _$DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJsonToJson( - DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJson - instance) => - { - 'state': _$DirectCdnStreamingStateEnumMap[instance.state], - 'error': _$DirectCdnStreamingErrorEnumMap[instance.error], - 'message': instance.message, - }; - -const _$DirectCdnStreamingStateEnumMap = { - DirectCdnStreamingState.directCdnStreamingStateIdle: 0, - DirectCdnStreamingState.directCdnStreamingStateRunning: 1, - DirectCdnStreamingState.directCdnStreamingStateStopped: 2, - DirectCdnStreamingState.directCdnStreamingStateFailed: 3, - DirectCdnStreamingState.directCdnStreamingStateRecovering: 4, -}; +Map _$RtcEngineEventHandlerOnClientRoleChangeFailedJsonToJson( + RtcEngineEventHandlerOnClientRoleChangeFailedJson instance) => + { + 'connection': instance.connection?.toJson(), + 'reason': _$ClientRoleChangeFailedReasonEnumMap[instance.reason], + 'currentRole': _$ClientRoleTypeEnumMap[instance.currentRole], + }; -const _$DirectCdnStreamingErrorEnumMap = { - DirectCdnStreamingError.directCdnStreamingErrorOk: 0, - DirectCdnStreamingError.directCdnStreamingErrorFailed: 1, - DirectCdnStreamingError.directCdnStreamingErrorAudioPublication: 2, - DirectCdnStreamingError.directCdnStreamingErrorVideoPublication: 3, - DirectCdnStreamingError.directCdnStreamingErrorNetConnect: 4, - DirectCdnStreamingError.directCdnStreamingErrorBadName: 5, +const _$ClientRoleChangeFailedReasonEnumMap = { + ClientRoleChangeFailedReason.clientRoleChangeFailedTooManyBroadcasters: 1, + ClientRoleChangeFailedReason.clientRoleChangeFailedNotAuthorized: 2, + ClientRoleChangeFailedReason.clientRoleChangeFailedRequestTimeOut: 3, + ClientRoleChangeFailedReason.clientRoleChangeFailedConnectionFailed: 4, }; -DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJson - _$DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJsonFromJson( +RtcEngineEventHandlerOnAudioDeviceVolumeChangedJson + _$RtcEngineEventHandlerOnAudioDeviceVolumeChangedJsonFromJson( Map json) => - DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJson( - stats: json['stats'] == null - ? null - : DirectCdnStreamingStats.fromJson( - json['stats'] as Map), + RtcEngineEventHandlerOnAudioDeviceVolumeChangedJson( + deviceType: + $enumDecodeNullable(_$MediaDeviceTypeEnumMap, json['deviceType']), + volume: json['volume'] as int?, + muted: json['muted'] as bool?, ); Map - _$DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJsonToJson( - DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJson - instance) => + _$RtcEngineEventHandlerOnAudioDeviceVolumeChangedJsonToJson( + RtcEngineEventHandlerOnAudioDeviceVolumeChangedJson instance) => { - 'stats': instance.stats?.toJson(), + 'deviceType': _$MediaDeviceTypeEnumMap[instance.deviceType], + 'volume': instance.volume, + 'muted': instance.muted, }; -AudioEncodedFrameObserverOnRecordAudioEncodedFrameJson - _$AudioEncodedFrameObserverOnRecordAudioEncodedFrameJsonFromJson( +RtcEngineEventHandlerOnRtmpStreamingStateChangedJson + _$RtcEngineEventHandlerOnRtmpStreamingStateChangedJsonFromJson( Map json) => - AudioEncodedFrameObserverOnRecordAudioEncodedFrameJson( - length: json['length'] as int?, - audioEncodedFrameInfo: json['audioEncodedFrameInfo'] == null - ? null - : EncodedAudioFrameInfo.fromJson( - json['audioEncodedFrameInfo'] as Map), + RtcEngineEventHandlerOnRtmpStreamingStateChangedJson( + url: json['url'] as String?, + state: $enumDecodeNullable( + _$RtmpStreamPublishStateEnumMap, json['state']), + errCode: $enumDecodeNullable( + _$RtmpStreamPublishErrorTypeEnumMap, json['errCode']), ); Map - _$AudioEncodedFrameObserverOnRecordAudioEncodedFrameJsonToJson( - AudioEncodedFrameObserverOnRecordAudioEncodedFrameJson instance) => + _$RtcEngineEventHandlerOnRtmpStreamingStateChangedJsonToJson( + RtcEngineEventHandlerOnRtmpStreamingStateChangedJson instance) => { - 'length': instance.length, - 'audioEncodedFrameInfo': instance.audioEncodedFrameInfo?.toJson(), + 'url': instance.url, + 'state': _$RtmpStreamPublishStateEnumMap[instance.state], + 'errCode': _$RtmpStreamPublishErrorTypeEnumMap[instance.errCode], }; -AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJson - _$AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJsonFromJson( +const _$RtmpStreamPublishStateEnumMap = { + RtmpStreamPublishState.rtmpStreamPublishStateIdle: 0, + RtmpStreamPublishState.rtmpStreamPublishStateConnecting: 1, + RtmpStreamPublishState.rtmpStreamPublishStateRunning: 2, + RtmpStreamPublishState.rtmpStreamPublishStateRecovering: 3, + RtmpStreamPublishState.rtmpStreamPublishStateFailure: 4, + RtmpStreamPublishState.rtmpStreamPublishStateDisconnecting: 5, +}; + +const _$RtmpStreamPublishErrorTypeEnumMap = { + RtmpStreamPublishErrorType.rtmpStreamPublishErrorOk: 0, + RtmpStreamPublishErrorType.rtmpStreamPublishErrorInvalidArgument: 1, + RtmpStreamPublishErrorType.rtmpStreamPublishErrorEncryptedStreamNotAllowed: 2, + RtmpStreamPublishErrorType.rtmpStreamPublishErrorConnectionTimeout: 3, + RtmpStreamPublishErrorType.rtmpStreamPublishErrorInternalServerError: 4, + RtmpStreamPublishErrorType.rtmpStreamPublishErrorRtmpServerError: 5, + RtmpStreamPublishErrorType.rtmpStreamPublishErrorTooOften: 6, + RtmpStreamPublishErrorType.rtmpStreamPublishErrorReachLimit: 7, + RtmpStreamPublishErrorType.rtmpStreamPublishErrorNotAuthorized: 8, + RtmpStreamPublishErrorType.rtmpStreamPublishErrorStreamNotFound: 9, + RtmpStreamPublishErrorType.rtmpStreamPublishErrorFormatNotSupported: 10, + RtmpStreamPublishErrorType.rtmpStreamPublishErrorNotBroadcaster: 11, + RtmpStreamPublishErrorType.rtmpStreamPublishErrorTranscodingNoMixStream: 13, + RtmpStreamPublishErrorType.rtmpStreamPublishErrorNetDown: 14, + RtmpStreamPublishErrorType.rtmpStreamPublishErrorInvalidAppid: 15, + RtmpStreamPublishErrorType.rtmpStreamPublishErrorInvalidPrivilege: 16, + RtmpStreamPublishErrorType.rtmpStreamUnpublishErrorOk: 100, +}; + +RtcEngineEventHandlerOnRtmpStreamingEventJson + _$RtcEngineEventHandlerOnRtmpStreamingEventJsonFromJson( Map json) => - AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJson( - length: json['length'] as int?, - audioEncodedFrameInfo: json['audioEncodedFrameInfo'] == null - ? null - : EncodedAudioFrameInfo.fromJson( - json['audioEncodedFrameInfo'] as Map), + RtcEngineEventHandlerOnRtmpStreamingEventJson( + url: json['url'] as String?, + eventCode: $enumDecodeNullable( + _$RtmpStreamingEventEnumMap, json['eventCode']), ); -Map _$AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJsonToJson( - AudioEncodedFrameObserverOnPlaybackAudioEncodedFrameJson instance) => +Map _$RtcEngineEventHandlerOnRtmpStreamingEventJsonToJson( + RtcEngineEventHandlerOnRtmpStreamingEventJson instance) => { - 'length': instance.length, - 'audioEncodedFrameInfo': instance.audioEncodedFrameInfo?.toJson(), + 'url': instance.url, + 'eventCode': _$RtmpStreamingEventEnumMap[instance.eventCode], }; -AudioEncodedFrameObserverOnMixedAudioEncodedFrameJson - _$AudioEncodedFrameObserverOnMixedAudioEncodedFrameJsonFromJson( +const _$RtmpStreamingEventEnumMap = { + RtmpStreamingEvent.rtmpStreamingEventFailedLoadImage: 1, + RtmpStreamingEvent.rtmpStreamingEventUrlAlreadyInUse: 2, + RtmpStreamingEvent.rtmpStreamingEventAdvancedFeatureNotSupport: 3, + RtmpStreamingEvent.rtmpStreamingEventRequestTooOften: 4, +}; + +RtcEngineEventHandlerOnTranscodingUpdatedJson + _$RtcEngineEventHandlerOnTranscodingUpdatedJsonFromJson( Map json) => - AudioEncodedFrameObserverOnMixedAudioEncodedFrameJson( - length: json['length'] as int?, - audioEncodedFrameInfo: json['audioEncodedFrameInfo'] == null - ? null - : EncodedAudioFrameInfo.fromJson( - json['audioEncodedFrameInfo'] as Map), - ); + RtcEngineEventHandlerOnTranscodingUpdatedJson(); -Map - _$AudioEncodedFrameObserverOnMixedAudioEncodedFrameJsonToJson( - AudioEncodedFrameObserverOnMixedAudioEncodedFrameJson instance) => - { - 'length': instance.length, - 'audioEncodedFrameInfo': instance.audioEncodedFrameInfo?.toJson(), - }; +Map _$RtcEngineEventHandlerOnTranscodingUpdatedJsonToJson( + RtcEngineEventHandlerOnTranscodingUpdatedJson instance) => + {}; -AudioPcmFrameSinkOnFrameJson _$AudioPcmFrameSinkOnFrameJsonFromJson( - Map json) => - AudioPcmFrameSinkOnFrameJson( - frame: json['frame'] == null - ? null - : AudioPcmFrame.fromJson(json['frame'] as Map), - ); +RtcEngineEventHandlerOnAudioRoutingChangedJson + _$RtcEngineEventHandlerOnAudioRoutingChangedJsonFromJson( + Map json) => + RtcEngineEventHandlerOnAudioRoutingChangedJson( + routing: json['routing'] as int?, + ); -Map _$AudioPcmFrameSinkOnFrameJsonToJson( - AudioPcmFrameSinkOnFrameJson instance) => +Map _$RtcEngineEventHandlerOnAudioRoutingChangedJsonToJson( + RtcEngineEventHandlerOnAudioRoutingChangedJson instance) => { - 'frame': instance.frame?.toJson(), + 'routing': instance.routing, }; -AudioFrameObserverBaseOnRecordAudioFrameJson - _$AudioFrameObserverBaseOnRecordAudioFrameJsonFromJson( +RtcEngineEventHandlerOnChannelMediaRelayStateChangedJson + _$RtcEngineEventHandlerOnChannelMediaRelayStateChangedJsonFromJson( Map json) => - AudioFrameObserverBaseOnRecordAudioFrameJson( - channelId: json['channelId'] as String?, - audioFrame: json['audioFrame'] == null - ? null - : AudioFrame.fromJson(json['audioFrame'] as Map), + RtcEngineEventHandlerOnChannelMediaRelayStateChangedJson( + state: $enumDecodeNullable( + _$ChannelMediaRelayStateEnumMap, json['state']), + code: $enumDecodeNullable( + _$ChannelMediaRelayErrorEnumMap, json['code']), ); -Map _$AudioFrameObserverBaseOnRecordAudioFrameJsonToJson( - AudioFrameObserverBaseOnRecordAudioFrameJson instance) => +Map _$RtcEngineEventHandlerOnChannelMediaRelayStateChangedJsonToJson( + RtcEngineEventHandlerOnChannelMediaRelayStateChangedJson instance) => { - 'channelId': instance.channelId, - 'audioFrame': instance.audioFrame?.toJson(), + 'state': _$ChannelMediaRelayStateEnumMap[instance.state], + 'code': _$ChannelMediaRelayErrorEnumMap[instance.code], }; -AudioFrameObserverBaseOnPlaybackAudioFrameJson - _$AudioFrameObserverBaseOnPlaybackAudioFrameJsonFromJson( +const _$ChannelMediaRelayStateEnumMap = { + ChannelMediaRelayState.relayStateIdle: 0, + ChannelMediaRelayState.relayStateConnecting: 1, + ChannelMediaRelayState.relayStateRunning: 2, + ChannelMediaRelayState.relayStateFailure: 3, +}; + +const _$ChannelMediaRelayErrorEnumMap = { + ChannelMediaRelayError.relayOk: 0, + ChannelMediaRelayError.relayErrorServerErrorResponse: 1, + ChannelMediaRelayError.relayErrorServerNoResponse: 2, + ChannelMediaRelayError.relayErrorNoResourceAvailable: 3, + ChannelMediaRelayError.relayErrorFailedJoinSrc: 4, + ChannelMediaRelayError.relayErrorFailedJoinDest: 5, + ChannelMediaRelayError.relayErrorFailedPacketReceivedFromSrc: 6, + ChannelMediaRelayError.relayErrorFailedPacketSentToDest: 7, + ChannelMediaRelayError.relayErrorServerConnectionLost: 8, + ChannelMediaRelayError.relayErrorInternalError: 9, + ChannelMediaRelayError.relayErrorSrcTokenExpired: 10, + ChannelMediaRelayError.relayErrorDestTokenExpired: 11, +}; + +RtcEngineEventHandlerOnChannelMediaRelayEventJson + _$RtcEngineEventHandlerOnChannelMediaRelayEventJsonFromJson( Map json) => - AudioFrameObserverBaseOnPlaybackAudioFrameJson( - channelId: json['channelId'] as String?, - audioFrame: json['audioFrame'] == null - ? null - : AudioFrame.fromJson(json['audioFrame'] as Map), + RtcEngineEventHandlerOnChannelMediaRelayEventJson( + code: $enumDecodeNullable( + _$ChannelMediaRelayEventEnumMap, json['code']), ); -Map _$AudioFrameObserverBaseOnPlaybackAudioFrameJsonToJson( - AudioFrameObserverBaseOnPlaybackAudioFrameJson instance) => +Map _$RtcEngineEventHandlerOnChannelMediaRelayEventJsonToJson( + RtcEngineEventHandlerOnChannelMediaRelayEventJson instance) => { - 'channelId': instance.channelId, - 'audioFrame': instance.audioFrame?.toJson(), + 'code': _$ChannelMediaRelayEventEnumMap[instance.code], }; -AudioFrameObserverBaseOnMixedAudioFrameJson - _$AudioFrameObserverBaseOnMixedAudioFrameJsonFromJson( +const _$ChannelMediaRelayEventEnumMap = { + ChannelMediaRelayEvent.relayEventNetworkDisconnected: 0, + ChannelMediaRelayEvent.relayEventNetworkConnected: 1, + ChannelMediaRelayEvent.relayEventPacketJoinedSrcChannel: 2, + ChannelMediaRelayEvent.relayEventPacketJoinedDestChannel: 3, + ChannelMediaRelayEvent.relayEventPacketSentToDestChannel: 4, + ChannelMediaRelayEvent.relayEventPacketReceivedVideoFromSrc: 5, + ChannelMediaRelayEvent.relayEventPacketReceivedAudioFromSrc: 6, + ChannelMediaRelayEvent.relayEventPacketUpdateDestChannel: 7, + ChannelMediaRelayEvent.relayEventPacketUpdateDestChannelRefused: 8, + ChannelMediaRelayEvent.relayEventPacketUpdateDestChannelNotChange: 9, + ChannelMediaRelayEvent.relayEventPacketUpdateDestChannelIsNull: 10, + ChannelMediaRelayEvent.relayEventVideoProfileUpdate: 11, + ChannelMediaRelayEvent.relayEventPauseSendPacketToDestChannelSuccess: 12, + ChannelMediaRelayEvent.relayEventPauseSendPacketToDestChannelFailed: 13, + ChannelMediaRelayEvent.relayEventResumeSendPacketToDestChannelSuccess: 14, + ChannelMediaRelayEvent.relayEventResumeSendPacketToDestChannelFailed: 15, +}; + +RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJson + _$RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJsonFromJson( Map json) => - AudioFrameObserverBaseOnMixedAudioFrameJson( - channelId: json['channelId'] as String?, - audioFrame: json['audioFrame'] == null - ? null - : AudioFrame.fromJson(json['audioFrame'] as Map), + RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJson( + isFallbackOrRecover: json['isFallbackOrRecover'] as bool?, ); -Map _$AudioFrameObserverBaseOnMixedAudioFrameJsonToJson( - AudioFrameObserverBaseOnMixedAudioFrameJson instance) => +Map _$RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJsonToJson( + RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJson instance) => { - 'channelId': instance.channelId, - 'audioFrame': instance.audioFrame?.toJson(), + 'isFallbackOrRecover': instance.isFallbackOrRecover, }; -AudioFrameObserverBaseOnEarMonitoringAudioFrameJson - _$AudioFrameObserverBaseOnEarMonitoringAudioFrameJsonFromJson( +RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJson + _$RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJsonFromJson( Map json) => - AudioFrameObserverBaseOnEarMonitoringAudioFrameJson( - audioFrame: json['audioFrame'] == null - ? null - : AudioFrame.fromJson(json['audioFrame'] as Map), + RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJson( + uid: json['uid'] as int?, + isFallbackOrRecover: json['isFallbackOrRecover'] as bool?, ); Map - _$AudioFrameObserverBaseOnEarMonitoringAudioFrameJsonToJson( - AudioFrameObserverBaseOnEarMonitoringAudioFrameJson instance) => + _$RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJsonToJson( + RtcEngineEventHandlerOnRemoteSubscribeFallbackToAudioOnlyJson + instance) => { - 'audioFrame': instance.audioFrame?.toJson(), + 'uid': instance.uid, + 'isFallbackOrRecover': instance.isFallbackOrRecover, }; -AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJson - _$AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJsonFromJson( +RtcEngineEventHandlerOnRemoteAudioTransportStatsJson + _$RtcEngineEventHandlerOnRemoteAudioTransportStatsJsonFromJson( Map json) => - AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJson( - channelId: json['channelId'] as String?, - uid: json['uid'] as int?, - audioFrame: json['audioFrame'] == null + RtcEngineEventHandlerOnRemoteAudioTransportStatsJson( + connection: json['connection'] == null ? null - : AudioFrame.fromJson(json['audioFrame'] as Map), + : RtcConnection.fromJson( + json['connection'] as Map), + remoteUid: json['remoteUid'] as int?, + delay: json['delay'] as int?, + lost: json['lost'] as int?, + rxKBitRate: json['rxKBitRate'] as int?, ); Map - _$AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJsonToJson( - AudioFrameObserverOnPlaybackAudioFrameBeforeMixingJson instance) => + _$RtcEngineEventHandlerOnRemoteAudioTransportStatsJsonToJson( + RtcEngineEventHandlerOnRemoteAudioTransportStatsJson instance) => { - 'channelId': instance.channelId, - 'uid': instance.uid, - 'audioFrame': instance.audioFrame?.toJson(), + 'connection': instance.connection?.toJson(), + 'remoteUid': instance.remoteUid, + 'delay': instance.delay, + 'lost': instance.lost, + 'rxKBitRate': instance.rxKBitRate, }; -AudioSpectrumObserverOnLocalAudioSpectrumJson - _$AudioSpectrumObserverOnLocalAudioSpectrumJsonFromJson( +RtcEngineEventHandlerOnRemoteVideoTransportStatsJson + _$RtcEngineEventHandlerOnRemoteVideoTransportStatsJsonFromJson( Map json) => - AudioSpectrumObserverOnLocalAudioSpectrumJson( - data: json['data'] == null + RtcEngineEventHandlerOnRemoteVideoTransportStatsJson( + connection: json['connection'] == null ? null - : AudioSpectrumData.fromJson( - json['data'] as Map), + : RtcConnection.fromJson( + json['connection'] as Map), + remoteUid: json['remoteUid'] as int?, + delay: json['delay'] as int?, + lost: json['lost'] as int?, + rxKBitRate: json['rxKBitRate'] as int?, ); -Map _$AudioSpectrumObserverOnLocalAudioSpectrumJsonToJson( - AudioSpectrumObserverOnLocalAudioSpectrumJson instance) => - { - 'data': instance.data?.toJson(), - }; +Map + _$RtcEngineEventHandlerOnRemoteVideoTransportStatsJsonToJson( + RtcEngineEventHandlerOnRemoteVideoTransportStatsJson instance) => + { + 'connection': instance.connection?.toJson(), + 'remoteUid': instance.remoteUid, + 'delay': instance.delay, + 'lost': instance.lost, + 'rxKBitRate': instance.rxKBitRate, + }; -AudioSpectrumObserverOnRemoteAudioSpectrumJson - _$AudioSpectrumObserverOnRemoteAudioSpectrumJsonFromJson( +RtcEngineEventHandlerOnConnectionStateChangedJson + _$RtcEngineEventHandlerOnConnectionStateChangedJsonFromJson( Map json) => - AudioSpectrumObserverOnRemoteAudioSpectrumJson( - spectrums: (json['spectrums'] as List?) - ?.map((e) => - UserAudioSpectrumInfo.fromJson(e as Map)) - .toList(), - spectrumNumber: json['spectrumNumber'] as int?, + RtcEngineEventHandlerOnConnectionStateChangedJson( + connection: json['connection'] == null + ? null + : RtcConnection.fromJson( + json['connection'] as Map), + state: + $enumDecodeNullable(_$ConnectionStateTypeEnumMap, json['state']), + reason: $enumDecodeNullable( + _$ConnectionChangedReasonTypeEnumMap, json['reason']), ); -Map _$AudioSpectrumObserverOnRemoteAudioSpectrumJsonToJson( - AudioSpectrumObserverOnRemoteAudioSpectrumJson instance) => +Map _$RtcEngineEventHandlerOnConnectionStateChangedJsonToJson( + RtcEngineEventHandlerOnConnectionStateChangedJson instance) => { - 'spectrums': instance.spectrums?.map((e) => e.toJson()).toList(), - 'spectrumNumber': instance.spectrumNumber, + 'connection': instance.connection?.toJson(), + 'state': _$ConnectionStateTypeEnumMap[instance.state], + 'reason': _$ConnectionChangedReasonTypeEnumMap[instance.reason], }; -VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJson - _$VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJsonFromJson( +const _$ConnectionStateTypeEnumMap = { + ConnectionStateType.connectionStateDisconnected: 1, + ConnectionStateType.connectionStateConnecting: 2, + ConnectionStateType.connectionStateConnected: 3, + ConnectionStateType.connectionStateReconnecting: 4, + ConnectionStateType.connectionStateFailed: 5, +}; + +const _$ConnectionChangedReasonTypeEnumMap = { + ConnectionChangedReasonType.connectionChangedConnecting: 0, + ConnectionChangedReasonType.connectionChangedJoinSuccess: 1, + ConnectionChangedReasonType.connectionChangedInterrupted: 2, + ConnectionChangedReasonType.connectionChangedBannedByServer: 3, + ConnectionChangedReasonType.connectionChangedJoinFailed: 4, + ConnectionChangedReasonType.connectionChangedLeaveChannel: 5, + ConnectionChangedReasonType.connectionChangedInvalidAppId: 6, + ConnectionChangedReasonType.connectionChangedInvalidChannelName: 7, + ConnectionChangedReasonType.connectionChangedInvalidToken: 8, + ConnectionChangedReasonType.connectionChangedTokenExpired: 9, + ConnectionChangedReasonType.connectionChangedRejectedByServer: 10, + ConnectionChangedReasonType.connectionChangedSettingProxyServer: 11, + ConnectionChangedReasonType.connectionChangedRenewToken: 12, + ConnectionChangedReasonType.connectionChangedClientIpAddressChanged: 13, + ConnectionChangedReasonType.connectionChangedKeepAliveTimeout: 14, + ConnectionChangedReasonType.connectionChangedRejoinSuccess: 15, + ConnectionChangedReasonType.connectionChangedLost: 16, + ConnectionChangedReasonType.connectionChangedEchoTest: 17, + ConnectionChangedReasonType.connectionChangedClientIpAddressChangedByUser: 18, + ConnectionChangedReasonType.connectionChangedSameUidLogin: 19, + ConnectionChangedReasonType.connectionChangedTooManyBroadcasters: 20, + ConnectionChangedReasonType.connectionChangedLicenseValidationFailure: 21, + ConnectionChangedReasonType.connectionChangedCertificationVeryfyFailure: 22, +}; + +RtcEngineEventHandlerOnWlAccMessageJson + _$RtcEngineEventHandlerOnWlAccMessageJsonFromJson( Map json) => - VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJson( - uid: json['uid'] as int?, - length: json['length'] as int?, - videoEncodedFrameInfo: json['videoEncodedFrameInfo'] == null + RtcEngineEventHandlerOnWlAccMessageJson( + connection: json['connection'] == null ? null - : EncodedVideoFrameInfo.fromJson( - json['videoEncodedFrameInfo'] as Map), + : RtcConnection.fromJson( + json['connection'] as Map), + reason: + $enumDecodeNullable(_$WlaccMessageReasonEnumMap, json['reason']), + action: + $enumDecodeNullable(_$WlaccSuggestActionEnumMap, json['action']), + wlAccMsg: json['wlAccMsg'] as String?, ); -Map _$VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJsonToJson( - VideoEncodedFrameObserverOnEncodedVideoFrameReceivedJson instance) => +Map _$RtcEngineEventHandlerOnWlAccMessageJsonToJson( + RtcEngineEventHandlerOnWlAccMessageJson instance) => { - 'uid': instance.uid, - 'length': instance.length, - 'videoEncodedFrameInfo': instance.videoEncodedFrameInfo?.toJson(), + 'connection': instance.connection?.toJson(), + 'reason': _$WlaccMessageReasonEnumMap[instance.reason], + 'action': _$WlaccSuggestActionEnumMap[instance.action], + 'wlAccMsg': instance.wlAccMsg, }; -VideoFrameObserverOnCaptureVideoFrameJson - _$VideoFrameObserverOnCaptureVideoFrameJsonFromJson( - Map json) => - VideoFrameObserverOnCaptureVideoFrameJson( - sourceType: - $enumDecodeNullable(_$VideoSourceTypeEnumMap, json['sourceType']), - videoFrame: json['videoFrame'] == null - ? null - : VideoFrame.fromJson(json['videoFrame'] as Map), - ); +const _$WlaccMessageReasonEnumMap = { + WlaccMessageReason.wlaccMessageReasonWeakSignal: 0, + WlaccMessageReason.wlaccMessageReasonChannelCongestion: 1, +}; -Map _$VideoFrameObserverOnCaptureVideoFrameJsonToJson( - VideoFrameObserverOnCaptureVideoFrameJson instance) => - { - 'sourceType': _$VideoSourceTypeEnumMap[instance.sourceType], - 'videoFrame': instance.videoFrame?.toJson(), - }; +const _$WlaccSuggestActionEnumMap = { + WlaccSuggestAction.wlaccSuggestActionCloseToWifi: 0, + WlaccSuggestAction.wlaccSuggestActionConnectSsid: 1, + WlaccSuggestAction.wlaccSuggestActionCheck5g: 2, + WlaccSuggestAction.wlaccSuggestActionModifySsid: 3, +}; -VideoFrameObserverOnPreEncodeVideoFrameJson - _$VideoFrameObserverOnPreEncodeVideoFrameJsonFromJson( +RtcEngineEventHandlerOnWlAccStatsJson + _$RtcEngineEventHandlerOnWlAccStatsJsonFromJson( Map json) => - VideoFrameObserverOnPreEncodeVideoFrameJson( - sourceType: - $enumDecodeNullable(_$VideoSourceTypeEnumMap, json['sourceType']), - videoFrame: json['videoFrame'] == null + RtcEngineEventHandlerOnWlAccStatsJson( + connection: json['connection'] == null ? null - : VideoFrame.fromJson(json['videoFrame'] as Map), + : RtcConnection.fromJson( + json['connection'] as Map), + currentStats: json['currentStats'] == null + ? null + : WlAccStats.fromJson( + json['currentStats'] as Map), + averageStats: json['averageStats'] == null + ? null + : WlAccStats.fromJson( + json['averageStats'] as Map), ); -Map _$VideoFrameObserverOnPreEncodeVideoFrameJsonToJson( - VideoFrameObserverOnPreEncodeVideoFrameJson instance) => +Map _$RtcEngineEventHandlerOnWlAccStatsJsonToJson( + RtcEngineEventHandlerOnWlAccStatsJson instance) => { - 'sourceType': _$VideoSourceTypeEnumMap[instance.sourceType], - 'videoFrame': instance.videoFrame?.toJson(), + 'connection': instance.connection?.toJson(), + 'currentStats': instance.currentStats?.toJson(), + 'averageStats': instance.averageStats?.toJson(), }; -VideoFrameObserverOnMediaPlayerVideoFrameJson - _$VideoFrameObserverOnMediaPlayerVideoFrameJsonFromJson( +RtcEngineEventHandlerOnNetworkTypeChangedJson + _$RtcEngineEventHandlerOnNetworkTypeChangedJsonFromJson( Map json) => - VideoFrameObserverOnMediaPlayerVideoFrameJson( - videoFrame: json['videoFrame'] == null + RtcEngineEventHandlerOnNetworkTypeChangedJson( + connection: json['connection'] == null ? null - : VideoFrame.fromJson(json['videoFrame'] as Map), - mediaPlayerId: json['mediaPlayerId'] as int?, + : RtcConnection.fromJson( + json['connection'] as Map), + type: $enumDecodeNullable(_$NetworkTypeEnumMap, json['type']), ); -Map _$VideoFrameObserverOnMediaPlayerVideoFrameJsonToJson( - VideoFrameObserverOnMediaPlayerVideoFrameJson instance) => +Map _$RtcEngineEventHandlerOnNetworkTypeChangedJsonToJson( + RtcEngineEventHandlerOnNetworkTypeChangedJson instance) => { - 'videoFrame': instance.videoFrame?.toJson(), - 'mediaPlayerId': instance.mediaPlayerId, + 'connection': instance.connection?.toJson(), + 'type': _$NetworkTypeEnumMap[instance.type], }; -VideoFrameObserverOnRenderVideoFrameJson - _$VideoFrameObserverOnRenderVideoFrameJsonFromJson( +const _$NetworkTypeEnumMap = { + NetworkType.networkTypeUnknown: -1, + NetworkType.networkTypeDisconnected: 0, + NetworkType.networkTypeLan: 1, + NetworkType.networkTypeWifi: 2, + NetworkType.networkTypeMobile2g: 3, + NetworkType.networkTypeMobile3g: 4, + NetworkType.networkTypeMobile4g: 5, + NetworkType.networkTypeMobile5g: 6, +}; + +RtcEngineEventHandlerOnEncryptionErrorJson + _$RtcEngineEventHandlerOnEncryptionErrorJsonFromJson( Map json) => - VideoFrameObserverOnRenderVideoFrameJson( - channelId: json['channelId'] as String?, - remoteUid: json['remoteUid'] as int?, - videoFrame: json['videoFrame'] == null + RtcEngineEventHandlerOnEncryptionErrorJson( + connection: json['connection'] == null ? null - : VideoFrame.fromJson(json['videoFrame'] as Map), + : RtcConnection.fromJson( + json['connection'] as Map), + errorType: $enumDecodeNullable( + _$EncryptionErrorTypeEnumMap, json['errorType']), ); -Map _$VideoFrameObserverOnRenderVideoFrameJsonToJson( - VideoFrameObserverOnRenderVideoFrameJson instance) => +Map _$RtcEngineEventHandlerOnEncryptionErrorJsonToJson( + RtcEngineEventHandlerOnEncryptionErrorJson instance) => { - 'channelId': instance.channelId, - 'remoteUid': instance.remoteUid, - 'videoFrame': instance.videoFrame?.toJson(), + 'connection': instance.connection?.toJson(), + 'errorType': _$EncryptionErrorTypeEnumMap[instance.errorType], }; -VideoFrameObserverOnTranscodedVideoFrameJson - _$VideoFrameObserverOnTranscodedVideoFrameJsonFromJson( +const _$EncryptionErrorTypeEnumMap = { + EncryptionErrorType.encryptionErrorInternalFailure: 0, + EncryptionErrorType.encryptionErrorDecryptionFailure: 1, + EncryptionErrorType.encryptionErrorEncryptionFailure: 2, +}; + +RtcEngineEventHandlerOnPermissionErrorJson + _$RtcEngineEventHandlerOnPermissionErrorJsonFromJson( Map json) => - VideoFrameObserverOnTranscodedVideoFrameJson( - videoFrame: json['videoFrame'] == null - ? null - : VideoFrame.fromJson(json['videoFrame'] as Map), + RtcEngineEventHandlerOnPermissionErrorJson( + permissionType: $enumDecodeNullable( + _$PermissionTypeEnumMap, json['permissionType']), ); -Map _$VideoFrameObserverOnTranscodedVideoFrameJsonToJson( - VideoFrameObserverOnTranscodedVideoFrameJson instance) => +Map _$RtcEngineEventHandlerOnPermissionErrorJsonToJson( + RtcEngineEventHandlerOnPermissionErrorJson instance) => { - 'videoFrame': instance.videoFrame?.toJson(), + 'permissionType': _$PermissionTypeEnumMap[instance.permissionType], }; -MediaRecorderObserverOnRecorderStateChangedJson - _$MediaRecorderObserverOnRecorderStateChangedJsonFromJson( +const _$PermissionTypeEnumMap = { + PermissionType.recordAudio: 0, + PermissionType.camera: 1, + PermissionType.screenCapture: 2, +}; + +RtcEngineEventHandlerOnLocalUserRegisteredJson + _$RtcEngineEventHandlerOnLocalUserRegisteredJsonFromJson( Map json) => - MediaRecorderObserverOnRecorderStateChangedJson( - channelId: json['channelId'] as String?, + RtcEngineEventHandlerOnLocalUserRegisteredJson( uid: json['uid'] as int?, - state: $enumDecodeNullable(_$RecorderStateEnumMap, json['state']), - error: $enumDecodeNullable(_$RecorderErrorCodeEnumMap, json['error']), + userAccount: json['userAccount'] as String?, ); -Map _$MediaRecorderObserverOnRecorderStateChangedJsonToJson( - MediaRecorderObserverOnRecorderStateChangedJson instance) => +Map _$RtcEngineEventHandlerOnLocalUserRegisteredJsonToJson( + RtcEngineEventHandlerOnLocalUserRegisteredJson instance) => { - 'channelId': instance.channelId, 'uid': instance.uid, - 'state': _$RecorderStateEnumMap[instance.state], - 'error': _$RecorderErrorCodeEnumMap[instance.error], + 'userAccount': instance.userAccount, }; -const _$RecorderStateEnumMap = { - RecorderState.recorderStateError: -1, - RecorderState.recorderStateStart: 2, - RecorderState.recorderStateStop: 3, -}; - -const _$RecorderErrorCodeEnumMap = { - RecorderErrorCode.recorderErrorNone: 0, - RecorderErrorCode.recorderErrorWriteFailed: 1, - RecorderErrorCode.recorderErrorNoStream: 2, - RecorderErrorCode.recorderErrorOverMaxDuration: 3, - RecorderErrorCode.recorderErrorConfigChanged: 4, -}; - -MediaRecorderObserverOnRecorderInfoUpdatedJson - _$MediaRecorderObserverOnRecorderInfoUpdatedJsonFromJson( +RtcEngineEventHandlerOnUserInfoUpdatedJson + _$RtcEngineEventHandlerOnUserInfoUpdatedJsonFromJson( Map json) => - MediaRecorderObserverOnRecorderInfoUpdatedJson( - channelId: json['channelId'] as String?, + RtcEngineEventHandlerOnUserInfoUpdatedJson( uid: json['uid'] as int?, info: json['info'] == null ? null - : RecorderInfo.fromJson(json['info'] as Map), + : UserInfo.fromJson(json['info'] as Map), ); -Map _$MediaRecorderObserverOnRecorderInfoUpdatedJsonToJson( - MediaRecorderObserverOnRecorderInfoUpdatedJson instance) => +Map _$RtcEngineEventHandlerOnUserInfoUpdatedJsonToJson( + RtcEngineEventHandlerOnUserInfoUpdatedJson instance) => { - 'channelId': instance.channelId, 'uid': instance.uid, 'info': instance.info?.toJson(), }; -MediaPlayerVideoFrameObserverOnFrameJson - _$MediaPlayerVideoFrameObserverOnFrameJsonFromJson( +RtcEngineEventHandlerOnUploadLogResultJson + _$RtcEngineEventHandlerOnUploadLogResultJsonFromJson( Map json) => - MediaPlayerVideoFrameObserverOnFrameJson( - frame: json['frame'] == null + RtcEngineEventHandlerOnUploadLogResultJson( + connection: json['connection'] == null ? null - : VideoFrame.fromJson(json['frame'] as Map), + : RtcConnection.fromJson( + json['connection'] as Map), + requestId: json['requestId'] as String?, + success: json['success'] as bool?, + reason: + $enumDecodeNullable(_$UploadErrorReasonEnumMap, json['reason']), ); -Map _$MediaPlayerVideoFrameObserverOnFrameJsonToJson( - MediaPlayerVideoFrameObserverOnFrameJson instance) => +Map _$RtcEngineEventHandlerOnUploadLogResultJsonToJson( + RtcEngineEventHandlerOnUploadLogResultJson instance) => { - 'frame': instance.frame?.toJson(), + 'connection': instance.connection?.toJson(), + 'requestId': instance.requestId, + 'success': instance.success, + 'reason': _$UploadErrorReasonEnumMap[instance.reason], }; -MediaPlayerSourceObserverOnPlayerSourceStateChangedJson - _$MediaPlayerSourceObserverOnPlayerSourceStateChangedJsonFromJson( +const _$UploadErrorReasonEnumMap = { + UploadErrorReason.uploadSuccess: 0, + UploadErrorReason.uploadNetError: 1, + UploadErrorReason.uploadServerError: 2, +}; + +RtcEngineEventHandlerOnAudioSubscribeStateChangedJson + _$RtcEngineEventHandlerOnAudioSubscribeStateChangedJsonFromJson( Map json) => - MediaPlayerSourceObserverOnPlayerSourceStateChangedJson( - state: $enumDecodeNullable(_$MediaPlayerStateEnumMap, json['state']), - ec: $enumDecodeNullable(_$MediaPlayerErrorEnumMap, json['ec']), + RtcEngineEventHandlerOnAudioSubscribeStateChangedJson( + channel: json['channel'] as String?, + uid: json['uid'] as int?, + oldState: $enumDecodeNullable( + _$StreamSubscribeStateEnumMap, json['oldState']), + newState: $enumDecodeNullable( + _$StreamSubscribeStateEnumMap, json['newState']), + elapseSinceLastState: json['elapseSinceLastState'] as int?, ); Map - _$MediaPlayerSourceObserverOnPlayerSourceStateChangedJsonToJson( - MediaPlayerSourceObserverOnPlayerSourceStateChangedJson instance) => + _$RtcEngineEventHandlerOnAudioSubscribeStateChangedJsonToJson( + RtcEngineEventHandlerOnAudioSubscribeStateChangedJson instance) => { - 'state': _$MediaPlayerStateEnumMap[instance.state], - 'ec': _$MediaPlayerErrorEnumMap[instance.ec], + 'channel': instance.channel, + 'uid': instance.uid, + 'oldState': _$StreamSubscribeStateEnumMap[instance.oldState], + 'newState': _$StreamSubscribeStateEnumMap[instance.newState], + 'elapseSinceLastState': instance.elapseSinceLastState, }; -const _$MediaPlayerStateEnumMap = { - MediaPlayerState.playerStateIdle: 0, - MediaPlayerState.playerStateOpening: 1, - MediaPlayerState.playerStateOpenCompleted: 2, - MediaPlayerState.playerStatePlaying: 3, - MediaPlayerState.playerStatePaused: 4, - MediaPlayerState.playerStatePlaybackCompleted: 5, - MediaPlayerState.playerStatePlaybackAllLoopsCompleted: 6, - MediaPlayerState.playerStateStopped: 7, - MediaPlayerState.playerStatePausingInternal: 50, - MediaPlayerState.playerStateStoppingInternal: 51, - MediaPlayerState.playerStateSeekingInternal: 52, - MediaPlayerState.playerStateGettingInternal: 53, - MediaPlayerState.playerStateNoneInternal: 54, - MediaPlayerState.playerStateDoNothingInternal: 55, - MediaPlayerState.playerStateSetTrackInternal: 56, - MediaPlayerState.playerStateFailed: 100, -}; - -const _$MediaPlayerErrorEnumMap = { - MediaPlayerError.playerErrorNone: 0, - MediaPlayerError.playerErrorInvalidArguments: -1, - MediaPlayerError.playerErrorInternal: -2, - MediaPlayerError.playerErrorNoResource: -3, - MediaPlayerError.playerErrorInvalidMediaSource: -4, - MediaPlayerError.playerErrorUnknownStreamType: -5, - MediaPlayerError.playerErrorObjNotInitialized: -6, - MediaPlayerError.playerErrorCodecNotSupported: -7, - MediaPlayerError.playerErrorVideoRenderFailed: -8, - MediaPlayerError.playerErrorInvalidState: -9, - MediaPlayerError.playerErrorUrlNotFound: -10, - MediaPlayerError.playerErrorInvalidConnectionState: -11, - MediaPlayerError.playerErrorSrcBufferUnderflow: -12, - MediaPlayerError.playerErrorInterrupted: -13, - MediaPlayerError.playerErrorNotSupported: -14, - MediaPlayerError.playerErrorTokenExpired: -15, - MediaPlayerError.playerErrorIpExpired: -16, - MediaPlayerError.playerErrorUnknown: -17, +const _$StreamSubscribeStateEnumMap = { + StreamSubscribeState.subStateIdle: 0, + StreamSubscribeState.subStateNoSubscribed: 1, + StreamSubscribeState.subStateSubscribing: 2, + StreamSubscribeState.subStateSubscribed: 3, }; -MediaPlayerSourceObserverOnPositionChangedJson - _$MediaPlayerSourceObserverOnPositionChangedJsonFromJson( +RtcEngineEventHandlerOnVideoSubscribeStateChangedJson + _$RtcEngineEventHandlerOnVideoSubscribeStateChangedJsonFromJson( Map json) => - MediaPlayerSourceObserverOnPositionChangedJson( - positionMs: json['position_ms'] as int?, + RtcEngineEventHandlerOnVideoSubscribeStateChangedJson( + channel: json['channel'] as String?, + uid: json['uid'] as int?, + oldState: $enumDecodeNullable( + _$StreamSubscribeStateEnumMap, json['oldState']), + newState: $enumDecodeNullable( + _$StreamSubscribeStateEnumMap, json['newState']), + elapseSinceLastState: json['elapseSinceLastState'] as int?, ); -Map _$MediaPlayerSourceObserverOnPositionChangedJsonToJson( - MediaPlayerSourceObserverOnPositionChangedJson instance) => - { - 'position_ms': instance.positionMs, - }; +Map + _$RtcEngineEventHandlerOnVideoSubscribeStateChangedJsonToJson( + RtcEngineEventHandlerOnVideoSubscribeStateChangedJson instance) => + { + 'channel': instance.channel, + 'uid': instance.uid, + 'oldState': _$StreamSubscribeStateEnumMap[instance.oldState], + 'newState': _$StreamSubscribeStateEnumMap[instance.newState], + 'elapseSinceLastState': instance.elapseSinceLastState, + }; -MediaPlayerSourceObserverOnPlayerEventJson - _$MediaPlayerSourceObserverOnPlayerEventJsonFromJson( +RtcEngineEventHandlerOnAudioPublishStateChangedJson + _$RtcEngineEventHandlerOnAudioPublishStateChangedJsonFromJson( Map json) => - MediaPlayerSourceObserverOnPlayerEventJson( - eventCode: - $enumDecodeNullable(_$MediaPlayerEventEnumMap, json['eventCode']), - elapsedTime: json['elapsedTime'] as int?, - message: json['message'] as String?, + RtcEngineEventHandlerOnAudioPublishStateChangedJson( + channel: json['channel'] as String?, + oldState: $enumDecodeNullable( + _$StreamPublishStateEnumMap, json['oldState']), + newState: $enumDecodeNullable( + _$StreamPublishStateEnumMap, json['newState']), + elapseSinceLastState: json['elapseSinceLastState'] as int?, ); -Map _$MediaPlayerSourceObserverOnPlayerEventJsonToJson( - MediaPlayerSourceObserverOnPlayerEventJson instance) => - { - 'eventCode': _$MediaPlayerEventEnumMap[instance.eventCode], - 'elapsedTime': instance.elapsedTime, - 'message': instance.message, - }; +Map + _$RtcEngineEventHandlerOnAudioPublishStateChangedJsonToJson( + RtcEngineEventHandlerOnAudioPublishStateChangedJson instance) => + { + 'channel': instance.channel, + 'oldState': _$StreamPublishStateEnumMap[instance.oldState], + 'newState': _$StreamPublishStateEnumMap[instance.newState], + 'elapseSinceLastState': instance.elapseSinceLastState, + }; -const _$MediaPlayerEventEnumMap = { - MediaPlayerEvent.playerEventSeekBegin: 0, - MediaPlayerEvent.playerEventSeekComplete: 1, - MediaPlayerEvent.playerEventSeekError: 2, - MediaPlayerEvent.playerEventAudioTrackChanged: 5, - MediaPlayerEvent.playerEventBufferLow: 6, - MediaPlayerEvent.playerEventBufferRecover: 7, - MediaPlayerEvent.playerEventFreezeStart: 8, - MediaPlayerEvent.playerEventFreezeStop: 9, - MediaPlayerEvent.playerEventSwitchBegin: 10, - MediaPlayerEvent.playerEventSwitchComplete: 11, - MediaPlayerEvent.playerEventSwitchError: 12, - MediaPlayerEvent.playerEventFirstDisplayed: 13, - MediaPlayerEvent.playerEventReachCacheFileMaxCount: 14, - MediaPlayerEvent.playerEventReachCacheFileMaxSize: 15, - MediaPlayerEvent.playerEventTryOpenStart: 16, - MediaPlayerEvent.playerEventTryOpenSucceed: 17, - MediaPlayerEvent.playerEventTryOpenFailed: 18, +const _$StreamPublishStateEnumMap = { + StreamPublishState.pubStateIdle: 0, + StreamPublishState.pubStateNoPublished: 1, + StreamPublishState.pubStatePublishing: 2, + StreamPublishState.pubStatePublished: 3, }; -MediaPlayerSourceObserverOnMetaDataJson - _$MediaPlayerSourceObserverOnMetaDataJsonFromJson( +RtcEngineEventHandlerOnVideoPublishStateChangedJson + _$RtcEngineEventHandlerOnVideoPublishStateChangedJsonFromJson( Map json) => - MediaPlayerSourceObserverOnMetaDataJson( - length: json['length'] as int?, + RtcEngineEventHandlerOnVideoPublishStateChangedJson( + source: $enumDecodeNullable(_$VideoSourceTypeEnumMap, json['source']), + channel: json['channel'] as String?, + oldState: $enumDecodeNullable( + _$StreamPublishStateEnumMap, json['oldState']), + newState: $enumDecodeNullable( + _$StreamPublishStateEnumMap, json['newState']), + elapseSinceLastState: json['elapseSinceLastState'] as int?, ); -Map _$MediaPlayerSourceObserverOnMetaDataJsonToJson( - MediaPlayerSourceObserverOnMetaDataJson instance) => - { - 'length': instance.length, - }; +Map + _$RtcEngineEventHandlerOnVideoPublishStateChangedJsonToJson( + RtcEngineEventHandlerOnVideoPublishStateChangedJson instance) => + { + 'source': _$VideoSourceTypeEnumMap[instance.source], + 'channel': instance.channel, + 'oldState': _$StreamPublishStateEnumMap[instance.oldState], + 'newState': _$StreamPublishStateEnumMap[instance.newState], + 'elapseSinceLastState': instance.elapseSinceLastState, + }; -MediaPlayerSourceObserverOnPlayBufferUpdatedJson - _$MediaPlayerSourceObserverOnPlayBufferUpdatedJsonFromJson( +RtcEngineEventHandlerOnExtensionEventJson + _$RtcEngineEventHandlerOnExtensionEventJsonFromJson( Map json) => - MediaPlayerSourceObserverOnPlayBufferUpdatedJson( - playCachedBuffer: json['playCachedBuffer'] as int?, + RtcEngineEventHandlerOnExtensionEventJson( + provider: json['provider'] as String?, + extension: json['extension'] as String?, + key: json['key'] as String?, + value: json['value'] as String?, ); -Map _$MediaPlayerSourceObserverOnPlayBufferUpdatedJsonToJson( - MediaPlayerSourceObserverOnPlayBufferUpdatedJson instance) => +Map _$RtcEngineEventHandlerOnExtensionEventJsonToJson( + RtcEngineEventHandlerOnExtensionEventJson instance) => { - 'playCachedBuffer': instance.playCachedBuffer, + 'provider': instance.provider, + 'extension': instance.extension, + 'key': instance.key, + 'value': instance.value, }; -MediaPlayerSourceObserverOnPreloadEventJson - _$MediaPlayerSourceObserverOnPreloadEventJsonFromJson( +RtcEngineEventHandlerOnExtensionStartedJson + _$RtcEngineEventHandlerOnExtensionStartedJsonFromJson( Map json) => - MediaPlayerSourceObserverOnPreloadEventJson( - src: json['src'] as String?, - event: - $enumDecodeNullable(_$PlayerPreloadEventEnumMap, json['event']), + RtcEngineEventHandlerOnExtensionStartedJson( + provider: json['provider'] as String?, + extension: json['extension'] as String?, ); -Map _$MediaPlayerSourceObserverOnPreloadEventJsonToJson( - MediaPlayerSourceObserverOnPreloadEventJson instance) => +Map _$RtcEngineEventHandlerOnExtensionStartedJsonToJson( + RtcEngineEventHandlerOnExtensionStartedJson instance) => { - 'src': instance.src, - 'event': _$PlayerPreloadEventEnumMap[instance.event], + 'provider': instance.provider, + 'extension': instance.extension, }; -const _$PlayerPreloadEventEnumMap = { - PlayerPreloadEvent.playerPreloadEventBegin: 0, - PlayerPreloadEvent.playerPreloadEventComplete: 1, - PlayerPreloadEvent.playerPreloadEventError: 2, -}; - -MediaPlayerSourceObserverOnCompletedJson - _$MediaPlayerSourceObserverOnCompletedJsonFromJson( - Map json) => - MediaPlayerSourceObserverOnCompletedJson(); - -Map _$MediaPlayerSourceObserverOnCompletedJsonToJson( - MediaPlayerSourceObserverOnCompletedJson instance) => - {}; - -MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJson - _$MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJsonFromJson( +RtcEngineEventHandlerOnExtensionStoppedJson + _$RtcEngineEventHandlerOnExtensionStoppedJsonFromJson( Map json) => - MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJson(); + RtcEngineEventHandlerOnExtensionStoppedJson( + provider: json['provider'] as String?, + extension: json['extension'] as String?, + ); -Map - _$MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJsonToJson( - MediaPlayerSourceObserverOnAgoraCDNTokenWillExpireJson instance) => - {}; +Map _$RtcEngineEventHandlerOnExtensionStoppedJsonToJson( + RtcEngineEventHandlerOnExtensionStoppedJson instance) => + { + 'provider': instance.provider, + 'extension': instance.extension, + }; -MediaPlayerSourceObserverOnPlayerSrcInfoChangedJson - _$MediaPlayerSourceObserverOnPlayerSrcInfoChangedJsonFromJson( +RtcEngineEventHandlerOnExtensionErrorJson + _$RtcEngineEventHandlerOnExtensionErrorJsonFromJson( Map json) => - MediaPlayerSourceObserverOnPlayerSrcInfoChangedJson( - from: json['from'] == null - ? null - : SrcInfo.fromJson(json['from'] as Map), - to: json['to'] == null - ? null - : SrcInfo.fromJson(json['to'] as Map), + RtcEngineEventHandlerOnExtensionErrorJson( + provider: json['provider'] as String?, + extension: json['extension'] as String?, + error: json['error'] as int?, + message: json['message'] as String?, ); -Map - _$MediaPlayerSourceObserverOnPlayerSrcInfoChangedJsonToJson( - MediaPlayerSourceObserverOnPlayerSrcInfoChangedJson instance) => - { - 'from': instance.from?.toJson(), - 'to': instance.to?.toJson(), - }; +Map _$RtcEngineEventHandlerOnExtensionErrorJsonToJson( + RtcEngineEventHandlerOnExtensionErrorJson instance) => + { + 'provider': instance.provider, + 'extension': instance.extension, + 'error': instance.error, + 'message': instance.message, + }; -MediaPlayerSourceObserverOnPlayerInfoUpdatedJson - _$MediaPlayerSourceObserverOnPlayerInfoUpdatedJsonFromJson( +RtcEngineEventHandlerOnUserAccountUpdatedJson + _$RtcEngineEventHandlerOnUserAccountUpdatedJsonFromJson( Map json) => - MediaPlayerSourceObserverOnPlayerInfoUpdatedJson( - info: json['info'] == null + RtcEngineEventHandlerOnUserAccountUpdatedJson( + connection: json['connection'] == null ? null - : PlayerUpdatedInfo.fromJson( - json['info'] as Map), + : RtcConnection.fromJson( + json['connection'] as Map), + remoteUid: json['remoteUid'] as int?, + userAccount: json['userAccount'] as String?, ); -Map _$MediaPlayerSourceObserverOnPlayerInfoUpdatedJsonToJson( - MediaPlayerSourceObserverOnPlayerInfoUpdatedJson instance) => +Map _$RtcEngineEventHandlerOnUserAccountUpdatedJsonToJson( + RtcEngineEventHandlerOnUserAccountUpdatedJson instance) => { - 'info': instance.info?.toJson(), + 'connection': instance.connection?.toJson(), + 'remoteUid': instance.remoteUid, + 'userAccount': instance.userAccount, }; -MediaPlayerSourceObserverOnAudioVolumeIndicationJson - _$MediaPlayerSourceObserverOnAudioVolumeIndicationJsonFromJson( +RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson + _$RtcEngineEventHandlerOnLocalVideoTranscoderErrorJsonFromJson( Map json) => - MediaPlayerSourceObserverOnAudioVolumeIndicationJson( - volume: json['volume'] as int?, + RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson( + stream: json['stream'] == null + ? null + : TranscodingVideoStream.fromJson( + json['stream'] as Map), + error: + $enumDecodeNullable(_$VideoTranscoderErrorEnumMap, json['error']), ); Map - _$MediaPlayerSourceObserverOnAudioVolumeIndicationJsonToJson( - MediaPlayerSourceObserverOnAudioVolumeIndicationJson instance) => + _$RtcEngineEventHandlerOnLocalVideoTranscoderErrorJsonToJson( + RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson instance) => { - 'volume': instance.volume, + 'stream': instance.stream?.toJson(), + 'error': _$VideoTranscoderErrorEnumMap[instance.error], }; -MusicContentCenterEventHandlerOnMusicChartsResultJson - _$MusicContentCenterEventHandlerOnMusicChartsResultJsonFromJson( +const _$VideoTranscoderErrorEnumMap = { + VideoTranscoderError.vtErrOk: 0, + VideoTranscoderError.vtErrVideoSourceNotReady: 1, + VideoTranscoderError.vtErrInvalidVideoSourceType: 2, + VideoTranscoderError.vtErrInvalidImagePath: 3, + VideoTranscoderError.vtErrUnsupportImageFormat: 4, + VideoTranscoderError.vtErrInvalidLayout: 5, + VideoTranscoderError.vtErrInternal: 20, +}; + +RtcEngineEventHandlerOnVideoRenderingTracingResultJson + _$RtcEngineEventHandlerOnVideoRenderingTracingResultJsonFromJson( Map json) => - MusicContentCenterEventHandlerOnMusicChartsResultJson( - requestId: json['requestId'] as String?, - result: (json['result'] as List?) - ?.map((e) => MusicChartInfo.fromJson(e as Map)) - .toList(), - errorCode: $enumDecodeNullable( - _$MusicContentCenterStatusCodeEnumMap, json['errorCode']), + RtcEngineEventHandlerOnVideoRenderingTracingResultJson( + connection: json['connection'] == null + ? null + : RtcConnection.fromJson( + json['connection'] as Map), + uid: json['uid'] as int?, + currentEvent: $enumDecodeNullable( + _$MediaTraceEventEnumMap, json['currentEvent']), + tracingInfo: json['tracingInfo'] == null + ? null + : VideoRenderingTracingInfo.fromJson( + json['tracingInfo'] as Map), ); Map - _$MusicContentCenterEventHandlerOnMusicChartsResultJsonToJson( - MusicContentCenterEventHandlerOnMusicChartsResultJson instance) => + _$RtcEngineEventHandlerOnVideoRenderingTracingResultJsonToJson( + RtcEngineEventHandlerOnVideoRenderingTracingResultJson instance) => { - 'requestId': instance.requestId, - 'result': instance.result?.map((e) => e.toJson()).toList(), - 'errorCode': - _$MusicContentCenterStatusCodeEnumMap[instance.errorCode], + 'connection': instance.connection?.toJson(), + 'uid': instance.uid, + 'currentEvent': _$MediaTraceEventEnumMap[instance.currentEvent], + 'tracingInfo': instance.tracingInfo?.toJson(), }; -const _$MusicContentCenterStatusCodeEnumMap = { - MusicContentCenterStatusCode.kMusicContentCenterStatusOk: 0, - MusicContentCenterStatusCode.kMusicContentCenterStatusErr: 1, - MusicContentCenterStatusCode.kMusicContentCenterStatusErrGateway: 2, - MusicContentCenterStatusCode - .kMusicContentCenterStatusErrPermissionAndResource: 3, - MusicContentCenterStatusCode.kMusicContentCenterStatusErrInternalDataParse: 4, - MusicContentCenterStatusCode.kMusicContentCenterStatusErrMusicLoading: 5, - MusicContentCenterStatusCode.kMusicContentCenterStatusErrMusicDecryption: 6, +const _$MediaTraceEventEnumMap = { + MediaTraceEvent.mediaTraceEventVideoRendered: 0, + MediaTraceEvent.mediaTraceEventVideoDecoded: 1, }; -MusicContentCenterEventHandlerOnMusicCollectionResultJson - _$MusicContentCenterEventHandlerOnMusicCollectionResultJsonFromJson( +MetadataObserverOnMetadataReceivedJson + _$MetadataObserverOnMetadataReceivedJsonFromJson( Map json) => - MusicContentCenterEventHandlerOnMusicCollectionResultJson( - requestId: json['requestId'] as String?, - errorCode: $enumDecodeNullable( - _$MusicContentCenterStatusCodeEnumMap, json['errorCode']), + MetadataObserverOnMetadataReceivedJson( + metadata: json['metadata'] == null + ? null + : Metadata.fromJson(json['metadata'] as Map), ); -Map _$MusicContentCenterEventHandlerOnMusicCollectionResultJsonToJson( - MusicContentCenterEventHandlerOnMusicCollectionResultJson instance) => +Map _$MetadataObserverOnMetadataReceivedJsonToJson( + MetadataObserverOnMetadataReceivedJson instance) => { - 'requestId': instance.requestId, - 'errorCode': _$MusicContentCenterStatusCodeEnumMap[instance.errorCode], + 'metadata': instance.metadata?.toJson(), }; -MusicContentCenterEventHandlerOnLyricResultJson - _$MusicContentCenterEventHandlerOnLyricResultJsonFromJson( +DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJson + _$DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJsonFromJson( Map json) => - MusicContentCenterEventHandlerOnLyricResultJson( - requestId: json['requestId'] as String?, - songCode: json['songCode'] as int?, - lyricUrl: json['lyricUrl'] as String?, - errorCode: $enumDecodeNullable( - _$MusicContentCenterStatusCodeEnumMap, json['errorCode']), + DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJson( + state: $enumDecodeNullable( + _$DirectCdnStreamingStateEnumMap, json['state']), + error: $enumDecodeNullable( + _$DirectCdnStreamingErrorEnumMap, json['error']), + message: json['message'] as String?, ); -Map _$MusicContentCenterEventHandlerOnLyricResultJsonToJson( - MusicContentCenterEventHandlerOnLyricResultJson instance) => - { - 'requestId': instance.requestId, - 'songCode': instance.songCode, - 'lyricUrl': instance.lyricUrl, - 'errorCode': _$MusicContentCenterStatusCodeEnumMap[instance.errorCode], - }; +Map + _$DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJsonToJson( + DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJson + instance) => + { + 'state': _$DirectCdnStreamingStateEnumMap[instance.state], + 'error': _$DirectCdnStreamingErrorEnumMap[instance.error], + 'message': instance.message, + }; -MusicContentCenterEventHandlerOnSongSimpleInfoResultJson - _$MusicContentCenterEventHandlerOnSongSimpleInfoResultJsonFromJson( - Map json) => - MusicContentCenterEventHandlerOnSongSimpleInfoResultJson( - requestId: json['requestId'] as String?, - songCode: json['songCode'] as int?, - simpleInfo: json['simpleInfo'] as String?, - errorCode: $enumDecodeNullable( - _$MusicContentCenterStatusCodeEnumMap, json['errorCode']), - ); +const _$DirectCdnStreamingStateEnumMap = { + DirectCdnStreamingState.directCdnStreamingStateIdle: 0, + DirectCdnStreamingState.directCdnStreamingStateRunning: 1, + DirectCdnStreamingState.directCdnStreamingStateStopped: 2, + DirectCdnStreamingState.directCdnStreamingStateFailed: 3, + DirectCdnStreamingState.directCdnStreamingStateRecovering: 4, +}; -Map _$MusicContentCenterEventHandlerOnSongSimpleInfoResultJsonToJson( - MusicContentCenterEventHandlerOnSongSimpleInfoResultJson instance) => - { - 'requestId': instance.requestId, - 'songCode': instance.songCode, - 'simpleInfo': instance.simpleInfo, - 'errorCode': _$MusicContentCenterStatusCodeEnumMap[instance.errorCode], - }; +const _$DirectCdnStreamingErrorEnumMap = { + DirectCdnStreamingError.directCdnStreamingErrorOk: 0, + DirectCdnStreamingError.directCdnStreamingErrorFailed: 1, + DirectCdnStreamingError.directCdnStreamingErrorAudioPublication: 2, + DirectCdnStreamingError.directCdnStreamingErrorVideoPublication: 3, + DirectCdnStreamingError.directCdnStreamingErrorNetConnect: 4, + DirectCdnStreamingError.directCdnStreamingErrorBadName: 5, +}; -MusicContentCenterEventHandlerOnPreLoadEventJson - _$MusicContentCenterEventHandlerOnPreLoadEventJsonFromJson( +DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJson + _$DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJsonFromJson( Map json) => - MusicContentCenterEventHandlerOnPreLoadEventJson( - requestId: json['requestId'] as String?, - songCode: json['songCode'] as int?, - percent: json['percent'] as int?, - lyricUrl: json['lyricUrl'] as String?, - status: - $enumDecodeNullable(_$PreloadStatusCodeEnumMap, json['status']), - errorCode: $enumDecodeNullable( - _$MusicContentCenterStatusCodeEnumMap, json['errorCode']), + DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJson( + stats: json['stats'] == null + ? null + : DirectCdnStreamingStats.fromJson( + json['stats'] as Map), ); -Map _$MusicContentCenterEventHandlerOnPreLoadEventJsonToJson( - MusicContentCenterEventHandlerOnPreLoadEventJson instance) => - { - 'requestId': instance.requestId, - 'songCode': instance.songCode, - 'percent': instance.percent, - 'lyricUrl': instance.lyricUrl, - 'status': _$PreloadStatusCodeEnumMap[instance.status], - 'errorCode': _$MusicContentCenterStatusCodeEnumMap[instance.errorCode], - }; - -const _$PreloadStatusCodeEnumMap = { - PreloadStatusCode.kPreloadStatusCompleted: 0, - PreloadStatusCode.kPreloadStatusFailed: 1, - PreloadStatusCode.kPreloadStatusPreloading: 2, - PreloadStatusCode.kPreloadStatusRemoved: 3, -}; +Map + _$DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJsonToJson( + DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJson + instance) => + { + 'stats': instance.stats?.toJson(), + }; diff --git a/lib/src/binding/impl_forward_export.dart b/lib/src/binding/impl_forward_export.dart index e58445ebe..c54909a5c 100644 --- a/lib/src/binding/impl_forward_export.dart +++ b/lib/src/binding/impl_forward_export.dart @@ -1,5 +1,3 @@ -export 'agora_rtc_engine_impl.dart'; -export 'agora_rtc_engine_event_impl.dart'; export 'agora_base_event_impl.dart'; export 'agora_media_base_event_impl.dart'; export 'agora_media_engine_impl.dart'; @@ -7,11 +5,13 @@ export 'agora_media_player_impl.dart'; export 'agora_media_player_event_impl.dart'; export 'agora_media_player_source_event_impl.dart'; export 'agora_media_recorder_impl.dart'; -export 'agora_spatial_audio_impl.dart'; -export 'agora_rtc_engine_ex_impl.dart'; -export 'audio_device_manager_impl.dart'; export 'agora_music_content_center_impl.dart'; export 'agora_music_content_center_event_impl.dart'; +export 'agora_rtc_engine_impl.dart'; +export 'agora_rtc_engine_event_impl.dart'; +export 'agora_rtc_engine_ex_impl.dart'; +export 'agora_spatial_audio_impl.dart'; +export 'audio_device_manager_impl.dart'; export 'event_handler_param_json.dart'; export 'call_api_impl_params_json.dart'; export 'call_api_event_handler_buffer_ext.dart'; diff --git a/lib/src/binding_forward_export.dart b/lib/src/binding_forward_export.dart index d199e9323..76d233299 100644 --- a/lib/src/binding_forward_export.dart +++ b/lib/src/binding_forward_export.dart @@ -1,4 +1,3 @@ -export 'agora_rtc_engine.dart'; export 'agora_base.dart'; export 'agora_media_base.dart'; export 'agora_media_player_types.dart'; @@ -8,11 +7,12 @@ export 'agora_media_player.dart'; export 'agora_media_player_source.dart'; export 'agora_media_recorder.dart'; export 'agora_media_streaming_source.dart'; -export 'agora_spatial_audio.dart'; +export 'agora_music_content_center.dart'; +export 'agora_rhythm_player.dart'; +export 'agora_rtc_engine.dart'; export 'agora_rtc_engine_ex.dart'; +export 'agora_spatial_audio.dart'; export 'audio_device_manager.dart'; -export 'agora_rhythm_player.dart'; -export 'agora_music_content_center.dart'; export 'dart:convert'; export 'dart:typed_data'; export 'package:json_annotation/json_annotation.dart'; diff --git a/lib/src/impl/agora_media_engine_impl_override.dart b/lib/src/impl/agora_media_engine_impl_override.dart index 1d3407198..ad84fe6ba 100644 --- a/lib/src/impl/agora_media_engine_impl_override.dart +++ b/lib/src/impl/agora_media_engine_impl_override.dart @@ -116,11 +116,14 @@ class MediaEngineImpl extends media_engine_impl_binding.MediaEngineImpl json['metadata_buffer'] = 0; final param = createParams({'frame': json, 'videoTrackId': videoTrackId}); final List buffers = []; - // This is a little tricky that the buffers length must be 3 + // This is a little tricky that the buffers length must be 5 buffers.add(frame.buffer ?? Uint8List.fromList([])); buffers.add(Uint8List.fromList([])); buffers.add(frame.metadataBuffer ?? Uint8List.fromList([])); buffers.add(frame.alphaBuffer ?? Uint8List.fromList([])); + // This position should add the `d3d11_texture_2d`, but it's not suppoted on Flutter, + // so add a empty placeholder here. + buffers.add(Uint8List.fromList([])); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); 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 7b451b521..7bdf2f902 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 @@ -505,6 +505,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 int frameTextureSliceIndex = 10; final ExternalVideoFrame frame = ExternalVideoFrame( type: frameType, format: frameFormat, @@ -523,6 +524,7 @@ void mediaEngineSmokeTestCases() { metadataBuffer: frameMetadataBuffer, metadataSize: frameMetadataSize, alphaBuffer: frameAlphaBuffer, + textureSliceIndex: frameTextureSliceIndex, ); const int videoTrackId = 10; await mediaEngine.pushVideoFrame( diff --git a/test_shard/fake_test_app/integration_test/generated/musiccontentcenter_fake_test.generated.dart b/test_shard/fake_test_app/integration_test/generated/musiccontentcenter_fake_test.generated.dart index 17f86e50e..b4ade0ff9 100644 --- a/test_shard/fake_test_app/integration_test/generated/musiccontentcenter_fake_test.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/musiccontentcenter_fake_test.generated.dart @@ -29,12 +29,14 @@ void musicContentCenterSmokeTestCases() { const String configurationToken = "hello"; const int configurationMccUid = 10; const int configurationMaxCacheSize = 10; + const String configurationMccDomain = "hello"; const MusicContentCenterConfiguration configuration = MusicContentCenterConfiguration( appId: configurationAppId, token: configurationToken, mccUid: configurationMccUid, maxCacheSize: configurationMaxCacheSize, + mccDomain: configurationMccDomain, ); await musicContentCenter.initialize( configuration, 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 5a66381c6..7def19152 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 @@ -9422,10 +9422,12 @@ void rtcEngineSmokeTestCases() { try { const bool enabled = true; const String configExtraInfo = "hello"; + const String configServerConfig = "hello"; const List configModules = []; const int configModuleCount = 10; const ContentInspectConfig config = ContentInspectConfig( extraInfo: configExtraInfo, + serverConfig: configServerConfig, modules: configModules, moduleCount: configModuleCount, ); @@ -9884,6 +9886,39 @@ void rtcEngineSmokeTestCases() { }, ); + testWidgets( + 'isFeatureAvailableOnDevice', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + + try { + const FeatureType type = FeatureType.videoVirtualBackground; + await rtcEngine.isFeatureAvailableOnDevice( + type, + ); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint('[isFeatureAvailableOnDevice] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await rtcEngine.release(); + }, + ); + testWidgets( 'getAudioDeviceManager', (WidgetTester tester) async { 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 7e209f5f1..17371b5f5 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 @@ -2071,6 +2071,58 @@ void rtcEngineExSmokeTestCases() { // skip: !(), ); + testWidgets( + 'enableContentInspectEx', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngineEx rtcEngineEx = createAgoraRtcEngineEx(); + await rtcEngineEx.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + + try { + const bool enabled = true; + const String configExtraInfo = "hello"; + const String configServerConfig = "hello"; + const List configModules = []; + const int configModuleCount = 10; + const ContentInspectConfig config = ContentInspectConfig( + extraInfo: configExtraInfo, + serverConfig: configServerConfig, + modules: configModules, + moduleCount: configModuleCount, + ); + const String connectionChannelId = "hello"; + const int connectionLocalUid = 10; + const RtcConnection connection = RtcConnection( + channelId: connectionChannelId, + localUid: connectionLocalUid, + ); + await rtcEngineEx.enableContentInspectEx( + enabled: enabled, + config: config, + connection: connection, + ); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint('[enableContentInspectEx] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await rtcEngineEx.release(); + }, +// skip: !(), + ); + testWidgets( 'startMediaRenderingTracingEx', (WidgetTester tester) async { diff --git a/tool/terra/terra_config_main.yaml b/tool/terra/terra_config_main.yaml index e085d4030..63ca1df7e 100644 --- a/tool/terra/terra_config_main.yaml +++ b/tool/terra/terra_config_main.yaml @@ -1,4 +1,4 @@ -include: shared:rtc_4.2.2/shared_configs.yaml +include: shared:rtc_4.2.3/shared_configs.yaml language: dart