Shareplay content (streaming using AVPlayer) is paused when returning from background to foreground (picture in picture or locked screen)
This only happen for one participant who initiated transition from background to foreground, all other participants have their content playing fine which leads to off sync between participants, content sync again if trigger player.play() for the participant who experienced the issue using playback position from other participants. How can I prevent content paused after returning from background to foreground.
P.S: Without SharePlay active session content is not paused with same scenario.
Post
Replies
Boosts
Views
Activity
We deliver 24h DVR window live streams to our customers and having issues AirPlaying those streams to all AirPlay 2 Compatible TV
There are 2 cases with different outcomes we found
Case 1.
start watching a LIVE stream with DVR window more than 14 hours on any iOS device from safari or any App with AVPlayer that supports airplaying
Cast to any AirPlay 2 Compatible TV
Observe playback fails with an error
Domain: Other error
Comment: No valid variant enabled
Status code: 0
Case 2.
start watching a LIVE stream with growing DVR window with initial DVR window less then 13 hours on any iOS device from safari or any App with AVPlayer that supports airplaying
Cast to any AirPlay 2 Compatible TV
Wait until DVR window grows to 14hours+
Observe airplay disconnected on any AirPlay 2 Compatible TV
Observe Safari player saying it is still connected to AirPlay 2 Compatible TV (or crash in case of Mobile app that supports airplaying)
Expected behaviour:
Stream continues to play on AirPlay 2 Compatible TV regardless of Live stream DVR Window after casting from iOS device
Additional info:
we use 6 second segments for our live streams
issue is not present when airplaying to AppleTV
Please let us know how to fix this issue, thanks
AVPlayer is not dented and continues playing in background when AVPictureInPictureController is used for pip mode. Manualy removing all strong references to AVPlayer does not help
when is it appropriate to listen for activity sessions if my app has multiple screens?
Lets say I have an app
Main Screen -> List of videos Screen -> Player screen
Few cases that I would like to combine:
Two people on a call, both have app closed:
If I start session inside Player, other participant will open an app on main screen how do I navigate it to the player initially? Should I start listening for activity session on the main screen already and then if session is observed I need to set navigation stack and join session side player when it opens?
Two people on a call, both have app opened and watching different contents:
If I start session inside Player, other participant will replace it's current playing item with one that is shared
how to combines this two cases with one implementation? Or SharePlay is not meant to be leading you right to the player screen when shareplay starts, and users should open same content manually before shareplaying?