开发者

Play video's audio track when enter background?

开发者 https://www.devze.com 2023-01-22 07:32 出处:网络
I\'m using mpmovieplayer to play video on ios 4, and I want to keep the audio playing when my app enter background, but it doesn\'t work. I thing it\'s because video player use GPU to render video on

I'm using mpmovieplayer to play video on ios 4, and I want to keep the audio playing when my app enter background, but it doesn't work. I thing it's because video player use GPU to render video on screen and this is not allowed by apple when app enter background.

So, is there any way to do that? There are some apps have this feature, and they seems just use the 开发者_C百科mpmovieplayer, is it work by detach the video layer of mpmovieplayer?

Thanks for your answer!


You'll need to have separate audio file and video file for this. Play both when you need to play video and just the audio when app gets into background.

0

精彩评论

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

关注公众号