iPhone SDK - 检查 iPod 播放列表以查看是否有下一个曲目可跳到
有没有办法从 MPMusicPlayerController 检查当前播放列表以查看队列中是否还有其他曲目要播放?
之后可以检测到这一点,因为skipToNextItem将停止播放并更改playbackState,但我想在之前找到它,所以如果没有更多的曲目可以跳到,我可以禁用跳过曲目功能。
Is there a way to inspect the current playlist from MPMusicPlayerController to see whether there is another track to play in the queue?
It's possible to detect this after as skipToNextItem will stop playback and change playbackState, but I want to find out before, so I can disable the skip track function if there are no more tracks to skip on to.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不幸的是,似乎没有办法做到这一点,因为 MPMusicPlayerController 不提供对其播放列表的任何访问。我希望 Apple 在未来的 SDK 版本中添加此功能。您应该向他们提交功能请求。
Unfortunately, there does not seem to be a way to do this since
MPMusicPlayerController
offers no access to its playlist whatsoever. I hope Apple adds this functionality in a future SDK release. You should file a feature request with them.哦,是的,您可以使用 [MPMediaQuery playlistsQuery]。至少您可以找出正在播放的播放列表,并且可以开始播放播放列表中的歌曲标题。但我不知道如何继续播放播放列表中的下一个项目。
Oh yes you can, with [MPMediaQuery playlistsQuery]. At least you can find out which playlist that is playing and you can start to play a song title in a playlist. I don't know how to continue to play the next item in the playlist, though.