1

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!

pablasso
  • 2,479
  • 2
  • 26
  • 32
Tyler
  • 911
  • 1
  • 6
  • 3
  • Never mind, I used a workaround by monitoring when the song ended through the AVPlayer AVPlayerItemDidPlayToEndTimeNotification and then adding items to the queue then. – Tyler Jul 28 '11 at 18:57
  • This looks related: http://stackoverflow.com/questions/4218090/pre-buffering-for-avqueueplayer – Jacob Jennings Nov 15 '11 at 18:58

0 Answers0