Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/run_update_deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
description: 'Target branch to compare against. If a branch name, will compare directly against it. If a commit hash or tag, a new branch named "special/<pub_version>" will be created from that ref. The pub_version will be either the input pub_version or latest version from target branch pubspec.yaml. Defaults to "main".'
type: string
required: false
default: 'main'
default: ''
pub_version:
description: 'Target pub version to update dependencies to. If empty, will use the latest version from target branch pubspec.yaml.'
type: string
Expand Down Expand Up @@ -124,9 +124,12 @@ jobs:
rtc_version="${{ inputs.code_gen_public_headers }}"
echo "Using explicitly provided version: ${rtc_version}"
else
dependencies_json='${{ steps.parse_dependencies_content.outputs.matches }}'
# The output is a stringified JSON, we need to parse it first
dependencies_raw='${{ steps.parse_dependencies_content.outputs.matches }}'
# Remove outer quotes and unescape inner quotes
dependencies_json=$(echo "$dependencies_raw" | sed 's/^"//;s/"$//' | sed 's/\\"/"/g')

if [ -n "$dependencies_json" ] && [ "$dependencies_json" != "null" ]; then
if [ -n "$dependencies_json" ] && [ "$dependencies_json" != "null" ] && [ "$dependencies_json" != "" ]; then
# Extract version from platform objects (priority: Windows > iOS > macOS > Android)
version=$(echo "$dependencies_json" | jq -r '.[] | select(.platform == "Windows") | .version' | head -n1)
[ -z "$version" ] && version=$(echo "$dependencies_json" | jq -r '.[] | select(.platform == "iOS") | .version' | head -n1)
Expand Down
5 changes: 2 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,11 @@ dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
} else {
// iris dependencies start
api 'io.agora.rtc:iris-rtc:4.2.6.20-build.1'
api 'io.agora.rtc:iris-rtc-audio:4.2.7.128-build.4'
// iris dependencies end

// native dependencies start
api 'io.agora.rtc:agora-special-full:4.2.6.20'
api 'io.agora.rtc:full-screen-sharing:4.2.6.20'
api 'io.agora.rtc:agora-special-voice:4.2.7.128.MINI.AUDIO'
// native dependencies end
}
}
Expand Down
88 changes: 49 additions & 39 deletions lib/src/agora_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ enum ChannelProfileType {
@JsonValue(0)
channelProfileCommunication,

/// 1: Live streaming. Live streaming. Use this profile when there are more than two users in the channel.
/// 1: Live streaming. Use this profile when there are more than two users in the channel.
@JsonValue(1)
channelProfileLiveBroadcasting,

/// 2: Gaming. This profile is deprecated.
/// 2: Gaming.
@JsonValue(2)
channelProfileGame,

Expand Down Expand Up @@ -525,23 +525,23 @@ extension LicenseErrorTypeExt on LicenseErrorType {
/// The operation permissions of the SDK on the audio session.
@JsonEnum(alwaysCreate: true)
enum AudioSessionOperationRestriction {
/// No restriction, the SDK can change the audio session.
/// 0: No restriction, the SDK can change the audio session.
@JsonValue(0)
audioSessionOperationRestrictionNone,

/// The SDK cannot change the audio session category.
/// 1: The SDK cannot change the audio session category.
@JsonValue(1)
audioSessionOperationRestrictionSetCategory,

/// The SDK cannot change the audio session category, mode, or categoryOptions.
/// 2: The SDK cannot change the audio session category, mode, or categoryOptions.
@JsonValue(1 << 1)
audioSessionOperationRestrictionConfigureSession,

/// The SDK keeps the audio session active when the user leaves the channel, for example, to play an audio file in the background.
/// 4: The SDK keeps the audio session active when the user leaves the channel, for example, to play an audio file in the background.
@JsonValue(1 << 2)
audioSessionOperationRestrictionDeactivateSession,

/// Completely restricts the operation permissions of the SDK on the audio session; the SDK cannot change the audio session.
/// 128: Completely restricts the operation permissions of the SDK on the audio session; the SDK cannot change the audio session.
@JsonValue(1 << 7)
audioSessionOperationRestrictionAll,
}
Expand Down Expand Up @@ -779,31 +779,31 @@ extension VideoOrientationExt on VideoOrientation {
/// The video frame rate.
@JsonEnum(alwaysCreate: true)
enum FrameRate {
/// 1: 1 fps
/// 1: 1 fps.
@JsonValue(1)
frameRateFps1,

/// 7: 7 fps
/// 7: 7 fps.
@JsonValue(7)
frameRateFps7,

/// 10: 10 fps
/// 10: 10 fps.
@JsonValue(10)
frameRateFps10,

/// 15: 15 fps
/// 15: 15 fps.
@JsonValue(15)
frameRateFps15,

/// 24: 24 fps
/// 24: 24 fps.
@JsonValue(24)
frameRateFps24,

/// 30: 30 fps
/// 30: 30 fps.
@JsonValue(30)
frameRateFps30,

/// 60: 60 fps For Windows and macOS only.
/// 60: 60 fps. For Windows and macOS only.
@JsonValue(60)
frameRateFps60,
}
Expand Down Expand Up @@ -1244,47 +1244,47 @@ extension AudioCodecTypeExt on AudioCodecType {
/// Audio encoding type.
@JsonEnum(alwaysCreate: true)
enum AudioEncodingType {
/// AAC encoding format, 16000 Hz sampling rate, bass quality. A file with an audio duration of 10 minutes is approximately 1.2 MB after encoding.
/// 0x010101: AAC encoding format, 16000 Hz sampling rate, bass quality. A file with an audio duration of 10 minutes is approximately 1.2 MB after encoding.
@JsonValue(0x010101)
audioEncodingTypeAac16000Low,

/// AAC encoding format, 16000 Hz sampling rate, medium sound quality. A file with an audio duration of 10 minutes is approximately 2 MB after encoding.
/// 0x010102: AAC encoding format, 16000 Hz sampling rate, medium sound quality. A file with an audio duration of 10 minutes is approximately 2 MB after encoding.
@JsonValue(0x010102)
audioEncodingTypeAac16000Medium,

/// AAC encoding format, 32000 Hz sampling rate, bass quality. A file with an audio duration of 10 minutes is approximately 1.2 MB after encoding.
/// 0x010201: AAC encoding format, 32000 Hz sampling rate, bass quality. A file with an audio duration of 10 minutes is approximately 1.2 MB after encoding.
@JsonValue(0x010201)
audioEncodingTypeAac32000Low,

/// AAC encoding format, 32000 Hz sampling rate, medium sound quality. A file with an audio duration of 10 minutes is approximately 2 MB after encoding.
/// 0x010202: AAC encoding format, 32000 Hz sampling rate, medium sound quality. A file with an audio duration of 10 minutes is approximately 2 MB after encoding.
@JsonValue(0x010202)
audioEncodingTypeAac32000Medium,

/// AAC encoding format, 32000 Hz sampling rate, high sound quality. A file with an audio duration of 10 minutes is approximately 3.5 MB after encoding.
/// 0x010203: AAC encoding format, 32000 Hz sampling rate, high sound quality. A file with an audio duration of 10 minutes is approximately 3.5 MB after encoding.
@JsonValue(0x010203)
audioEncodingTypeAac32000High,

/// AAC encoding format, 48000 Hz sampling rate, medium sound quality. A file with an audio duration of 10 minutes is approximately 2 MB after encoding.
/// 0x010302: AAC encoding format, 48000 Hz sampling rate, medium sound quality. A file with an audio duration of 10 minutes is approximately 2 MB after encoding.
@JsonValue(0x010302)
audioEncodingTypeAac48000Medium,

/// AAC encoding format, 48000 Hz sampling rate, high sound quality. A file with an audio duration of 10 minutes is approximately 3.5 MB after encoding.
/// 0x010303: AAC encoding format, 48000 Hz sampling rate, high sound quality. A file with an audio duration of 10 minutes is approximately 3.5 MB after encoding.
@JsonValue(0x010303)
audioEncodingTypeAac48000High,

/// OPUS encoding format, 16000 Hz sampling rate, bass quality. A file with an audio duration of 10 minutes is approximately 2 MB after encoding.
/// 0x020101: OPUS encoding format, 16000 Hz sampling rate, bass quality. A file with an audio duration of 10 minutes is approximately 2 MB after encoding.
@JsonValue(0x020101)
audioEncodingTypeOpus16000Low,

/// OPUS encoding format, 16000 Hz sampling rate, medium sound quality. A file with an audio duration of 10 minutes is approximately 2 MB after encoding.
/// 0x020102: OPUS encoding format, 16000 Hz sampling rate, medium sound quality. A file with an audio duration of 10 minutes is approximately 2 MB after encoding.
@JsonValue(0x020102)
audioEncodingTypeOpus16000Medium,

/// OPUS encoding format, 48000 Hz sampling rate, medium sound quality. A file with an audio duration of 10 minutes is approximately 2 MB after encoding.
/// 0x020302: OPUS encoding format, 48000 Hz sampling rate, medium sound quality. A file with an audio duration of 10 minutes is approximately 2 MB after encoding.
@JsonValue(0x020302)
audioEncodingTypeOpus48000Medium,

/// OPUS encoding format, 48000 Hz sampling rate, high sound quality. A file with an audio duration of 10 minutes is approximately 3.5 MB after encoding.
/// 0x020303: OPUS encoding format, 48000 Hz sampling rate, high sound quality. A file with an audio duration of 10 minutes is approximately 3.5 MB after encoding.
@JsonValue(0x020303)
audioEncodingTypeOpus48000High,
}
Expand All @@ -1305,11 +1305,11 @@ extension AudioEncodingTypeExt on AudioEncodingType {
/// The adaptation mode of the watermark.
@JsonEnum(alwaysCreate: true)
enum WatermarkFitMode {
/// Use the positionInLandscapeMode and positionInPortraitMode values you set in WatermarkOptions. The settings in WatermarkRatio are invalid.
/// 0: Use the positionInLandscapeMode and positionInPortraitMode values you set in WatermarkOptions. The settings in WatermarkRatio are invalid.
@JsonValue(0)
fitModeCoverPosition,

/// Use the value you set in WatermarkRatio. The settings in positionInLandscapeMode and positionInPortraitMode in WatermarkOptions are invalid.
/// 1: Use the value you set in WatermarkRatio. The settings in positionInLandscapeMode and positionInPortraitMode in WatermarkOptions are invalid.
@JsonValue(1)
fitModeUseImageRatio,
}
Expand Down Expand Up @@ -1462,11 +1462,11 @@ extension H264PacketizeModeExt on H264PacketizeMode {
/// The type of video streams.
@JsonEnum(alwaysCreate: true)
enum VideoStreamType {
/// 0: High-quality video stream.
/// 0: High-quality video stream, that is, a video stream with the highest resolution and bitrate.
@JsonValue(0)
videoStreamHigh,

/// 1: Low-quality video stream.
/// 1: Low-quality video stream, that is, a video stream with the lowest resolution and bitrate.
@JsonValue(1)
videoStreamLow,
}
Expand Down Expand Up @@ -1889,7 +1889,7 @@ class SimulcastStreamConfig {
@JsonKey(name: 'dimensions')
final VideoDimensions? dimensions;

/// Video receive bitrate (Kbps), represented by an instantaneous value. This parameter does not need to be set. The SDK automatically matches the most suitable bitrate based on the video resolution and frame rate you set.
/// Video bitrate (Kbps). The default value is -1. This parameter does not need to be set. The SDK automatically matches the most suitable bitrate based on the video resolution and frame rate you set.
@JsonKey(name: 'kBitrate')
final int? kBitrate;

Expand Down Expand Up @@ -1965,7 +1965,9 @@ class WatermarkRatio {
Map<String, dynamic> toJson() => _$WatermarkRatioToJson(this);
}

/// Configurations of the watermark image.
/// Watermark image configurations.
///
/// Configuration options for setting the watermark image to be added.
@JsonSerializable(explicitToJson: true, includeIfNull: false)
class WatermarkOptions {
/// @nodoc
Expand Down Expand Up @@ -2404,7 +2406,7 @@ enum AudioProfileType {
@JsonValue(5)
audioProfileMusicHighQualityStereo,

/// 6: A sample rate of 16 kHz, audio encoding, mono, and Acoustic Echo Cancellation (AES) enabled.
/// 6: A sample rate of 16 kHz, audio encoding, mono, and Acoustic Echo Cancellation (AEC) enabled.
@JsonValue(6)
audioProfileIot,

Expand Down Expand Up @@ -2902,6 +2904,10 @@ enum LocalVideoStreamError {
/// @nodoc
@JsonValue(30)
localVideoStreamReasonScreenCaptureDisplayDisconnected,

/// @nodoc
@JsonValue(31)
localVideoStreamErrorScreenCaptureAutoFallback,
}

/// @nodoc
Expand Down Expand Up @@ -3936,7 +3942,7 @@ class LiveTranscoding {
final int? audioBitrate;

/// The number of audio channels for Media Push. Agora recommends choosing 1 (mono), or 2 (stereo) audio channels. Special players are required if you choose 3, 4, or 5.
/// 1: (Default) Mono
/// 1: (Default) Mono.
/// 2: Stereo.
/// 3: Three audio channels.
/// 4: Four audio channels.
Expand Down Expand Up @@ -3989,7 +3995,11 @@ class TranscodingVideoStream {
@JsonKey(name: 'remoteUserUid')
final int? remoteUserUid;

/// The URL of the image. Use this parameter only when the source type is the image for local video mixing.
/// The file path of local images. Use this parameter only when the source type is the image for local video mixing. Examples:
/// Android: /storage/emulated/0/Pictures/image.png
/// iOS: /var/mobile/Containers/Data/Application/<APP-UUID>/Documents/image.png
/// macOS: ~/Pictures/image.png
/// Windows: C:\\Users\\{username}\\Pictures\\image.png
@JsonKey(name: 'imageUrl')
final String? imageUrl;

Expand Down Expand Up @@ -4280,7 +4290,7 @@ enum ConnectionChangedReasonType {
@JsonValue(8)
connectionChangedInvalidToken,

/// (9): The token currently being used has expired. You need to generate a new token on your server and rejoin the channel with the new token.
/// 9: The token currently being used has expired. You need to generate a new token on your server and rejoin the channel with the new token.
@JsonValue(9)
connectionChangedTokenExpired,

Expand All @@ -4298,7 +4308,7 @@ enum ConnectionChangedReasonType {
@JsonValue(12)
connectionChangedRenewToken,

/// (13): Client IP address changed. If you receive this code multiple times, You need to prompt the user to switch networks and try joining the channel again.
/// 13: Client IP address changed. If you receive this code multiple times, You need to prompt the user to switch networks and try joining the channel again.
@JsonValue(13)
connectionChangedClientIpAddressChanged,

Expand Down Expand Up @@ -4530,7 +4540,7 @@ enum VideoViewSetupMode {
@JsonValue(1)
videoViewSetupAdd,

/// 2: Deletes a view.
/// 2: Deletes a view. When you no longer need to use a certain view, it is recommended to delete the view by setting setupMode to videoViewSetupRemove, otherwise it may lead to leak of rendering resources.
@JsonValue(2)
videoViewSetupRemove,
}
Expand Down Expand Up @@ -4573,7 +4583,7 @@ class VideoCanvas {
@JsonKey(name: 'uid')
final int? uid;

/// The background color of the video canvas in RGBA format. The default value is 0x00000000, which represents completely transparent black.
/// The background color of the video canvas in RGBA format. The default value is 0x00000000, which represents black.
@JsonKey(name: 'backgroundColor')
final int? backgroundColor;

Expand Down Expand Up @@ -5559,7 +5569,7 @@ class AudioEncodedFrameObserverConfig {
/// @nodoc
const AudioEncodedFrameObserverConfig({this.postionType, this.encodingType});

/// Audio profile. See AudioEncodedFrameObserverPosition.
/// Audio observer position. See AudioEncodedFrameObserverPosition.
@JsonKey(name: 'postionType')
final AudioEncodedFrameObserverPosition? postionType;

Expand Down
1 change: 1 addition & 0 deletions lib/src/agora_base.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions lib/src/agora_media_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ extension ContentInspectTypeExt on ContentInspectType {
}
}

/// ContentInspectModule A structure used to configure the frequency of video screenshot and upload.
/// ContentInspectModule class, a structure used to configure the frequency of video screenshot and upload.
@JsonSerializable(explicitToJson: true, includeIfNull: false)
class ContentInspectModule {
/// @nodoc
Expand Down Expand Up @@ -1630,15 +1630,15 @@ extension MediaRecorderContainerFormatExt on MediaRecorderContainerFormat {
/// The recording content.
@JsonEnum(alwaysCreate: true)
enum MediaRecorderStreamType {
/// Only audio.
/// 1: Only audio.
@JsonValue(0x01)
streamTypeAudio,

/// Only video.
/// 2: Only video.
@JsonValue(0x02)
streamTypeVideo,

/// (Default) Audio and video.
/// 3: (Default) Audio and video.
@JsonValue(0x01 | 0x02)
streamTypeBoth,
}
Expand Down
4 changes: 2 additions & 2 deletions lib/src/agora_media_engine.dart
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,14 @@ abstract class MediaEngine {
/// Pushes the external raw video frame to the SDK through video tracks.
///
/// To publish a custom video source, see the following steps:
/// Call createCustomVideoTrack to create a video track and get the video track ID.
/// Call createCustomVideoTrack to create a video track and get the video track ID. If you only need to push one custom video source to the channel, you can directly call the setExternalVideoSource method and the SDK will automatically create a video track with the videoTrackId set to 0.
/// Call joinChannel to join the channel. In ChannelMediaOptions, set customVideoTrackId to the video track ID that you want to publish, and set publishCustomVideoTrack to true.
/// Call this method and specify videoTrackId as the video track ID set in step 2. You can then publish the corresponding custom video source in the channel. After calling this method, even if you stop pushing external video frames to the SDK, the custom video stream will still be counted as the video duration usage and incur charges. Agora recommends that you take appropriate measures based on the actual situation to avoid such video billing.
/// If you no longer need to capture external video data, you can call destroyCustomVideoTrack to destroy the custom video track.
/// If you only want to use the external video data for local preview and not publish it in the channel, you can call muteLocalVideoStream to cancel sending video stream or call updateChannelMediaOptions to set publishCustomVideoTrack to false.
///
/// * [frame] The external raw video frame to be pushed. See ExternalVideoFrame.
/// * [videoTrackId] The video track ID returned by calling the createCustomVideoTrack method. The default value is 0.
/// * [videoTrackId] The video track ID returned by calling the createCustomVideoTrack method. If you only need to push one custom video source, set videoTrackId to 0.
///
/// Returns
/// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/agora_media_player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ abstract class MediaPlayer {
/// * [index] The index of the media stream. This parameter must be less than the return value of getStreamCount.
///
/// Returns
/// If the call succeeds, returns the detailed information of the media stream. See PlayerStreamInfo. NULL, if the method call fails.
/// If the call succeeds, returns the detailed information of the media stream. See PlayerStreamInfo. NULL is returned, if the method call fails.
Future<PlayerStreamInfo> getStreamInfo(int index);

/// Sets the loop playback.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/agora_media_player_types.dart
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ class MediaSource {
@JsonKey(name: 'autoPlay')
final bool? autoPlay;

/// Whether to cache the media file when it is being played: true :Enables caching. false : (Default) Disables caching.
/// Whether to cache the media file when it is being played: true : Enables caching. false : (Default) Disables caching.
/// Agora only supports caching on-demand audio and video streams that are not transmitted in HLS protocol.
/// If you need to enable caching, pass in a value to uri; otherwise, caching is based on the url of the media file.
/// If you enable this function, the Media Player caches part of the media file being played on your local device, and you can play the cached media file without internet connection. The statistics about the media file being cached are updated every second after the media file is played. See CacheStatistics.
Expand Down
Loading
Loading