SRGSSR / srgletterbox-apple

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

Bad interactions with the system player started from a web view #194

Closed defagos closed 4 years ago

defagos commented 4 years ago

Playback issues

According to discussions with other teams, it appears that starting playback in a web view (with the system player) changes the playback state of a Letterbox controller to pause, then play, after which the controller remains in a somehow inconsistent state.

Context:

Control center issues

For applications in which videos can be played from a web view, subsequent playbacks with Letterbox will not display control center information anymore.

This behavior is incorrect, but might be related to an iOS regression. Doing the same with iOS 10 namely works.

To verify whether this is an iOS issue, we should use a simple project with both an AVPlayer and control center integration, as well as a web view.

Issue type

Incorrect behavior

Environment information

Reproducibility

Always reproducible

Steps to reproduce

With an app mixing Letterbox native playback and webview playback:

  1. Play some media with Letterbox, check integration with the control center.
  2. Play a video from the web view, in full screen.
  3. Play another media with Letterbox. No control center integration is available anymore.
defagos commented 4 years ago

We should first create a small example in SRG Media Player demo directly. The issue is probably there.

defagos commented 4 years ago

Starting with the Terms & conditions page, and using the burger menu in Play RTS, it is quite easy to get to a page containing a video, e.g. Travailler à la RTS. I used the following test scenario:

I repeated this test with the following versions:

The bug is clearly visible with 322, fixed with 325. It is also fixed in the current Play 3.0.0 (Letterbox 4.0.0). I conclude that the control center refactoring of 3.0.0 fixed this issue.