swift - iOS 13 MPRemoteCommandCenter 在后台模式后断开连接
问题描述
嗨,任何人在使用 AVPlayerViewController 并将 MPRemoteCommandCenter 设置为控制中心时遇到问题。当应用程序进入后台时视频继续播放但控制中心断开连接?
我使用了这篇文章中的示例代码
https://medium.com/@quangtqag/play-a-video-and-continue-playing-audio-in-background-456ec139eae
在 ios 12 上完美运行,但在 ios 13 中,当应用程序进入后台时,您无法使用控制中心控制播放。
解决方案
推荐阅读
- android - android中折叠工具栏底部的额外颜色
- c - 如何在 C 语言的 if 语句中定义运算符(+、-、*、/)?
- android - 可变金额的 Android 应用内订阅
- sql - 如何将 SQL 查询转换为 sequelize?
- android - 如何在不点击 itemview 的情况下读取 android studio 3.6 中每个 recyclerview 项目的位置?
- node.js - 在 Rasbian 上启动 Node.js 脚本
- ruby - 如何在多个命名属性中按日期时间对数组进行排序
- python - 如何在 Ubuntu 上修复 Dataframe Python 中的 Traceback 问题
- css - React-transition-group 过渡不会在退出时触发动画
- android - 在后台加载 tabLayout 片段