An HTML5 and Flash video player with a common API and skin for both.
Video.js is a web video player built from the ground up for an HTML5 world. It supports HTML5 and Flash video, as well as YouTube and Vimeo (through 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 websites.
Thanks to the awesome folks over at Fastly, there's a free, CDN hosted version of Video.js that anyone can use. Simply add these includes to your document's
Then, whenever you want to use Video.js you can simply use the
<video> element as your normally would, but with an additional
data-setup attribute containing any Video.js options. These options
can include any Video.js option plus potential plugin options, just make sure they're valid JSON!
If you don't want to use auto-setup, you can leave off the
data-setup attribute and initialize a video element manually.
var player = videojs'really-cool-video' /* Options */console.log'Good to go!';thisplay; // if you don't trust autoplay for some reason// How about an event listener?thison'ended'console.log'awww...over so soon?';;;
Video.js is a free and open source library, and we appreciate any help you're willing to give. Check out the contributing guide.
Video.js is licensed under the Apache License, Version 2.0. View the license file
Copyright 2014 Brightcove, Inc.