You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Displaying multiple subtitles simultaneously does not work when subtitles source is an hls/m3u8 live stream.
This appears to be caused by the fact that, in live streams, subtitles are not fully available at loading time but instead come in the form of .vtt chunks that must be fetched continuously during the live stream reproduction.
The process that fetches the .vtt chunks seems to be limited to the first active track - where the "first active track", in this context, is the first textTrack() with mode being hidden or showing; this way why only the "first active track"'s cues list gets updated.
Maybe parallel processes should be executed, one for each active subtitle track - may it be showing or hidden.
This issue differs from #5798 due to the live streaming context; in fact, option allowMultipleShowingTracks is used in the test case.
// Load player with allowMultipleShowingTracks
var vjs = videojs('demo', {
liveui: true,
textTrackDisplay: {
allowMultipleShowingTracks: true, // videojs#5817 solves issue videojs#5798
}
});
// Create a toggle button for each subtitle
vjs.textTracks().addEventListener('addtrack', event =>
{
let track = event.track;
if (track.kind !== 'subtitles') return;
let langButton = document.createElement('input');
langButton.type = 'button';
langButton.id = 'btn-' + track.label;
langButton.value = `${track.label}`;
document.getElementById('langButtons').appendChild(langButton);
langButton.addEventListener('click', _ => {
track.mode = (track.mode === 'showing') ? 'hidden' : 'showing';
});
});
If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
Unfortunately, this is a limitation of our streaming engine. It's only setup to handle one in-manifest text track at a time. The existing option essentially only applies to <track> elements or remote text tracks.
It's something that's been brought up before, and we'd like to support it, but we haven't gotten the chance to. It isn't something that we currently have a plan to work on.
Description
Displaying multiple subtitles simultaneously does not work when subtitles source is an hls/m3u8 live stream.
This appears to be caused by the fact that, in live streams, subtitles are not fully available at loading time but instead come in the form of
.vtt
chunks that must be fetched continuously during the live stream reproduction.The process that fetches the
.vtt
chunks seems to be limited to the first active track - where the "first active track", in this context, is the firsttextTrack()
withmode
beinghidden
orshowing
; this way why only the "first active track"'s cues list gets updated.Maybe parallel processes should be executed, one for each active subtitle track - may it be
showing
orhidden
.This issue differs from #5798 due to the live streaming context; in fact, option
allowMultipleShowingTracks
is used in the test case.Reduced test case
https://jsfiddle.net/g57wx246/29/
Steps to reproduce
Errors
No error displayed.
What version of Video.js are you using?
8.22.0
Video.js plugins used.
none
What browser(s) including version(s) does this occur with?
Chrome 133, Firefox 135
What OS(es) and version(s) does this occur with?
Windows 10
The text was updated successfully, but these errors were encountered: