Agora Java API Reference for Android

Public Attributes | List of all members
agora::rtc::RtcConnectionConfiguration Struct Reference

`#include <NGIAgoraRtcConnection.h>`

## Public Attributes
bool | autoSubscribeAudio
bool | autoSubscribeVideo
bool | enableAudioRecordingOrPlayout
int | maxSendBitrate
int | minPort
int | maxPort
CLIENT_ROLE_TYPE | clientRoleType
CHANNEL_PROFILE_TYPE | channelProfile
bool | audioRecvEncodedFrame
bool | audioRecvMediaPacket
bool | videoRecvMediaPacket
bool | isInteractiveAudience
bool | isDataChannelOnly

## Detailed Description

Configurations for an RTC connection.

Set these configurations when calling createRtcConnection.

## Member Data Documentation

## ◆ autoSubscribeAudio

bool agora::rtc::RtcConnectionConfiguration::autoSubscribeAudio

Whether to subscribe to all audio tracks automatically.

- `true`: (Default) Subscribe to all audio tracks automatically.
- `false`: Do not subscribe to any audio track automatically.

## ◆ autoSubscribeVideo

bool agora::rtc::RtcConnectionConfiguration::autoSubscribeVideo

Whether to subscribe to all video tracks automatically.

- `true`: (Default) Subscribe to all video tracks automatically.
- `false`: Do not subscribe to any video track automatically.

## ◆ enableAudioRecordingOrPlayout

bool agora::rtc::RtcConnectionConfiguration::enableAudioRecordingOrPlayout

Whether to enable audio recording or playout.

- `true`: Enables audio recording or playout. Use this option when you publish and mix audio tracks, or subscribe to one or multiple audio tracks and play audio.
- `false`: Disables audio recording or playout. Use this option when you publish external audio frames without audio mixing, or you do not need audio devices to play audio.

## ◆ maxSendBitrate

int agora::rtc::RtcConnectionConfiguration::maxSendBitrate

The maximum sending bitrate.

## ◆ minPort

int agora::rtc::RtcConnectionConfiguration::minPort

The minimum port.

## ◆ maxPort

int agora::rtc::RtcConnectionConfiguration::maxPort

The maximum port.

## ◆ clientRoleType

CLIENT_ROLE_TYPE agora::rtc::RtcConnectionConfiguration::clientRoleType

The user role. For details, see #CLIENT_ROLE_TYPE. The default user role is `CLIENT_ROLE_AUDIENCE`.

## ◆ channelProfile

CHANNEL_PROFILE_TYPE agora::rtc::RtcConnectionConfiguration::channelProfile

The channel profile. For details, see #CHANNEL_PROFILE_TYPE. The default channel profile is `CHANNEL_PROFILE_LIVE_BROADCASTING`.

## ◆ audioRecvEncodedFrame

bool agora::rtc::RtcConnectionConfiguration::audioRecvEncodedFrame

Determines whether to receive audio encoded frame or not.

## ◆ audioRecvMediaPacket

bool agora::rtc::RtcConnectionConfiguration::audioRecvMediaPacket

Determines whether to receive audio media packet or not.

## ◆ videoRecvMediaPacket

bool agora::rtc::RtcConnectionConfiguration::videoRecvMediaPacket

Determines whether to receive video media packet or not.

## ◆ isInteractiveAudience

bool agora::rtc::RtcConnectionConfiguration::isInteractiveAudience

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.

- true: Enable low lentancy and smooth video when joining as an audience.
- false: (Default) Use default settings for audience role.

## ◆ isDataChannelOnly

bool agora::rtc::RtcConnectionConfiguration::isDataChannelOnly

Indicates data channel only.