当正在播放的项目跳到当前播放列表之外时,MPMusicPlayerController 的状态是什么?

发布于 10-20 13:21 字数 662 浏览 8 评论 0原文

我正在使用 MPMusicPlayerController,并且我已经实现了跳过曲目和上一曲目控件来控制音乐播放。当我到达当前播放列表中的专辑/播放列表的末尾时。该应用程序不再跳过曲目或转到上一曲目。

示例:专辑的第一首曲目,点击上一首曲目应用程序将停止响应并跳过曲目/播放/上一首曲目将不再响应。

示例:专辑的最后一首曲目,点击上一首曲目应用程序将停止响应并跳过曲目/播放/上一首曲目将不再响应。

我注意到在 iPod 应用程序本身上,完成播放列表后,它将返回到播放列表选择视图或返回到专辑选择视图。此时 MPMusicPlayerController 处于什么状态?当我的应用程序遇到这种状态时,如何使用它来启动 iPod 应用程序?

http://developer.apple.com/库/ios/#documentation/mediaplayer/reference/MPMusicPlayerController_ClassReference/Reference/Reference.html

I'm using MPMusicPlayerController and I have implemented skip track and previous track controls to control the music playback. When I reach the end of an album/playlist that is in the now playing list. The App no longer skips track nor goes previous track.

Example: First track of album, tap on previous track the app would stop responding and skip track/play/previous track will no longer respond.

Example: Last track of album, tap on previous track the app would stop responding and skip track/play/previous track will no longer respond.

I noticed on the iPod app itself, after it finishes a playlist it'll return to the playlist selection view or it'll return to the album selection view. What state is the MPMusicPlayerController in at this point of time? How can I use it to launch the iPod app when I encounter such a state within my App?

http://developer.apple.com/library/ios/#documentation/mediaplayer/reference/MPMusicPlayerController_ClassReference/Reference/Reference.html

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

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

发布评论

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

评论(2

没︽人懂的悲伤2024-10-27 13:21:15

我发现如果 repeatMode 设置为 MPMusicRepeatModeAll,下一首曲目将返回到播放列表中的第一项。我认为以前仍然无济于事。

因此,请如上所述使用通知,或设置 repeatMode 来防止这种情况发生。

I've found that if repeatMode is set to MPMusicRepeatModeAll, next track will go back to the first item in the playlist. I think previous will still do nothing.

So, use notifications as described above, or set repeatMode to prevent this from happening.

白鸥掠海2024-10-27 13:21:15

根据我的经验,状态变为 MPMusicPlaybackStateStopped 在这种状态下,播放列表实际上已经消失,需要通过再次播放 iPod Music 播放器来更新。您可以使用MPMusicPlayerControllerPlaybackStateDidChangeNotification来评估播放器的状况并执行您选择的操作。 通知编程主题http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/Notifications/Introduction/introNotifications.html#//apple_ref/doc/uid/10000043i< /a>

Based on my experience, the state becomes MPMusicPlaybackStateStopped In this state, playlist is actually gone, and needs to be update by playing iPod Music player again. You may use MPMusicPlayerControllerPlaybackStateDidChangeNotification to evaluate the condition of the player and do the action of your choice. Notification Programming Topics: http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/Notifications/Introduction/introNotifications.html#//apple_ref/doc/uid/10000043i

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