Video.js

Open source HTML5 & Flash video player

README

![Video.js logo][logo]

[Video.js - HTML5 Video Player][vjs]

[![Build Status][travis-icon]][travis-link] [![Coverage Status][coveralls-icon]][coveralls-link] Greenkeeper badge [![Slack Status][slack-icon]][slack-link]
[![NPM][npm-icon]][npm-link]

Video.js is a web video player built from the ground up for an HTML5 world. It supports HTML5 video and Media Source Extensions, as well as other playback techs like YouTube and Vimeo (through [plugins][plugins]). It supports video playback on desktops and mobile devices. This project was started mid 2010, and the player is now used on over 50,000 100,000 200,000 400,000 [700,000 websites][builtwith].


Table of Contents



Quick Start


Thanks to the awesome folks over at [Fastly][fastly], there's a free, CDN hosted version of Video.js that anyone can use. Add these tags to your document's ``:

  1. ``` html
  2. <link href="//vjs.zencdn.net/7.10.2/video-js.min.css" rel="stylesheet">
  3. <script src="//vjs.zencdn.net/7.10.2/video.min.js"></script>
  4. ```

For the latest version of video.js and URLs to use, check out the [Getting Started][getting-started] page on our website.


Video.js version 7 (and newer) CDN builds do not send any data to Google Analytics.

In older versions of Video.js (6 and earlier), in the vjs.zencdn.net CDN-hosted versions we include a stripped down Google Analytics pixel that tracks a random sampling (currently 1%) of players loaded from the CDN. This allows us to see (roughly) what browsers are in use in the wild, along with other useful metrics such as OS and device. If you'd like to disable analytics, you can simply include the following global before including Video.js via the free CDN:

  1. ``` html
  2. <script>window.HELP_IMPROVE_VIDEOJS = false;</script>
  3. ```

Alternatively, you can include Video.js by getting it from npm, downloading from GitHub releases or by including it via unpkg or another JavaScript CDN like CDNjs. These releases _do not_ include Google Analytics tracking at all.

  1. ``` html
  2. <link href="https://unpkg.com/video.js/dist/video-js.min.css" rel="stylesheet">
  3. <script src="https://unpkg.com/video.js/dist/video.min.js"></script>
  4. <link href="https://unpkg.com/video.js@7.10.2/dist/video-js.min.css" rel="stylesheet">
  5. <script src="https://unpkg.com/video.js@7.10.2/dist/video.min.js"></script>
  6. <link href="https://cdnjs.cloudflare.com/ajax/libs/video.js/7.10.2/video-js.min.css" rel="stylesheet">
  7. <script src="https://cdnjs.cloudflare.com/ajax/libs/video.js/7.10.2/video.min.js"></script>
  8. ```

Next, using Video.js is as simple as creating a `