MPMoviePlayerViewController,在后台播放视频的声音 [英] MPMoviePlayerViewController, playing video's sound in background

查看:87
本文介绍了MPMoviePlayerViewController,在后台播放视频的声音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用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.

推荐答案

  1. 您必须将音频流分离为背景模式
  2. 您的应用肯定会被拒绝.我也寻求技术解决方案;)

这篇关于MPMoviePlayerViewController,在后台播放视频的声音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆