UIImagePickerController AVAudioPlayer

末鹿安然 提交于 2019-12-08 20:33:28

问题


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

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

How can I deal with that?


回答1:


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.



来源:https://stackoverflow.com/questions/5067084/uiimagepickercontroller-avaudioplayer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!