我在iOS应用中嵌入了YouTube-Player-iOS-Helper。当我播放视频时,音频总是通过听筒。我该如何使用手机上的扬声器?
我尝试如下设置AVAudioSession类别;
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord
withOptions: AVAudioSessionCategoryOptionDefaultToSpeaker |
AVAudioSessionCategoryOptionInterruptSpokenAudioAndMixWithOthers
error: &error];
但这没有帮助。