Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIImagePickerController AVAudioPlayer

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?

like image 379
Rafer Avatar asked Feb 21 '11 14:02

Rafer


1 Answers

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.

like image 158
Ben Maroz Avatar answered Oct 21 '22 23:10

Ben Maroz