Open defagos opened 2 years ago
Can be reproduced in SRG Media Player controller demo:
Note that the view has to be displayed once at least. If the view is removed before playback (or not installed at all), the issue does not appear.
It is obvious that this behavior is related to the fact that a PiP controller is bound to the player layer, even if this layer is not installed in the hierarchy.
We cannot destroy the PiP controller to avoid this behavior when the layer is not installed, as this would break PiP as soon as the player view is removed from the hierarchy (e.g. player screen dismissal when PiP is entered). For this reason I think there is no way to solve this issue.
I'll check the behavior on iOS < 14 to see if this is an iOS regression which appeared with iOS 14, but I doubt we can do more than reporting this issue to Apple.
Tested with iOS 13.7, the behavior is correct: If the video layer is attached, playback is paused when moving to the background with the LB view dissociated from the player, and no PiP overlay appears.
It seems to me this is really an iOS 14 regression which we cannot do much with. We should keep track of potential improvements made in later iOS releases and, if this is really an issue, open a dedicated Apple bug report.
If no Letterbox view is attached, PiP might still be automatically enabled. This should not be the case.
Issue type
Incorrect behavior
Environment information
Reproducibility
Always reproducible
Steps to reproduce
On iOS 15 PiP is automatically enabled. On 14.8 the behavior is left in an inconsistent state.