SRGSSR / srgletterbox-apple

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

Resume after seek issue with some content #266

Closed defagos closed 1 year ago

defagos commented 2 years ago

For some content (mostly RTS content), resuming after seek does not work. The player remains confused.

It is likely that some content is actually geoblocked content without DRM protection. Non-geoblocked content and SRF / RSI content (running on the new Akamai packaging / old packaging at the moment) does not seem affected.

Having a look at SRG Media Player, the issue seems related to the fact that SRGPlayer seek completion handler is never called with the finished boolean set to YES for such streams, preventing the state from being correctly updated. Though other players like the vanilla AVPlayerViewController seem to work, there is a likelihood that the issue is in the packaging itself, preventing AVPlayer to correctly detect seek completion in this case.

Issue type

Incorrect behavior

Environment information

Reproducibility

Always reproducible

Steps to reproduce

  1. Open Letterbox demo
  2. Under the Lists tab, open a documentary or a TV series (avoid DRM content).
  3. Pause the player
  4. Seek elsewhere with the slider. The player is confused.
defagos commented 2 years ago

Same issue on an iOS 13 device. Likely not an iOS regression, I really think this is somehow related to the new RTS stream packaging.

defagos commented 2 years ago

I briefly checked whether testing if (self.seekCount == 0) instead of if (finished) in the SRGPlayer seek completion handler could mitigate this issue, but the calls to seek / completion handler are unbalanced, so the issue is the same.

defagos commented 1 year ago

This issue has been fixed recently for RTS and I can confirm that the bug was related to unreadable I-frames in AES-encrypted streams. Some RSI content is namely affected in the same way (e.g. TV series) and I can reproduce the issue in Letterbox demo, while RTS documentaries now behave fine.

We'll notify RSI so that they can fix the issue on their side as well but we can consider this issue closed for Letterbox. The remaining work will be performed in https://github.com/SRGSSR/pillarbox-documentation/issues/42.