My app shows a kind of a movie list(http streaming), each movie item should be autoplayed when it becomes visible.
Each movie is implemented using AVPlayer, Each non visible AVPlayer item is pre-rolled in order to reduce the streaming delay once it become visible.
I've noticed that AVPlayer status changed to AVPlayerStatusReadyToPlay after the preroll(about 3-4 sec) finished.
however I've also noticed that the AVPlayer continues buffering after preroll finished.
I have tried to stop the buffering as follows but they all fail:
- AVPlayer.pause
- AVPlayer:prerollAtRate:0 (set the rate to zero)
- AVPlayer:cancelPendingPrerolls
I could stop the buffering only with AVQueuePlayer as follows:
<instead of init AVPlayer, I have init AVQueuePlayer>
[queuePlayer removeAllItems];
however this will dispose all the preroll data.
Is it posible to control the AVPlayer buffering?
Is it posible to pause the buffering after preroll finished?
thanks
amir.