Agora RTC Objective-C API Reference Refactor

Properties
AgoraRtcChannelMediaOptions Class Reference

Inherits <NSObject>.

## Properties
BOOL | publishCameraTrack
BOOL | publishSecondaryCameraTrack
BOOL | publishMicrophoneTrack
BOOL | publishScreenCaptureAudio
BOOL | publishScreenCaptureVideo
BOOL | publishCustomAudioTrack
NSInteger | publishCustomAudioTrackId
BOOL | publishCustomVideoTrack
BOOL | publishEncodedVideoTrack
BOOL | publishMediaPlayerAudioTrack
BOOL | publishMediaPlayerVideoTrack
BOOL | publishTranscodedVideoTrack
BOOL | publishMixedAudioTrack
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
BOOL | enableMultipath
AgoraMultipathMode | uplinkMultipathMode
AgoraMultipathMode | downlinkMultipathMode
AgoraMultipathType | preferMultipathType

## Detailed Description

The channel media options.

## Property Documentation

## ◆ publishCameraTrack

- (BOOL) publishCameraTrack
| read write nonatomic assign

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
| read write nonatomic assign

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
| read write nonatomic assign

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.

## ◆ publishScreenCaptureAudio

- (BOOL) publishScreenCaptureAudio
| read write nonatomic assign

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.

## ◆ publishScreenCaptureVideo

- (BOOL) publishScreenCaptureVideo
| read write nonatomic assign

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.

## ◆ publishCustomAudioTrack

- (BOOL) publishCustomAudioTrack
| read write nonatomic assign

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
| read write nonatomic assign

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

## ◆ publishCustomVideoTrack

- (BOOL) publishCustomVideoTrack
| read write nonatomic assign

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
| read write nonatomic assign

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
| read write nonatomic assign

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
| read write nonatomic assign

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
| read write nonatomic assign

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
| read write nonatomic assign

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.

## ◆ publishLipSyncTrack

- (BOOL) publishLipSyncTrack
| read write nonatomic assign

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
| read write nonatomic assign

Determines whether to subscribe all remote audio streams automatically.

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

## ◆ autoSubscribeVideo

- (BOOL) autoSubscribeVideo
| read write nonatomic assign

Determines whether to subscribe all remote video streams automatically.

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

## ◆ enableAudioRecordingOrPlayout

- (BOOL) enableAudioRecordingOrPlayout
| read write nonatomic assign

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
| read write nonatomic assign

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

## ◆ clientRoleType

- (AgoraClientRole) clientRoleType
| read write nonatomic assign

The client role type: AgoraClientRole. Default is AgoraClientRoleAudience.

## ◆ audienceLatencyLevel

- (AgoraAudienceLatencyLevelType) audienceLatencyLevel
| read write nonatomic assign

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

## ◆ defaultVideoStreamType

- (AgoraVideoStreamType) defaultVideoStreamType
| read write nonatomic assign

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

## ◆ channelProfile

- (AgoraChannelProfile) channelProfile
| read write nonatomic assign

The channel profile: AgoraChannelProfile. Default is AgoraChannelProfileLiveBroadcasting.

## ◆ audioDelayMs

- (NSInteger) audioDelayMs
| read write nonatomic assign

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
| read write nonatomic assign

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
| read write nonatomic copy

The token to be renewed.

## ◆ enableBuiltInMediaEncryption

- (BOOL) enableBuiltInMediaEncryption
| read write nonatomic assign

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
| read write nonatomic assign

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
| read write nonatomic assign

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
| read write nonatomic assign

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

## ◆ isAudioFilterable

- (BOOL) isAudioFilterable
| read write nonatomic assign

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
| read write nonatomic copy

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

## ◆ enableMultipath

- (BOOL) enableMultipath
| read write nonatomic assign

Whether to enable multipath transmission.

- `YES`: Enable multipath transmission.
- `NO`: Disable multipath transmission.

## ◆ uplinkMultipathMode

- (AgoraMultipathMode) uplinkMultipathMode
| read write nonatomic assign

The mode for uplink multipath transmission. This defines how the uplink multipath is managed.

Note
  Ensure you set `enableMultipath` to `true` when using this parameter.

## ◆ downlinkMultipathMode

- (AgoraMultipathMode) downlinkMultipathMode
| read write nonatomic assign

The mode for downlink multipath transmission. This defines how the downlink multipath is managed.

Note
  Ensure you set `enableMultipath` to `true` when using this parameter.

## ◆ preferMultipathType

- (AgoraMultipathType) preferMultipathType
| read write nonatomic assign

The preferred type of multipath transmission. This allows the user to specify a preferred multipath type.

Note
  Ensure you set `enableMultipath` to `true` when using this parameter. This parameter is only effective when you set `MultipathMode` to `Dynamic`.