当我打开 UIImagePickerController 时,我可以显示设备的相机输入流。
When I open a UIImagePickerController, I can display the device's camera input stream.
但是当我玩的时候一个 AVAudioPlayer , [玩家玩] 然后相机停止工作。
But when I play an AVAudioPlayer with [player play] then the camera stops working.
我该如何处理?
推荐答案你不能因为UIIMagePickerController正在控制音频,你需要使用低级AVFoundation来做到这一点。
you can't because UIIMagePickerController is controlling the audio, you will need to use low level AVFoundation in order to do that.
checkout AVCam 示例代码如何录制电影并将视图添加为子视图,这样您将保持对音频的控制并能够播放音频。
checkout AVCam sample code how to record a movie and add the view as subview , that way you will stay in control of the audio and will be able to play audio.
更多推荐
UIImagePickerController AVAudioPlayer
发布评论