Controlling AVPlayer buffering

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:

  1. AVPlayer.pause
  2. AVPlayer:prerollAtRate:0 (set the rate to zero)
  3. 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.

Prerolling doesn't seem to be supported for HLS:


"Note that advanced rate control is not currently supported for HTTP Live Streaming."


    /!
    @method prerollAtRate:completionHandler:
    @abstract Begins loading media data to prime the render pipelines for playback from the current time with the given rate.
    @discussion Once the completion handler is called with YES, the player's rate can be set with minimal latency.
    The completion handler will be called with NO if the preroll is interrupted by a time change or incompatible rate change, or if preroll is not possible for some other reason.
    Call this method only when the rate is currently zero and only after the AVPlayer's status has become AVPlayerStatusReadyToPlay.
  
    Note that advanced rate control is not currently supported for HTTP Live Streaming.
    @param rate The intended rate for subsequent playback.
    @param completionHandler
    The block that will be called when the preroll is either completed or is interrupted.
    */
    @available(tvOS 6.0, *)
    public func prerollAtRate(rate: Float, completionHandler: ((Bool) -> Void)?)
Controlling AVPlayer buffering
 
 
Q