Hi, I saw that hls.js provides getter and setter for subtitleTrack.
I was trying to use it to switch subtitles via the hls.js api to avoid doing it via the html5 video api.
Is it supposed to work at all?
Play the stream:
http://cdnbakmi.kaltura.com/p/243342/sp/24334200/playManifest/entryId/0_uka1msg4/flavorIds/1_vqhfu6uy,1_80sohj7p/format/applehttp/protocol/http/a.m3u8
Hls provides in his MANFIEST_LOADED event few subtitles tracks.
Try switch subtitles via the api:
hls.subtitleTrack =
I can confirm this. After using the setter, the video tag's text tracks objects aren't updated to switch the active track to showing.
Marking this as a bug for now but I'm not quite certain this feature was ever implemented. As far as I understand the native player's CC button does the job of manipulating the mode of each track (which lets them display or not); Hls.js just listens for these changes and updates it's internal state accordingly. I don't see anything in our codebase which actually sets this mode. In JWPlayer we manage this stuff ourselves.
@johnBartos you are right that the native CC button already does the job of manipulating the mode of each track, but in my case I don't want to use the native html controls for video tag, but to use my own custom UI. In that case, I was think it just reasonable that hls.js will wrap me this implementation with his own api (I just observe that setter and thought this is his purpose).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I am having the same issue. I need to get the subtitle track to play by default.
I also observed manually setting the subtitle track doesn't flip the mode.
Most helpful comment
@johnBartos you are right that the native CC button already does the job of manipulating the mode of each track, but in my case I don't want to use the native html controls for video tag, but to use my own custom UI. In that case, I was think it just reasonable that hls.js will wrap me this implementation with his own api (I just observe that setter and thought this is his purpose).