开发者

UIImagePickerController AVAudioPlayer

开发者 https://www.devze.com 2023-02-12 03:42 出处:网络
When I open a UIImagePickerController, I can display the device\'s camera input stream. 开发者_JAVA技巧

When I open a UIImagePickerController, I can display the device's camera input stream.

开发者_JAVA技巧

But when I play an AVAudioPlayer with [player play] then the camera stops working.

How can I deal with that?


you can't because UIIMagePickerController is controlling the audio, you will need to use low level AVFoundation in order to do that.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消