如何解决Apple Music Api SkiptoNextItem无法正常工作
试图跳到队列中的下一个项目,但是当调用applicationMusicPlayer.skipToNextItem()时,队列中的位置没有改变,当前曲目只是重新开始。队列由字符串项ID的数组组成。
self.applicationMusicPlayer.setQueue(with: trackIDs)
这是用于跳到队列中下一个项目的代码
@IBAction func nextSong(_ sender: Any) {
print("current Index in Queue: \(self.playlistManager.applicationMusicPlayer.indexOfNowPlayingItem)")
self.playlistManager.applicationMusicPlayer.skipToNextItem()
print("After skip: \(self.playlistManager.applicationMusicPlayer.indexOfNowPlayingItem)")
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。