SRGSSR / srgmediaplayer-apple

An advanced media player library, simple and reliable
MIT License
158 stars 33 forks source link

tvOS bug: Crashes with non-reachable navigation markers in DVR streams #71

Closed defagos closed 4 years ago

defagos commented 5 years ago

tvOS has an issue with navigation markers we should report to Apple.

When defining navigation markers for a DVR stream, any navigation marker which lies outside the seekable window is automatically discarded by AVPlayerViewController.

This behavior is good, but sadly can lead to crashes. If the chapter selection UI is displayed while a marker gets out of the window, the UI is namely not correctly refreshed. As a result, attempting to select the last item in the chapter list crashes (the list itself is implemented with a collection view).

There is no issue when no marker list change occurs while the UI is visible.

Issue type

Help / documentation

Reproducibility

Always reproducible

Steps to reproduce

  1. Open the tvOS demo and the DVR segment example. This example has a first segment starting at the 5th second.
  2. Quickly reveal the chapter selection UI by swiping down on the remote.
  3. Wait ~10 seconds.
  4. Select the last chapter. The application crashes.

Remark: If waiting ~10 seconds before revealing the chapter selection UI, we can see that tvOS automatically discards markers outside the DVR window.

defagos commented 4 years ago

Fixed in tvOS 13 🎉