SRGSSR / srgletterbox-apple

The official SRG SSR media playback experience
https://srgssr.github.io/marketing/letterbox/
MIT License
14 stars 7 forks source link

Picture in picture can be enabled on instances not registered with the Letterbox service #254

Closed defagos closed 2 years ago

defagos commented 2 years ago

Picture in picture should only be available for controllers registered with the service, provided the app has been properly configured (background capabilities, audio session).

It might be a change introduced with iOS 14 and the iPhone PiP support, but we can now enable PiP for standalone controllers, probably because they have an underlying AVPictureInPictureController always available.

This should be fixed. Being able to test on iPadOS 14 and older iOS / iPadOS versions could also be helpful to know if this issue is a regression related to a major iOS release, or simply a bug we introduced. The problem probably also requires a fix to be implemented in SRG Media Player.

Issue type

Incorrect behavior

Environment information

Reproducibility

Always reproducible

Steps to reproduce

  1. Open Letterbox demo.
  2. Play a simple player demo under the Miscellaneous tab.
  3. Send the app to the background. PiP is automatically (and incorrectly) enabled.
defagos commented 2 years ago

I thought that setting canStartPictureInPictureAutomaticallyFromInline to NO would solve the issue, but this is not the case.

defagos commented 2 years ago

The fix requires an addition to SRG Media Player to enable PiP depending on whether the controller instance is registered with the service or not.

defagos commented 2 years ago

Fixed in 6.1.5.