Airplay stop playing video streaming when app is in background or device locked

Hello everyone,


I'am using an AVPlayerViewController for playing video in streaming.

When I launch Airplay on the AVPlayerViewController on the Apple TV and put the app in background or if I lock the device, the video paused on the Apple TV.


I verify that like in this post https://developer.apple.com/library/archive/qa/qa1668/_index.html#//apple_ref/doc/uid/DTS40010209

  • I had check the background audio, airplay mode
  • My audio Session is started and active in AVAudioSessionCategoryPlayback
  • My AVPlayer is in playing mode when I go in background or if I lock the device


I read the 'Special Considerations for Video Media' paragraph of this post https://developer.apple.com/library/archive/qa/qa1668/_index.html#//apple_ref/doc/uid/DTS40010209,

but they don't spoke about the AVPlayerViewController.


I understdand that video is not one of the possible background mode capabilities but Airplay is.

So do you have any way to have the video stream audio/image playing with the app' in background or device locked using the AVPlayerViewController ?


Thank you in advance for your advices or any technical link that I would have missed.



So nathshift it can be a technical error or some problem would have occured but it should be investigated more...

Hello,


Thank you for your contribution.


Sadly there is no error detected by listening abvout AVPlayerItemNewErrorLogEntryNotification, AVPlayerItemPlaybackStalledNotification...

This problem is systematic and not drived by a network latency or something like that.


Any other idea ?

Airplay stop playing video streaming when app is in background or device locked
 
 
Q