Wednesday 15 August 2012

javascript - How not to display the captions when video starts playing using videojs? -


I am using Video.js for a customized video player and by default this caption shows when video games begins. How can the closed captions on Start / Autoplay be disabled?

  & lt; Video ID = "myPlayer" class = "video-js vjs-sublime-skin" width = "1024px" height = "768px" Control Autoplay preload data-setup = '{"Native Control Force Touch": false}' & gt; & Lt; Source src = "../ video / brandt.mp4" type = 'video / mp34' / & gt; & Lt; Track class = "caption" type = "caption" src = "..// video / brand.weet" type = "text / plain" srclang = "en" label = "english" default /> & Lt; / Video & gt;  

answer from the answer < / P>

Excerpt from there.

Showing - Text track is visible and updates and firing events
Disabled - Track track is not visible events and shootings
Hidden - Track track visible Not, but it is firing events.

So, to hide a track, you can do this:

  player.textTracks () [0] .mode = 'disabled';  

No comments:

Post a Comment