进入后台时播放视频音轨?

发布于 2024-09-29 02:00:02 字数 226 浏览 0 评论 0原文

我正在使用 mpmovieplayer 在 ios 4 上播放视频,我想在我的应用程序进入后台时保持音频播放,但它不起作用。我认为这是因为视频播放器使用 GPU 在屏幕上渲染视频,而当应用程序进入后台时,苹果不允许这样做。

那么,有什么办法可以做到这一点吗?有一些应用程序有这个功能,而且他们似乎只是使用mpmovieplayer,它是通过分离mpmovieplayer的视频层来工作的吗?

感谢您的回答!

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 mpmovieplayer, is it work by detach the video layer of mpmovieplayer?

Thanks for your answer!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

人事已非 2024-10-06 02:00:02

为此,您需要有单独的音频文件和视频文件。当您需要播放视频时播放两者,当应用程序进入后台时仅播放音频。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文