I am playing a Tv-show that has been sliced to different chapters on my project using an AVQueuePlayer. I also want to offer the possibility to skip to the previous/next chapter or to select a different chapter on the fly, while the AVQueuePlayer is already playing.
Skipping to next Item is no problem with the advanceToNextItem
provided by AVQueuePlayer, but there is nothing alike for skipping back or playing a certainitem from the queue.
So I am not quite sure what would be the best approach here:
- Using an AVPlayer instead of AVQueuePlayer, invoke
replaceCurrentItemWithPlayerItem:
atactionAtItemEnd
to play the nextItem and just use 'replaceCurrentItemWithPlayerItem' to let the User select a certain Chapter
or
- reorganise the queue or the current player by using 'insertItem:afterItem:' and 'removeAllItems'
Additional information: I store the Path to the different videos in the order they should appear in a NSArray The user is supposed to jump to certain chapters by pressing buttons that represent the chapter. The Buttons have tags, that are also the indexes of the corresponding videos in the array.
Hope I could make myself clear? Anyone having any experience with this situation? If anyone knows where to buy a good IOS VideoPlayerFramework which provides the functionality, I would also appreciate the link.