You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As an app developer I want to be able to use Picture in Picture with any layout configuration, as for VideoView, without it being interrupted and without any video layer being lost.
Acceptance criteria
The VideoView PiP demos are provided for SystemVideoView as well.
All possible use cases work equally well with SystemVideoView.
Tasks
Update PiP-related demos with corresponding system video view entries.
Adopt similar strategy as VideoView to fix issues.
We previously did not implement PiP dismissal for our inline system video view demo. Dismissal is in fact possible but should occur after PiP started, otherwise the system might pause playback for some reason. We have updated our documentation and demos accordingly.
During our implementation we wanted to add a Player parameter to PiP delegate / lifecycle methods. When several PiP-enabled views are displayed at the same time, the implementation namely doesn't know which player PiP is started for. We thus thought this additional piece of information could be helpful (e.g. so that implementations can pause other players), but discovered during implementation that this was adding a lot of unnecessary complexity in our implementation, especially related to the lifecycle of involved objects. Not adding a player parameter to PiP delegate / lifecycle methods should not be a problem, though, as PiP should really be enabled for one view at a time, which means an implementation must know the current player identity already.
We discovered that setting the contentSource of a PiP controller does not properly cleanup all associated resources, as could be naively expected. To solve this issue it suffices to assign an empty source (content source built from a dummy layer) instead.
We tried an alternative implementation to avoid PiP issues when started from full-screen system video view presentation (avoiding the use of viewWillAppear(_:) and associated presentation information) but this was not working in edge cases (e.g. when replacing the player view in the SRF Sports app with a SystemVideoView). The original approach was therefore preserved. Because of new view controller hosting we had to introduce, though, presentation information must be obtained by navigating the view controller hierarchy upwards, as is done in Play SRG.
As an app developer I want to be able to use Picture in Picture with any layout configuration, as for
VideoView
, without it being interrupted and without any video layer being lost.Acceptance criteria
VideoView
PiP demos are provided forSystemVideoView
as well.SystemVideoView
.Tasks
VideoView
to fix issues.The text was updated successfully, but these errors were encountered: