Turn off automatic apply of Closed Caption tracks #8365
Unanswered
PedjaCucak
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hi @PedjaCucak If you can modify the playlist, it is possible to set the Alternatively, you can do the following: If the player.getCache().selectedLanguage = { enabled: false };
player.src('https://d2zihajmogu5jn.cloudfront.net/bipbop-advanced/bipbop_16x9_variant.m3u8'); If the player.loadMedia(
{
src: 'https://d2zihajmogu5jn.cloudfront.net/bipbop-advanced/bipbop_16x9_variant.m3u8'
},
() => {
player.getCache().selectedLanguage = { enabled: false };
}
); In some cases, the above solution may not work, in which case you can do the following: // Disables subtitles every time you load new media
player.on('loadedmetadata', ()=> {
player.one('play', ()=> {
Array.from(player.textTracks()).filter(({kind}) => !['chapters','metadata'].includes(kind)).forEach((track) => track.mode = "disabled")
});
});
player.src('https://d2zihajmogu5jn.cloudfront.net/bipbop-advanced/bipbop_16x9_variant.m3u8');
// Or
player.loadMedia({
src: 'https://d2zihajmogu5jn.cloudfront.net/bipbop-advanced/bipbop_16x9_variant.m3u8'
}); With all these suggestions you can choose what suits you best or it will help you find another approach. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to turn off automatic apply of Closed Caption tracks (never mind that they have DEFAULT and AUTOSELECT)?
If in manifest I have something like this:
#EXT-X-MEDIA:TYPE=CLOSED-CAPTIONS,GROUP-ID="Closed Captions",NAME="en",DEFAULT=YES,AUTOSELECT=YES,LANGUAGE="en",INSTREAM-ID="CC1"
Video.js will automatic show this track on screen, is there a way to turn this off, I don't want player to show track automatic, never mind it has default and autoselect set to true?
Is there some property with which I can configure player not to show CC tracks automatically?
Show them only when user select CC track manually.
Thanks in advance,
Pedja
Beta Was this translation helpful? Give feedback.
All reactions