1

Trying to skip to the next item in the queue, but when applicationMusicPlayer.skipToNextItem() is called, the place in the queue doesn't change, the current track just starts over. The queue is composed of an array of string item IDs.

   self.applicationMusicPlayer.setQueue(with: trackIDs)

And here is the code used to skip to the next item in the queue

@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)")
    }
The Swift Coder
  • 390
  • 3
  • 13

0 Answers0