如果使用 iPodMusicPlayer,获取下一个和上一个曲目

发布于 2024-09-18 00:55:35 字数 282 浏览 2 评论 0原文

我使用 iPodMusicPlayer 作为我的 MPMusicController。

我的问题是,一旦我的应用程序启动并将继续 iPod 应用程序正在播放的内容,我可以检索 iPod 音乐应用程序的下一首和上一首曲目的 MPMediaItem 吗?我似乎无法找到一种方法来知道用户是否选择了专辑、艺术家或歌曲作为他/她在 iPod 音乐应用程序上的选择。如果我能够知道这一点,我可以根据属性检索列表并从那里开始..

..或者也许我应该只使用 applicationMusicPlayer ?

谢谢!

Im using an iPodMusicPlayer for my MPMusicController.

My question is once my appplication is launched and will continue what the iPod app is playing, can i retrieve the MPMediaItem of the next and previous track of the iPod music app? I cant seem to find a way to know if user chose albums, artists or songs as his/her choice on the iPod music app. If I can be able to know that, I can retrieve the list depending on the property and start from there..

.. or maybe i should just use applicationMusicPlayer?

thanks!

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

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

发布评论

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

评论(1

无畏 2024-09-25 00:55:35

转储视图层次结构不会显示任何有用的信息。这是即使让控制器稳定下来并显示所有窗口的内容后我得到的结果:

UIWindow:UIView:UIResponder:NSObject {{0, 0}, {320, 480}}
  0: MPMediaPickerView:UIView:UIResponder:NSObject {{0, 20}, {320, 460}}
    0: UIScrollView:UIView:UIResponder:NSObject {{0, 0}, {320, 460}}
      0: UIImageView:UIView:UIResponder:NSObject {{0, 0}, {7, 7}}
      1: UIImageView:UIView:UIResponder:NSObject {{0, 0}, {7, 7}}
UIWindow:UIView:UIResponder:NSObject {{0, 0}, {320, 460}}

这对我来说甚至没有意义,没有导航栏或按钮。我的结论是,苹果可能正在做一些事情来模糊层次结构,这使得改变这一点几乎不可能。

正确的做法是提交 RADAR bug 并请求该功能。如果有足够多的人这样做,它可能会上升到某人的优先列表中。

Dumping the view hierarchy does not reveal anything useful. Here is what I get even after letting the controller settle down and display the contents of all of the windows:

UIWindow:UIView:UIResponder:NSObject {{0, 0}, {320, 480}}
  0: MPMediaPickerView:UIView:UIResponder:NSObject {{0, 20}, {320, 460}}
    0: UIScrollView:UIView:UIResponder:NSObject {{0, 0}, {320, 460}}
      0: UIImageView:UIView:UIResponder:NSObject {{0, 0}, {7, 7}}
      1: UIImageView:UIView:UIResponder:NSObject {{0, 0}, {7, 7}}
UIWindow:UIView:UIResponder:NSObject {{0, 0}, {320, 460}}

This doesn't even make sense to me, there is no navigation bar or buttons. My conclusion is that Apple may be doing something to obscure the hierarchy which would make changing this nearly impossible.

The proper thing is to file a RADAR bug and request the feature. If enough people do that it may rise on someones priority list.

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