

Beyond the basic markup, Video.js needs a few extra pieces. Video.js will then read the tag and make it work in all browsers, not just ones that support HTML5 video. With Video.js you just use an HTML5 video tag to embed a video. Step 2: Add an HTML5 video tag to your page. Additionally include the videojs-vtt.js source, which adds the WebVTT object to the global scope. Should Just Work™, but the paths can easily be changed by editing the LESS file and re-building, or by modifying the generated CSS file.

If you simply copy the dist folder or zip file contents into your project everything To entirely self-host, you'll need to pull in the font files and let Video.js know where the swf is located. Install via package manager NPM $ npm install -save video.js If you'd like to disable analytics, you can simply include the following global before including Video.js: window.HELP_IMPROVE_VIDEOJS = false This allows us to see (roughly) what browsers are in use in the wild, along with other useful metrics such as OS and device. We include a stripped down Google Analytics pixel that tracks a random percentage (currently 1%) of players loaded from the CDN. Īlternatively you can always go here to get the latest URL for videojs CDN. In order to continue to support IE8, we've bundled an ES5 shim and sham together and hosted it on the CDN. As of Video.js 5.0, the source is transpiled from ES2015 (formerly known as ES6) to ES5, but IE8 only supports ES3. You can download the Video.js source and host it on your own servers, or use the free CDN hosted version. Step 1: Include the Video.js Javascript and CSS files in the head of your page. It can take a matter of seconds to get the player up and working on your web page.
