agora::base::AgoraServiceConfiguration结构体 参考
- C++
更新时间不可用
详细描述
IAgoraService 类的全局配置。
在调用 initialize 方法时设置。
构造及析构函数说明
AgoraServiceConfiguration()
agora::base::AgoraServiceConfiguration::AgoraServiceConfiguration()类成员变量说明
enableAudioProcessor
bool agora::base::AgoraServiceConfiguration::enableAudioProcessor是否开启音频处理模块(Audio Processing Module, APM)。
true: (默认) 开启音频处理模块。false: 关闭音频处理模块。你将无法创建音频轨道。
enableAudioDevice
bool agora::base::AgoraServiceConfiguration::enableAudioDevice是否开启音频设备模块(Audio Device Module, ADM)。 ADM 用来管理音频设备,例如录制和播放音频。
true: (默认) 开启音频设备模块。你可以录制和播放音频。false: 关闭音频设备模块。你无法录制和播放音频。
注解
如果你将 enableAudioDevice 设为 false 且将 enableAudioProcessor 设为 true,你将无法使用音频设备,但你可以推送 PCM 音频数据。
enableVideo
bool agora::base::AgoraServiceConfiguration::enableVideo是否开启视频。
true: 开启视频。false: (默认) 关闭视频。
appId
const char* agora::base::AgoraServiceConfiguration::appId你的声网项目的 App ID。该参数中不支持填写 Token。
areaCode
unsigned int agora::base::AgoraServiceConfiguration::areaCode服务器的访问区域。该功能为高级设置,适用于有访问安全限制的场景。 支持的区域详见 AREA_CODE。区域码支持位操作。
指定访问区域后,SDK 会连接指定区域内的声网服务器。
channelProfile
agora::CHANNEL_PROFILE_TYPE agora::base::AgoraServiceConfiguration::channelProfile频道使用场景。详见 CHANNEL_PROFILE_TYPE。
audioScenario
rtc::AUDIO_SCENARIO_TYPE agora::base::AgoraServiceConfiguration::audioScenario音频应用场景。详见 AUDIO_SCENARIO_TYPE。
logConfig
commons::LogConfig agora::base::AgoraServiceConfiguration::logConfig设置 SDK 输出的日志文件。详见 LogConfig。
useStringUid
bool agora::base::AgoraServiceConfiguration::useStringUid是否允许 String UID。
domainLimit
bool agora::base::AgoraServiceConfiguration::domainLimit是否开启域名限制:
true: 开启。SDK 只能访问指定域名的网络。false: (默认)不开启。SDK 可以访问任意域名的网络。
注解
- 该参数仅对使用定向物联网卡的 IOT 场景有效。为保证使用定向物联网卡的设备与其他设备互通, 你需要将该参数设置为
true。 - 开启域名限制前,你需要[联系销售](https://www.shengwang.cn/contact-sales/}进行设置。