Videojs Captions Test

Captions test with Videojs with Nuevo plugin

Video.js supports WebVTT subtitles and closed captions both via the element on the website and embedded WEBVTT subtitles directly in the HLS manifest. CEA-608/708 captions are automatically detected when they are present in the stream.Nuevo skin was specially designed to display captions (CC) button and the captions menu for language selection and for captions settings container.
Once your WebVTT captions file ready you can easily add it to video tag using the track tag that you must put after all video source tags, e.g.
Code snippet
<video id="example_video_1" class="video-js" controls preload width="960" height="428" poster="path-to-poster.jpg" controls playsinline>
<source src="//" type="video/mp4" res="240" label="240p">
<source src="//" type="video/mp4" res="360" label="360p">
<source src="//" type="video/mp4" res="720" label="720p">
<source src="//" type="video/mp4" res="1080" label="1080p">
<track kind="captions" src="//" srclang="de" label="German">
<track kind="captions" src="//" srclang="en" label="English" default>
<track kind="captions" src="//" srclang="fr" label="French">
<track kind="captions" src="//" srclang="it" label="Italian">
Alternative to <track> video element is adding tracks programmatically once video is loaded.
Code snippet
player.on('loadeddata', function(){
{kind:"captions", src:"//", srclang:"en", label:English",default:"1"},
{kind:"captions", src:"//", srclang:"de", label:German"},
{kind:"captions", src:"//", srclang:"es", label:Spanish"}
WebVTT "captions settings" panel has been completely redesigned to look better and fit every device for all Nuevo skins. On iOS devices subtitles are displayed natively, option to change subtitle style is not available. Some styles you can change through iOS device settings. Nuevo plugin changes default subtitle background style from black to transparent and use raised font style. Still the user has an option to change subtitle style through the captions settings panel.