I am playing an array of AVPlayerItems
that pull from mp3 URLS with an AVURLAsset
. I'm using the AVQueuePlayer
, naturally, but when I init the player with the array it tries to buffer ALL of the AVPlayerItems
at the same time!
So the app freezes until it is done, THEN it plays the first song (after a good 5 minutes) and I can press the next button to go on to the following songs with NO buffer time in between. It's like it downloaded all the songs then decided to start the play queue.
Any way I can stop this? I've tried everything from using a foreach to add the songs (does the same thing) to loading the next song when the next button is pressed (works, but how would I make it do that when the song is over automatically?).
Summary of my problem:
Every time I add an AVPlayerItem
to the AVQueuePlayer
queue it buffers it then and there, instead of waiting for the current AVPlayerItem
(that's playing) to finish before it starts buffering the next.
Super Short Summary of my problem:
AVQueuePlayer
buffers every AVPlayerItem
in an array upon init.
Thanks for the help, I really appreciate it!