Agora C++ API Reference for All Platforms
agora::rtc::ChannelMediaOptions Struct Reference

#include <IAgoraRtcEngine.h>

Public Member Functions

 ChannelMediaOptions ()
 

Public Attributes

bool autoSubscribeAudio
 
bool autoSubscribeVideo
 
bool publishLocalAudio
 
bool publishLocalVideo
 

Detailed Description

The channel media options.

Constructor & Destructor Documentation

◆ ChannelMediaOptions()

agora::rtc::ChannelMediaOptions::ChannelMediaOptions ( )
inline

Member Data Documentation

◆ autoSubscribeAudio

bool agora::rtc::ChannelMediaOptions::autoSubscribeAudio

Determines whether to automatically subscribe to all remote audio streams when the user joins a channel:

  • true: (Default) Subscribe.
  • false: Do not subscribe.

This member serves a similar function to the muteAllRemoteAudioStreams method. After joining the channel, you can call the muteAllRemoteAudioStreams method to set whether to subscribe to audio streams in the channel.

◆ autoSubscribeVideo

bool agora::rtc::ChannelMediaOptions::autoSubscribeVideo

Determines whether to subscribe to video streams when the user joins the channel:

  • true: (Default) Subscribe.
  • false: Do not subscribe.

This member serves a similar function to the muteAllRemoteVideoStreams method. After joining the channel, you can call the muteAllRemoteVideoStreams method to set whether to subscribe to video streams in the channel.

◆ publishLocalAudio

bool agora::rtc::ChannelMediaOptions::publishLocalAudio

Determines whether to publish the local audio stream when the user joins a channel:

  • true: (Default) Publish.
  • false: Do not publish.

This member serves a similar function to the muteLocalAudioStream method. After the user joins the channel, you can call the muteLocalAudioStream method to set whether to publish the local audio stream in the channel.

Since
v3.4.5

◆ publishLocalVideo

bool agora::rtc::ChannelMediaOptions::publishLocalVideo

Determines whether to publish the local video stream when the user joins a channel:

  • true: (Default) Publish.
  • false: Do not publish.

This member serves a similar function to the muteLocalVideoStream method. After the user joins the channel, you can call the muteLocalVideoStream method to set whether to publish the local video stream in the channel.