ChannelMediaOptions class

The channel media options.

Agora supports publishing multiple audio streams and one video stream at the same time and in the same RtcConnection. For example, publishMicrophoneTrack, publishCustomAudioTrack, and publishMediaPlayerAudioTrack can be set as true at the same time, but only one of publishCameraTrack, publishScreenCaptureVideo publishScreenTrack, publishCustomVideoTrack, or publishEncodedVideoTrack can be set as true. Agora recommends that you set member parameter values yourself according to your business scenario, otherwise the SDK will automatically assign values to member parameters.

Annotations
  • @JsonSerializable(explicitToJson: true, includeIfNull: false)

Properties

audienceLatencyLevel AudienceLatencyLevelType?
The latency level of an audience member in interactive live streaming. See AudienceLatencyLevelType.
final
audioDelayMs int?
Delay (in milliseconds) for sending audio frames. You can use this parameter to set the delay of the audio frames that need to be sent, to ensure audio and video synchronization. To switch off the delay, set the value to 0.
final
autoSubscribeAudio bool?
Whether to automatically subscribe to all remote audio streams when the user joins a channel: true : Subscribe to all remote audio streams. false : Do not automatically subscribe to any remote audio streams.
final
autoSubscribeVideo bool?
Whether to automatically subscribe to all remote video streams when the user joins the channel: true : Subscribe to all remote video streams. false : Do not automatically subscribe to any remote video streams.
final
channelProfile ChannelProfileType?
The channel profile. See ChannelProfileType.
final
clientRoleType ClientRoleType?
The user role. See ClientRoleType.
final
customVideoTrackId int?
The video track ID returned by calling the createCustomVideoTrack method. The default value is 0.
final
defaultVideoStreamType VideoStreamType?
The default video-stream type. See VideoStreamType.
final
enableAudioRecordingOrPlayout bool?
Whether to enable audio capturing or playback: true : Enable audio capturing or playback. false : Do not enable audio capturing or playback. If you need to publish the audio streams captured by your microphone, ensure this parameter is set as true.
final
hashCode int
The hash code for this object.
no setterinherited
isAudioFilterable bool?
Whether the audio stream being published is filtered according to the volume algorithm: true : The audio stream is filtered. If the audio stream filter is not enabled, this setting does not takes effect. false : The audio stream is not filtered. If you need to enable this function, contact.
final
isInteractiveAudience bool?
Whether to enable interactive mode: true : Enable interactive mode. Once this mode is enabled and the user role is set as audience, the user can receive remote video streams with low latency. false :Do not enable interactive mode. If this mode is disabled, the user receives the remote video streams in default settings. This parameter only applies to co-streaming scenarios. The cohosts need to call the joinChannelEx method to join the other host's channel as an audience member, and set isInteractiveAudience to true. This parameter takes effect only when the user role is clientRoleAudience.
final
publishCameraTrack bool?
Whether to publish the video captured by the camera: true : Publish the video captured by the camera. false : Do not publish the video captured by the camera.
final
publishCustomAudioTrack bool?
Whether to publish the audio captured from a custom source: true : Publish the audio captured from the custom source. false : Do not publish the captured audio from a custom source.
final
publishCustomAudioTrackId int?
The ID of the custom audio source to publish. The default value is 0. If you have set sourceNumber in setExternalAudioSource to a value greater than 1, the SDK creates the corresponding number of custom audio tracks and assigns an ID to each audio track, starting from 0.
final
publishCustomVideoTrack bool?
Whether to publish the video captured from a custom source: true : Publish the video captured from the custom source. false : Do not publish the captured video from a custom source.
final
publishEncodedVideoTrack bool?
Whether to publish the encoded video: true : Publish the encoded video. false : Do not publish the encoded video.
final
publishFourthCameraTrack bool?
Whether to publish the video captured by the fourth camera: true : Publish the video captured by the fourth camera. false : Do not publish the video captured by the fourth camera. This parameter is for Android, Windows and macOS only.
final
publishFourthScreenTrack bool?
Whether to publish the video captured from the fourth screen: true : Publish the captured video from the fourth screen. false : Do not publish the video captured from the fourth screen. This is for Windows and macOS only.
final
publishMediaPlayerAudioTrack bool?
Whether to publish the audio from the media player: true : Publish the audio from the media player. false : Do not publish the audio from the media player.
final
publishMediaPlayerId int?
The ID of the media player to be published. The default value is 0.
final
publishMediaPlayerVideoTrack bool?
Whether to publish the video from the media player: true : Publish the video from the media player. false : Do not publish the video from the media player.
final
publishMicrophoneTrack bool?
Whether to publish the audio captured by the microphone: true : Publish the audio captured by the microphone. false : Do not publish the audio captured by the microphone.
final
publishRhythmPlayerTrack bool?
Whether to publish the sound of a metronome to remote users: true : Publish processed audio frames. Both the local user and remote users can hear the metronome. false : Do not publish the sound of the metronome. Only the local user can hear the metronome.
final
publishScreenCaptureAudio bool?
Whether to publish the audio captured from the screen: true : Publish the audio captured from the screen. false : Publish the audio captured from the screen. This parameter is for Android and iOS only.
final
publishScreenCaptureVideo bool?
Whether to publish the video captured from the screen: true : Publish the video captured from the screen. false : Do not publish the video captured from the screen. This parameter is for Android and iOS only.
final
publishScreenTrack bool?
Whether to publish the video captured from the screen: true : Publish the video captured from the screen. false : Do not publish the video captured from the screen. This is for Windows and macOS only.
final
publishSecondaryCameraTrack bool?
Whether to publish the video captured by the second camera: true : Publish the video captured by the second camera. false : Do not publish the video captured by the second camera.
final
publishSecondaryScreenTrack bool?
Whether to publish the video captured from the second screen: true : Publish the video captured from the second screen. false : Do not publish the video captured from the second screen.
final
publishThirdCameraTrack bool?
Whether to publish the video captured by the third camera: true : Publish the video captured by the third camera. false : Do not publish the video captured by the third camera. This parameter is for Android, Windows and macOS only.
final
publishThirdScreenTrack bool?
Whether to publish the video captured from the third screen: true : Publish the captured video from the third screen. false : Do not publish the video captured from the third screen. This is for Windows and macOS only.
final
publishTranscodedVideoTrack bool?
Whether to publish the local transcoded video: true : Publish the local transcoded video. false : Do not publish the local transcoded video.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
token String?
(Optional) The token generated on your server for authentication. This parameter takes effect only when calling updateChannelMediaOptions or updateChannelMediaOptionsEx. Ensure that the App ID, channel name, and user name used for creating the token are the same as those used by the initialize method for initializing the RTC engine, and those used by the joinChannel and joinChannelEx methods for joining the channel.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited