在应用程序中使用 iPhone 的多任务音乐控件

发布于 2025-01-02 19:51:22 字数 132 浏览 2 评论 0原文

我在互联网上搜索了一段时间,试图找到这个问题的答案。如果您打开多任务栏并向左滑动,则会出现音乐控件,任何正在播放音乐的应用程序(即音乐、Pandora 等)都可以使用这些控件。我还没有找到在我自己的音乐播放应用程序中使用这些的方法。有谁知道该怎么做?

I've searched the Internet for a while to try and find an answer to this. If you open up the multitasking bar and swipe to the left there are music controls that can be used by whatever app is playing music (ie Music, Pandora, etc.). I have not yet discovered a way to use these in my own music playing application. Does anyone know how to do that?

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

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

发布评论

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

评论(1

榆西 2025-01-09 19:51:23

您应该看一下 此示例。它基本上就是您想要的,一个与 iTunes 交互的小型音频播放器,可让您从库中选择歌曲,并且其行为与标准音乐播放器非常相似,包括音乐控件回调。

You should take a look at this example in the Apple API docs examples. It's basically what you want, a small audio player that interfaces with iTunes, lets you pick songs from the library and behaves much like the standard music player, including the music controls callbacks.

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