AVPlayer not notifying playbackLikelyToKeepUp and playbackBufferEmpty correctly when offline and buffer runs out

Originator:0xTimC
Number:rdar://25931165 Date Originated:26/04/2016
Status:Open Resolved:
Product:iOS AVPlayer Product Version:9.3.1
Classification: Reproducible:Yes
 
26-Apr-2016 04:19 PM

Summary:
When playing a video through AVPlayer, if you go offline and then background the app, when resuming the player continues to play the buffered content but does not set playbackLikelyToKeepUp or playbackBufferEmpty correctly. This is reproducible across a number of apps that use AVPlayer

Steps to Reproduce:
1. Play a piece of content with AVPlayer
2. Go offline (airplane mode)
3. Background the app
4. Bring app back into foreground
5. Continue playing content

Expected Results:
AVPlayer will continue to play content from its buffer and playbackBufferEmpty is still NO until the buffer has been empty, when it will be set to YES. playbackLikelyToKeepUp is set to NO when the buffer runs out.

Actual Results:
Playback continues but playbackBufferEmpty is set to YES immediately and playbackLikelyToKeepUp never set to NO.

Version:
iOS 9.3.1 and iOS 9.2.0

Notes:
This can be demonstrated in a number of apps such as BBC iPlayer and Youtube - load a video and enable subtitles, go offline, background, and then foreground the app, play and once the buffer has run out, the video stops playing but the time continues to tick along and subtitles are still displayed. This also occurs when playing videos in Safari - if you follow the steps above the time continues to tick along and the scrubber continues to move along even though the video has stopped. It seems that you have to background the app to be able to reproduce the problem - if you just go offline and wait playbackLikelyToKeepUp is set correctly.

Configuration:
iPad Mini A1489 and iPhone 6 Plus A1524 over Wifi

Attachments:

Comments

We are also experiencing the same issue on iOS 10 devices as well. AvPlayer properties are not updating correctly in this scenario.

-Suraj Jagga (Nielsen Company)

By suraj.jagga at June 2, 2017, 6:37 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!