SRGSSR / pillarbox-apple

A next-generation reactive media playback ecosystem for Apple platforms.
https://testflight.apple.com/join/TS6ngLqf
MIT License
43 stars 6 forks source link

Remove chapters with non-matching media type #838

Closed defagos closed 3 weeks ago

defagos commented 3 weeks ago

Description

Some RTS Forum video episodes (e.g. urn:rts:video:14827796) are delivered with the corresponding full-length audio as part of the chapter list, with fullLengthMarkin and fullLengthMarkOut both set to zero. The resulting behavior is awkward:

IMG_2519

Though this could be seen as a backend or metadata issue, the media composition is flexible enough to allow such use cases. Letterbox also currently supports such use cases, though the user experience might be awkward (tapping on the audio content makes the context switch to the audio-only context).

For the moment I think we sadly have to fix the issue client-side. This is what this PR does by parsing the media type and ensuring chapters all have the same media type as the main content.

Changes made

Checklist