-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Level Controller - Captions Not Available #6965
Comments
Hls.js does not expose 608 captions as HLS subtitle tracks. It does however add a TextTrack of kind “captions” to the media element so that they can be selected. |
Hi @robwalch, thank you for your response! Apologies for my lack of knowledge on this subject, but why can't 608 captions be exposed via HLS subtitle tracks? Asking for my own understanding, I don't doubt there is a valid reason for this Adding captions as media element |
The subtitle tracks are known when the MVP is parsed, but the captions may not be unless signaled with
TextTracks are added for captions, subtitles, and metadata. Setting a textTrack mode to "show" is the preferred way of selecting the active track. This aligns with the browser's media controls and native HLS playback in Safari. You can disable the use of TextTracks completely by setting |
Calling |
Thank you for your detailed explanation @robwalch! This makes more sense to me now, Is it alright if I add a feature request to manage captions & subtitles together in v2? |
Absolutely. Please do. |
What version of Hls.js are you using?
1.5.19
What browser (including version) are you using?
Version 131.0.6778.266 (Official Build) (arm64)
What OS (including version) are you using?
Mac OS Ventura (13.5)
Test stream
No response
Configuration
Additional player setup steps
Checklist
Steps to reproduce
Subtitle tracks are missing for playlists with
captions
.HLS.js parses video playlists in
m3u8-parser.parseMasterPlaylistMedia()
. This creates separateCLOSED_CAPTIONS
andSUBTITLES
properties as part of theManifestLoadedData
payload. Then, thelevel-controller.filterAndSortMediaOptions()
parses the payloaddata
, but only checks ifdata.subtitles
is available, notdata.captions
. Thus, I suggest adding the following:I believe this is a viable solution, but I'm not sure if there are side-effects I might not be considering. While I cannot provide a stream URL directly, here's some sample playlist data:
Expected behaviour
CLOSED_CAPTIONS
subtitlesthis.hls.subtitleTracks
has the text tracks availableWhat actually happened?
CLOSED_CAPTIONS
subtitlesthis.hls.subtitleTracks
has no text tracks availableConsole output
The text was updated successfully, but these errors were encountered: