[英]QuickBlox iOS WebRTC - audioCategoryOptions Not Found
I am getting the following error with the most up to date version of the QuickBlox iOS WebRTC Framework: 使用QuickBlox iOS WebRTC框架的最新版本时,出现以下错误:
Property 'audioCategoryOptions' not found on object type of QBRTCSession 在QBRTCSession的对象类型上找不到属性“ audioCategoryOptions”
I am trying to default the audio to come through on the speaker: 我试图将音频默认通过扬声器传播:
self.session.audioCategoryOptions = AVAudioSessionCategoryOptionDefaultToSpeaker;
But I receive the error. 但我收到错误。 Any suggestions?
有什么建议么?
Please check the code bellow: 请检查以下代码:
//Audio Session Initialization
[[QBRTCAudioSession instance] initializeWithConfigurationBlock:^(QBRTCAudioSessionConfiguration *configuration) {
// adding blutetooth support
configuration.categoryOptions |= AVAudioSessionCategoryOptionAllowBluetooth;
configuration.categoryOptions |= AVAudioSessionCategoryOptionAllowBluetoothA2DP;
// adding airplay support
configuration.categoryOptions |= AVAudioSessionCategoryOptionAllowAirPlay;
if (_session.conferenceType == QBRTCConferenceTypeVideo) {
// setting mode to video chat to enable airplay audio and speaker only
configuration.mode = AVAudioSessionModeVideoChat;
}
}];
after that you should set current output device, for example: 之后,您应该设置当前的输出设备,例如:
[QBRTCAudioSession instance].currentAudioDevice = QBRTCAudioDeviceSpeaker;
EDIT: 编辑:
Version of Quickblox-WebRTC - 2.3.1 Quickblox-WebRTC的版本-2.3.1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.