MPMoviePlayerViewController,在后台播放视频的声音 [英] MPMoviePlayerViewController, playing video's sound in background
问题描述
我正在用MPMoviePlayerViewController
播放视频流.
在我的应用程序的info.plist
中,我已将UIBackgroundModes
设置为audio
.
当我在播放视频的过程中暂停播放时按主页按钮时,返回到应用程序后,播放将再次继续.
它开箱即用,无需更改某些内容.
但是在某些应用程序中(例如茉莉花),当我按主页"按钮时,视频的声音会在后台继续播放.
所以我有两个问题:
1)魔术是什么?如何在不显示视频流本身的情况下在后台播放视频声音?我找不到任何有效的解决方案.
2)如果难以实施,我可以保留所有内容吗?我已将UIBackgroundModes
设置为audio
却没有在后台实际播放音频,因此我认为我的应用有机会在审核阶段被拒绝.我对吗?还是对于视频流应用程序,即使没有任何内容在后台播放,也允许设置UIBackgroundModes
吗?
预先感谢.
I'm playing the video stream with MPMoviePlayerViewController
.
In my app's info.plist
I have set UIBackgroundModes
to audio
.
When I press home button while playing video playback is paused, after going back to application playback continues again.
It works out of the box without having to change something.
But in some applications (e.g. Jasmine) when I press Home button video's sound playing is continued in background.
So I have 2 questions:
1) What's the magic? How to play video's sound in background without showing video stream itself? I can't find any working solutions.
2) If it is hard to implement, can I leave everything as it is? I have set UIBackgroundModes
to audio
without actually playing audio in background, so I assume my app has chances to be rejected on review stage. Am I right? Or for video streaming applications setting UIBackgroundModes
is allowed even if nothing is playing in background?
Thanks in advance.
推荐答案
- 您必须将音频流分离为背景模式
- 您的应用肯定会被拒绝.我也寻求技术解决方案;)
这篇关于MPMoviePlayerViewController,在后台播放视频的声音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!