Closed defagos closed 3 years ago
The bug is due to the fact that we ignore accessibility settings when finding the default subtitle track. The bug has been fixed on the feature/sdh-fix
branch.
Note that, as described above in the Steps to reproduce, enabling the SDH setting for the first time manually sets the corresponding language at the system level (i.e. if Automatic was previously selected it will be selected). This behavior is a system one and affects AVPlayerViewController
in the same way. What is important, though, is that Automatic mode then properly chooses this very same track while the Accessibility SDH setting remains enabled, which was the bug reported in this issue.
When enabling the SDH setting, the system in fact saves (probably with the media accessibility API) the current system language as latest manual choice. This is easy to see:
For some RTS content (at least), we have no track language information. The condition had to be fixed to take this fact into account and check for subtitles first.
4.4. The presence of closed captions MUST be declared via an EXT-X-MEDIA tag that contains a LANGUAGE attribute.
It's part of 4. Accessibility requirements.
Nothing required in #EXT-X-STREAM-INF
about language.
Your fix takes care of this optional information. 👍🏻
When the SDH accessibility preference has been set, and if an appropriate SDH track is available, it is not automatically selected in Automatic mode.
Issue type
Incorrect behavior
Environment information
Reproducibility
Always reproducible
Steps to reproduce