Add a remote text track
Add a remote text track
Options for remote text track
Add a text track In addition to the W3C settings we allow adding additional info through options.
Add a text track In addition to the W3C settings we allow adding additional info through options. http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-addtexttrack
Captions, subtitles, chapters, descriptions, or metadata
Optional label
Optional language
Get/Set the aspect ratio
Get/Set the aspect ratio
Aspect ratio for player
Get or set the autoplay attribute.
Get or set the autoplay attribute.
Boolean to determine if video should autoplay
Get a TimeRange object with the times of the video that have been downloaded If you just want the percent of the video that's been downloaded, use bufferedPercent.
Get a TimeRange object with the times of the video that have been downloaded If you just want the percent of the video that's been downloaded, use bufferedPercent.
TimeRange object
Get the percent (as a decimal) of the video that's been downloaded.
Get the percent (as a decimal) of the video that's been downloaded. 0 means none, 1 means all. (This method isn't in the HTML5 spec, but it's very convenient)
The end of the last buffered time range
var howMuchIsDownloaded = myPlayer.bufferedPercent();
Check whether the player can play a given mimetype
Get or set whether or not the controls are showing.
Get or set whether or not the controls are showing.
Set controls to showing or not
Controls are showing
Create the component's DOM element
Returns the fully qualified URL of the current source value e.g.
Returns the fully qualified URL of the current source value e.g. http://mysite.com/video.mp4
Can be used in
conjuction with currentType to assist in rebuilding the current source object.
Set the current time (in seconds)
Set the current time (in seconds)
The time to seek to
Self, when the current time is set
myPlayer.currentTime(120); // 2 minutes into the video
Get the current time (in seconds)
Get the current time (in seconds)
The time in seconds, when not setting
var whereYouAt = myPlayer.currentTime();
Get the current source type e.g.
Get the current source type e.g. video/mp4. This can allow you rebuild the current source object so that you could load the same source and tech later.
Get/set dimension for player
Get/set dimension for player
Either width or height
Value for dimension
Height when getting
Get the length in time of the video in seconds
Get the length in time of the video in seconds
Duration when setting
The duration of the video in seconds when getting
The video must have started loading before the duration can be known, and in the case of Flash, may not be known until the video starts playing.
Returns whether or not the player is in the "ended" state.
Returns whether or not the player is in the "ended" state.
True if the player is in the ended state, false if not.
When fullscreen isn't supported we can stretch the video container to as wide as the browser will let us.
Get the current MediaError
Get the current MediaError
MediaError or null
Set the current MediaError
Set the current MediaError
A MediaError or a String/Number to be turned into a MediaError
Player
Exit full window
Return the video to its normal size after having been in full screen mode
Add/remove the vjs-fluid class
Add/remove the vjs-fluid class
Value of true adds the class, value of false removes the class
Check for call to either exit full window or full screen on ESC key
Check for call to either exit full window or full screen on ESC key
Event to check for key press
Get object for cached values.
Tell the player it's in fullscreen
Tell the player it's in fullscreen
Update the player's fullscreen state
Self
Check if the player is in fullscreen mode
Check if the player is in fullscreen mode
As of the latest HTML5 spec, isFullscreen is no longer an official property and instead document.fullscreenElement is used. But isFullscreen is still a valuable property for internal player workings.
The player's language code
The player's language code
The locale string
Self when setting
The language should be set in the player options if you want the the controls to be built with a specific language. Changing the lanugage later will not update controls text.
The player's language code
The player's language code
The locale string when getting
Get the player's language dictionary Merge every time, because a newly added plugin might call videojs.addLanguage() at any time Languages specified directly in the player options have precedence
Get the player's language dictionary Merge every time, because a newly added plugin might call videojs.addLanguage() at any time Languages specified directly in the player options have precedence
Array of languages
Begin loading the src data.
Begin loading the src data.
Returns the player
Set the loop attribute on the video element.
Set the loop attribute on the video element.
Boolean to determine if video should loop
Returns the player when setting
Get the loop attribute on the video element.
Get the loop attribute on the video element.
The loop attribute value when getting
Turn mute on or off
Turn mute on or off
True to mute, false to unmute
Returns the player when setting
Get the current muted state
Returns the current state of network activity for the element, from the codes in the list below.
Returns the current state of network activity for the element, from the codes in the list below.
Pause the video playback
Check if the player is paused
Start media playback
Gets the current playback rate.
Gets the current playback rate. A playback rate of 1.0 represents normal speed and 0.5 would indicate half-speed playback, for instance.
Sets the current playback rate.
Sets the current playback rate. A playback rate of 1.0 represents normal speed and 0.5 would indicate half-speed playback, for instance.
New playback rate to set.
Get the poster image source url
Get the poster image source url
Poster image source URL
Set the poster image source url
Set the poster image source url
Poster image source URL
Get the preload attribute
Set the preload attribute
Set the preload attribute
Boolean to determine if preload should be used
Returns a value that expresses the current state of the element with respect to rendering the current playback position, from the codes in the list below.
Returns a value that expresses the current state of the element with respect to rendering the current playback position, from the codes in the list below.
Calculates how much time is left.
Get an array of remote html track elements
Get an array of remote text tracks
Remove a remote text track
Remove a remote text track
Remote text track to remove
Report user activity
Report user activity
Event object
Increase the size of the video to full screen In some browsers, full screen is not supported natively, so it enters "full window mode", where the video fills the browser window.
Increase the size of the video to full screen In some browsers, full screen is not supported natively, so it enters "full window mode", where the video fills the browser window. In browsers and devices that support native full screen, sometimes the browser's default controls will be shown, and not the Video.js custom skin. This includes most mobile devices (iOS, Android) and older versions of Safari.
Reset the player.
Reset the player. Loads the first tech in the techOrder, and calls reset
on the tech
.
Returns whether or not the user is "scrubbing".
Returns whether or not the user is "scrubbing". Scrubbing is when the user has clicked the progress bar handle and is dragging it along the progress bar.
True/false the user is scrubbing
Returns the TimeRanges of the media that are currently available for seeking to.
Returns whether or not the player is in the "seeking" state.
Select source based on tech-order or source-order Uses source-order selection if options.sourceOrder
is truthy.
Select source based on tech-order or source-order Uses source-order selection if options.sourceOrder
is truthy.
Otherwise, defaults to tech-order selection
The sources for a media asset
Object of source and tech order, otherwise false
The current video source when getting
The source function updates the video source.
The source function updates the video source. There are three types of variables you can pass as the argument.
The source URL, object, or array of sources
The player when setting
Check to see if fullscreen is supported
Return a reference to the current tech.
Return a reference to the current tech. It will only return a reference to the tech if given an object with the IWillNotUseThisInPlugins property on it. This is try and prevent misuse of techs by plugins.
The Tech
Get an array of associated text tracks.
Get an array of associated text tracks. captions, subtitles, chapters, descriptions
Array of track objects
Converts track info to JSON
Converts track info to JSON
JSON object of options
Update styles of the player element (height, width and aspect ratio)
Get if user is active
Get if user is active
Value if user is active user when getting
Set if user is active
Set if user is active
Value when setting
Get video height
Get video width
Get the current volume of the media 0 is off (muted), 1.0 is all the way up, 0.5 is half way.
Set the current volume of the media 0 is off (muted), 1.0 is all the way up, 0.5 is half way.
Set the current volume of the media 0 is off (muted), 1.0 is all the way up, 0.5 is half way.
The new volume as a decimal percent
(Since version ) see corresponding Javadoc for more information.
http://docs.videojs.com/docs/api/player.html