AVQueuePlayer Dropping Current AVPlayerItem

When AVQueuePlayer loads an AVPlayerItem, after the item's duration has elapsed, if the player is currently paused it will drop the current item from the queue. This issue is 100% reproducible locally.

When we use an AVPlayer instead of an AVQueuePlayer, the issue does not occur. When, after the item's duration has elapsed, the player happens to be playing, it will buffer and continue playing.

Could you create a bug report for this issue, and post the number here? That would be a big help.

I submitted a report via the feedback assistant (FB9221518), and have narrowed down the STR:

  1. Play an HLS item in AVPlayer or AVQueuePlayer, setting preferredForwardBufferDuration to 20.0
  2. Pause the item after a second or two, and wait in real time for the item's total duration to elapse
  3. The currently paused item will no longer be playable, and the actionAtItemEnd behavior will trigger, even though the item hasn't reached its end, having remained paused near the beginning of playback.

We found that setting the preferredForwardBufferDuration to 20.0 was required in order to reproduce the issue. When setting to 0.0 the player behaves as expected and the bug does not manifest.

This occurs for both AVPlayer and AVQueuePlayer, and the exact manifestation of the bug depends on the actionAtItemEnd property.

For AVQueuePlayer, it'll either advance to the next item (or nil), or the paused frame still will remain frozen on the AVPlayerLayer.

For AVPlayer, the paused frame will remain frozen. In any scenario, the item that was paused when the item's duration had elapsed in real time would no longer be playable.

Setting preferredForwardBufferDuration explicitly to 0.0 was required to avoid the bug. Leaving it at whatever default value seems to continue to allow the bug to manifest.

AVQueuePlayer Dropping Current AVPlayerItem
 
 
Q