Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VTT captions not loading/displaying immediately on iPhone, despite being within a visible timeframe #6918

Closed
daniemo2 opened this issue Dec 17, 2024 · 2 comments
Labels
Bug Confirmed Bug report confirmed or reproduced. Suggested-Workaround Works in latest The issue reported has already been fixed and works as expected in the latest release
Milestone

Comments

@daniemo2
Copy link

What do you want to do with Hls.js?

Opening as a question as I'm not sure if this is a bug or simply something I can configure.

Reproducible on this demo page: https://hlsjs.video-dev.org/demo/?src=https%3A%2F%2Fmtoczko.github.io%2Fhls-test-streams%2Ftest-group%2Fplaylist.m3u8&demoConfig=eyJlbmFibGVTdHJlYW1pbmciOnRydWUsImF1dG9SZWNvdmVyRXJyb3IiOnRydWUsInN0b3BPblN0YWxsIjpmYWxzZSwiZHVtcGZNUDQiOmZhbHNlLCJsZXZlbENhcHBpbmciOi0xLCJsaW1pdE1ldHJpY3MiOi0xfQ==

With the above stream, it has a VTT playlist configured to continuously show a caption of '1080p' for a couple of seconds every second. On Chrome, if I enable captions, it will immediately request the playlist.m3u8 file, the next few .vtt files and then start showing captions.

On iOS, it loads the playlist.m3u8 file however doesn't request the .vtt files until after the next .ts file is requested, which could be a few seconds. Therefore the captions don't show until after a few seconds. Ideally it would mirror the behaviour on Chrome.

Is this something I can configure? A browser restraint? A bug?

Thanks!

What have you tried so far?

No response

@daniemo2 daniemo2 added Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. Question labels Dec 17, 2024
@robwalch robwalch added Bug Confirmed Bug report confirmed or reproduced. and removed Question Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Dec 17, 2024
@robwalch robwalch added this to the 1.5.18 milestone Dec 17, 2024
robwalch added a commit that referenced this issue Dec 17, 2024
@robwalch
Copy link
Collaborator

Thanks for reporting this issue. This was a bug in how ManagedMediaSource streaming events were handled. All loading of segments including subtitles was stopped on "endStreaming" (30 seconds in the buffer) and not resumed until "startStreaming" is dispatched (when the buffer is down to 10 seconds or less).

A fix has been released in patch v1.5.18. The workaround would be to call hls.resumeBuffering() changing subtitle tracks.

@robwalch robwalch added Suggested-Workaround Works in latest The issue reported has already been fixed and works as expected in the latest release labels Dec 17, 2024
@daniemo2
Copy link
Author

Thanks a lot for the quick turnaround @robwalch! Much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed Bug report confirmed or reproduced. Suggested-Workaround Works in latest The issue reported has already been fixed and works as expected in the latest release
Projects
None yet
Development

No branches or pull requests

2 participants