Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] daily update 2024-3-5 #1607

Merged
merged 1 commit into from
Mar 6, 2024
Merged
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
6 changes: 3 additions & 3 deletions lib/src/agora_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1973,7 +1973,7 @@ class WatermarkOptions {
this.watermarkRatio,
this.mode});

/// Is the watermark visible in the local preview view? true : (Default) The watermark is visible in the local preview view. false : The watermark is not visible in the local preview view.
/// Whether the watermark is visible in the local preview view: true : (Default) The watermark is visible in the local preview view. false : The watermark is not visible in the local preview view.
@JsonKey(name: 'visibleInPreview')
final bool? visibleInPreview;

Expand Down Expand Up @@ -3578,7 +3578,7 @@ enum RtmpStreamPublishReason {
@JsonValue(15)
rtmpStreamPublishReasonInvalidAppid,

/// 16: Your project does not have permission to use streaming services. Refer to Media Push to enable the Media Push permission.
/// 16: Your project does not have permission to use streaming services.
@JsonValue(16)
rtmpStreamPublishReasonInvalidPrivilege,

Expand Down Expand Up @@ -5721,7 +5721,7 @@ enum ChannelMediaRelayError {
@JsonValue(1)
relayErrorServerErrorResponse,

/// 2: No server response. You can call leaveChannel to leave the channel. This error can also occur if your project has not enabled co-host token authentication. You can to enable the service for cohosting across channels before starting a channel media relay.
/// 2: No server response. This error may be caused by poor network connections. If this error occurs when initiating a channel media relay, you can try again later; if this error occurs during channel media relay, you can call leaveChannel to leave the channel. This error can also occur if the channel media relay service is not enabled in the project. You can contact to enable the service.
@JsonValue(2)
relayErrorServerNoResponse,

Expand Down
9 changes: 4 additions & 5 deletions lib/src/agora_media_engine.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,12 @@ abstract class MediaEngine {

/// Pulls the remote audio data.
///
/// Before calling this method, you need to call setExternalAudioSink to notify the app to enable and set the external rendering. After a successful call of this method, the app pulls the decoded and mixed audio data for playback.
/// This method only supports pulling data from custom audio source. If you need to pull the data captured by the SDK, do not call this method.
/// Before calling this method, call setExternalAudioSink (enabled : true) to notify the app to enable and set the external audio rendering. After a successful call of this method, the app pulls the decoded and mixed audio data for playback.
/// Call this method after joining a channel.
/// Once you enable the external audio sink, the app will not retrieve any audio data from the onPlaybackAudioFrame callback.
/// The difference between this method and the onPlaybackAudioFrame callback is as follows:
/// Both this method and onPlaybackAudioFrame callback can be used to get audio data after remote mixing. Note that after calling setExternalAudioSink to enable external audio rendering, the app no longer receives data from the onPlaybackAudioFrame callback. Therefore, you should choose between this method and the onPlaybackAudioFrame callback based on your actual business requirements. The specific distinctions between them are as follows:
/// After calling this method, the app automatically pulls the audio data from the SDK. By setting the audio data parameters, the SDK adjusts the frame buffer to help the app handle latency, effectively avoiding audio playback jitter.
/// The SDK sends the audio data to the app through the onPlaybackAudioFrame callback. Any delay in processing the audio frames may result in audio jitter.
/// After a successful method call, the app automatically pulls the audio data from the SDK. After setting the audio data parameters, the SDK adjusts the frame buffer and avoids problems caused by jitter in the external audio playback.
/// This method is only used for retrieving audio data after remote mixing. If you need to get audio data from different audio processing stages such as capture and playback, you can register the corresponding callbacks by calling registerAudioFrameObserver.
///
/// * [frame] Pointers to AudioFrame.
///
Expand Down
11 changes: 10 additions & 1 deletion lib/src/agora_media_player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,16 @@ abstract class MediaPlayer {
/// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly.
Future<void> selectAudioTrack(int index);

/// @nodoc
/// Selects the audio tracks that you want to play on your local device and publish to the channel respectively.
///
/// You can call this method to determine the audio track to be played on your local device and published to the channel. Before calling this method, you need to open the media file with the openWithMediaSource method and set enableMultiAudioTrack in MediaSource as true.
///
/// * [playoutTrackIndex] The index of audio tracks for local playback. You can obtain the index through getStreamInfo.
/// * [publishTrackIndex] The index of audio tracks to be published in the channel. You can obtain the index through getStreamInfo.
///
/// Returns
/// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly.
/// < 0: Failure.
Future<void> selectMultiAudioTrack(
{required int playoutTrackIndex, required int publishTrackIndex});

Expand Down
Loading
Loading