UIImagePickerController AVAudioPlayer

编程入门 行业动态 更新时间:2024-10-28 18:36:13
本文介绍了UIImagePickerController AVAudioPlayer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

当我打开 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

本文发布于:2023-11-26 16:03:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1634334.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:UIImagePickerController   AVAudioPlayer

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!