Extension:TimedMediaHandler/VideoJS Player



The VideoJS Player is the replacement video player for MediaWiki and will soon replace the older video player featured on Wikimedia projects.

It is based on [ https://videojs.com/ VideoJS], and has a more modern, faster user interface with compatibility for mobile devices and HTML5.

You can opt-in to use it on Wikimedia wikis as a desktop Beta Feature by going to your preferences.

Usage


There is both an audio and video player. You can find examples of both players on this page. Once launched you will see a control bar when interacting with the video.

The controls in order from left to right are:
 * Play/pause control
 * Volume control
 * Playback position
 * Remaining playback time
 * Subtitle language selector and subtitle style controls
 * Resolution selector
 * Optional Picture-in-Picture control
 * Fullscreen control
 * Info button to take you to the file description page

Mouse and keyboard controls

 * Click the play icon above the thumbnail to begin playback of the media file.
 * Right click or middle click the thumbnail to open the file description page
 * Play/Pause the player with a single mouse click inside the player window
 * Double click the player window to enter or leave fullscreen mode
 * The following keyboard controls are available:
 * k / spacebar-key : Play/pause the media playback
 * f-key : Enter/Leave fullscreen
 * m-key : Mute the audio
 * The player is fully keyboard accessible using tab/enter/spacebar controls

Why?
The player that Wikimedia used since 2010 has several significant downsides, which were limiting us in making further improvements.


 * Not widely used by others.


 * Written before HTML5 video was standardised.


 * Uses its own subtitling system.


 * Written to be compatible with Internet Explorer 6 and used the JavaScript standards of those times.


 * Written before our own JavaScript stack was developed.


 * It is difficult to make it work correctly on mobile devices.


 * Had been virtually unmaintained for 8 years.

Known issues

 * Subtitles may fail on some files. We dropped support for wikicode markup inside of the subtitles.  You are advised to rewrite these subtitles ( T224258 ).

The video player is still in development, but if you find any problems, please report these on the talk page or file them in [ https://phabricator.wikimedia.org/maniphest/task/edit/form/1/?projects=videojs_player Phabricator].

Developers
Developers working on features that use the Video.js player will need to initialize and configure it appropriately. Below is an example of typical usage.

Basic Configuration Example
The  can also be provided in the HTML  element instead of in JS:

Advanced configuration with Ogv.js support
If you need cross-platform playback of OGG or WebM files (many files in Commons are in these formats), you can use the Ogv.js plugin for Video.js, which is also included in TimedMediaHandler. Example configuration: