我用AVFoundation
记录音频/视频,使用AVCaptureVideoDataOutput
和AVCaptureAudioDataOutput
。但是当我将我的AVCaptureAudioDataOutput
添加到我的AVCaptureSession
中时,AVFoundation
会停止背景音乐(在我的例子中是iPod应用程序)。
所以我想找个办法让我的音乐在我的唱片里播放?
谢谢,
阿拉克
ps:我的目标是iOS8,我使用SWIFT2.0
发布于 2015-09-09 07:01:10
do {
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayAndRecord, withOptions: [AVAudioSessionCategoryOptions.MixWithOthers, AVAudioSessionCategoryOptions.DefaultToSpeaker])
try AVAudioSession.sharedInstance().setActive(true)
} catch {
print("error")
}
captureSession = AVCaptureSession()
https://stackoverflow.com/questions/32480732
复制相似问题