Agora RTC Objective-C API Reference Refactor

Properties
AgoraRtcChannelMediaOptions Class Reference

Inherits <NSObject>.

## Properties
BOOL | publishCameraTrack
BOOL | publishSecondaryCameraTrack
BOOL | publishMicrophoneTrack
BOOL | publishScreenCaptureVideo
BOOL | publishScreenCaptureAudio
BOOL | publishCustomAudioTrack
NSInteger | publishCustomAudioTrackId
BOOL | publishCustomVideoTrack
BOOL | publishEncodedVideoTrack
BOOL | publishMediaPlayerAudioTrack
BOOL | publishMediaPlayerVideoTrack
BOOL | publishTranscodedVideoTrack
BOOL | publishMixedAudioTrack
NSInteger | mixPolicyForMixedTrack
BOOL | publishLipSyncTrack
BOOL | autoSubscribeAudio
BOOL | autoSubscribeVideo
BOOL | enableAudioRecordingOrPlayout
NSInteger | publishMediaPlayerId
AgoraClientRole | clientRoleType
AgoraAudienceLatencyLevelType | audienceLatencyLevel
AgoraVideoStreamType | defaultVideoStreamType
AgoraChannelProfile | channelProfile
NSInteger | audioDelayMs
NSInteger | mediaPlayerAudioDelayMs
NSString *_Nullable | token
BOOL | enableBuiltInMediaEncryption
BOOL | publishRhythmPlayerTrack
BOOL | isInteractiveAudience
NSInteger | customVideoTrackId
BOOL | isAudioFilterable
NSString *_Nullable | parameters

## Detailed Description

The channel media options.

## Property Documentation

## ◆ publishCameraTrack

- (BOOL) publishCameraTrack
| readwritenonatomicassign

Determines whether to publish the video of the camera track.

- `YES`: (Default) Publish the video track of the camera capturer.
- `NO`: Do not publish the video track of the camera capturer.

## ◆ publishSecondaryCameraTrack

- (BOOL) publishSecondaryCameraTrack
| readwritenonatomicassign

Determines whether to publish the video of the secondary camera track.

- `YES`: Publish the video track of the secondary camera capturer.
- `NO`: (Default) Do not publish the video track of the secondary camera capturer.

## ◆ publishMicrophoneTrack

- (BOOL) publishMicrophoneTrack
| readwritenonatomicassign

Determines whether to publish the recorded audio of microphone.

- `YES`: (Default) Publish the recorded audio of microphone.
- `NO`: Do not publish the recorded audio of microphone.

## ◆ publishScreenCaptureVideo

- (BOOL) publishScreenCaptureVideo
| readwritenonatomicassign

Determines whether to publish the video of the screen capturer.

- `YES`: Publish the video track of the screen capturer.
- `NO`: (Default) Do not publish the video track of the screen capturer.

## ◆ publishScreenCaptureAudio

- (BOOL) publishScreenCaptureAudio
| readwritenonatomicassign

Determines whether to publish the audio of the screen capturer.

- `YES`: Publish the audio track of the screen capturer.
- `NO`: (Default) Do not publish the audio track of the screen capturer.

## ◆ publishCustomAudioTrack

- (BOOL) publishCustomAudioTrack
| readwritenonatomicassign

Determines whether to publish the audio of the custom audio track.

- `YES`: Publish the audio of the custom audio track.
- `NO`: (Default) Do not publish the audio of the custom audio track.

## ◆ publishCustomAudioTrackId

- (NSInteger) publishCustomAudioTrackId
| readwritenonatomicassign

The custom audio track id. The default value is 0.

## ◆ publishCustomVideoTrack

- (BOOL) publishCustomVideoTrack
| readwritenonatomicassign

Determines whether to publish the video of the custom video track.

- `YES`: Publish the video of the custom video track.
- `NO`: (Default) Do not publish the video of the custom video track.

## ◆ publishEncodedVideoTrack

- (BOOL) publishEncodedVideoTrack
| readwritenonatomicassign

Determines whether to publish the video of the encoded video track.

- `YES`: Publish the video of the encoded video track.
- `NO`: (Default) Do not publish the video of the encoded video track.

## ◆ publishMediaPlayerAudioTrack

- (BOOL) publishMediaPlayerAudioTrack
| readwritenonatomicassign

Determines whether to publish the audio track of media player.

- `YES`: Publish the audio track of media player.
- `NO`: (Default) Do not publish the audio track of media player.

## ◆ publishMediaPlayerVideoTrack

- (BOOL) publishMediaPlayerVideoTrack
| readwritenonatomicassign

Determines whether to publish the video track of media player source.

- `YES`: Publish the video track of media player source.
- `NO`: (Default) Do not publish the video track of media player source.

## ◆ publishTranscodedVideoTrack

- (BOOL) publishTranscodedVideoTrack
| readwritenonatomicassign

Determines whether to publish the local transcoded video track.

- `YES`: Publish the video track of local transcoded video track.
- `NO`: (Default) Do not publish the local transcoded video track.

## ◆ publishMixedAudioTrack

- (BOOL) publishMixedAudioTrack
| readwritenonatomicassign

Determines whether to publish the local mixed audio track.

- `YES`: Publish the audio track of local mixed audio track.
- `NO`: (Default) Do not publish the local mixed audio track.

## ◆ mixPolicyForMixedTrack

- (NSInteger) mixPolicyForMixedTrack
| readwritenonatomicassign

Whether to allow local publish audio stream mixed by local mixed track. This is map for capture rule:

- `3`: (1,1) Default both local and remote can be captured.
- `2`: (0,1) local stream not captured, remote stream captured.
- `1`: (1,0) local stream captured, remote stream not captured.
- `0`: (0,0) local stream not captured, remote stream not captured.
- The connection for publishMixedAudioTrack(true) is never set capture local.

## ◆ publishLipSyncTrack

- (BOOL) publishLipSyncTrack
| readwritenonatomicassign

Determines whether to publish the local lip sync video track.

- `YES`: Publish the video track of local lip sync video track.
- `NO`: (Default) Do not publish the local lip sync video track.

## ◆ autoSubscribeAudio

- (BOOL) autoSubscribeAudio
| readwritenonatomicassign

Determines whether to subscribe all remote audio streams automatically. This property replaces calling AgoraRtcEngineKit.setDefaultMuteAllRemoteAudioStreams: setDefaultMuteAllRemoteAudioStreams before joining a channel.

- `YES`: (Default) Subscribe all remote audio streams automatically.
- `NO`: Do not subscribe any remote audio stream automatically.

## ◆ autoSubscribeVideo

- (BOOL) autoSubscribeVideo
| readwritenonatomicassign

Determines whether to subscribe all remote video streams automatically. This property replaces calling setDefaultMuteAllRemoteVideoStreams: (AgoraRtcEngineKit) setDefaultMuteAllRemoteVideoStreams before joining a channel.

- `YES`: (Default) Subscribe all remote video streams automatically.
- `NO`: Do not subscribe any remote video stream automatically.

## ◆ enableAudioRecordingOrPlayout

- (BOOL) enableAudioRecordingOrPlayout
| readwritenonatomicassign

Determines whether to enable audio recording or playout.

- `YES`: (Default) It's used to publish audio and mix microphone, or subscribe audio and playout.
- `NO`: It's used to publish extenal audio frame only without mixing microphone, or no need audio device to playout audio either.

## ◆ publishMediaPlayerId

- (NSInteger) publishMediaPlayerId
| readwritenonatomicassign

Determines which media player source should be published. This parameter get from function getMediaPlayerId() of AgoraMediaPlayer.

## ◆ clientRoleType

- (AgoraClientRole) clientRoleType
| readwritenonatomicassign

The client role type: AgoraClientRole. Default is AgoraClientRoleAudience.

## ◆ audienceLatencyLevel

- (AgoraAudienceLatencyLevelType) audienceLatencyLevel
| readwritenonatomicassign

The audience latency level type: AgoraAudienceLatencyLevelType. Default is AgoraAudienceLatencyLevelUltraLowLatency.

## ◆ defaultVideoStreamType

- (AgoraVideoStreamType) defaultVideoStreamType
| readwritenonatomicassign

The default video stream type: AgoraVideoStreamType. Default is AgoraVideoStreamTypeHigh.

## ◆ channelProfile

- (AgoraChannelProfile) channelProfile
| readwritenonatomicassign

The channel profile: AgoraChannelProfile. Default is AgoraChannelProfileLiveBroadcasting.

## ◆ audioDelayMs

- (NSInteger) audioDelayMs
| readwritenonatomicassign

The delay in ms for sending audio frames. This is used for explicit control of A/V sync. To switch off the delay, set the value to zero.

## ◆ mediaPlayerAudioDelayMs

- (NSInteger) mediaPlayerAudioDelayMs
| readwritenonatomicassign

The delay in ms for sending media player audio frames. This is used for explicit control of A/V sync. To switch off the delay, set the value to zero.

## ◆ token

- (NSString* _Nullable) token
| readwritenonatomiccopy

The token to be renewed.

## ◆ enableBuiltInMediaEncryption

- (BOOL) enableBuiltInMediaEncryption
| readwritenonatomicassign

Enable media packet encryption. It will be ignored when calling function updateChannelMediaOptions().

- `YES`: Enable media packet encryption.
- `NO`: (Default) Do not Enable media packet encryption.

## ◆ publishRhythmPlayerTrack

- (BOOL) publishRhythmPlayerTrack
| readwritenonatomicassign

Determines whether to publish the sound of the rhythm player to remote users.

- true: (Default) Publish the sound of the rhythm player.
- false: Do not publish the sound of the rhythm player.

## ◆ isInteractiveAudience

- (BOOL) isInteractiveAudience
| readwritenonatomicassign

This mode is only used for audience. In PK mode, client might join one channel as broadcaster, and join another channel as interactive audience to achieve low lentancy and smooth video from remote user.

- `YES`: Enable low lentancy and smooth video when joining as an audience.
- `NO`: (default) Use default settings for audience role.

## ◆ customVideoTrackId

- (NSInteger) customVideoTrackId
| readwritenonatomicassign

The custom video track id which will used to publish or preview.

## ◆ isAudioFilterable

- (BOOL) isAudioFilterable
| readwritenonatomicassign

Determines whether local audio stream can be filtered.

- `YES`: (Default) Can be filtered when audio level is low.
- `NO`: Do not filter this audio stream.

## ◆ parameters

- (NSString* _Nullable) parameters
| readwritenonatomiccopy

Provides the technical preview functionalities or special customizations by configuring the SDK with JSON options.