DEFINED IN: src/js/core.js#L26
Doubles as the main function for users to create a player instance and also the main library object.
ALIASES videojs, V (deprecated)
The vjs
function can be used to initialize or retrieve a player.
var myPlayer = vjs('my_video_id');
-
CLASSES
- BigPlayButton
- Button
- CaptionsButton
- ChaptersButton
- ChaptersTrackMenuItem
- Component
- ControlBar
- CoreObject
- CurrentTimeDisplay
- DurationDisplay
- ErrorDisplay
- Flash
- FullscreenToggle
- Html5
- LiveDisplay
- LoadProgressBar
- LoadingSpinner
- MediaError
- MediaLoader
- MediaTechController
- Menu
- MenuButton
- MenuItem
- MuteToggle
- OffTextTrackMenuItem
- PlayProgressBar
- PlayToggle
- PlaybackRateMenuButton
- PlaybackRateMenuItem
- Player
- PosterImage
- ProgressControl
- RemainingTimeDisplay
- SeekBar
- SeekHandle
- Slider
- SliderHandle
- SubtitlesButton
- TextTrackButton
- TextTrackDisplay
- TextTrackMenuItem
- TimeDivider
- VolumeBar
- VolumeControl
- VolumeHandle
- VolumeLevel
- VolumeMenuButton
-
NAMESPACES
Global Player instance options, surfaced from vjs.Player.prototype.options_ vjs.options = vjs.Player.prototype.options_ All options should use string keys so they avoid renaming by closure compiler
defined in: src/js/core.js#L92
Global player list
defined in: src/js/core.js#L164
Utility function for adding languages to the default options. Useful for amending multiple language support at runtime.
Example: vjs.addLanguage('es', {'Hello':'Hola'});
- code
String
The language code or dictionary property - data
Object
The data values to be translated
Object
The resulting global languages dictionary object
defined in: src/js/core.js#L151
Resolve and parse the elements of a URL
- url
String
The url to parse
Object
An object of url details
defined in: src/js/lib.js#L676
the method for registering a video.js plugin
- name
String
The name of the plugin - init
Function
The function that is run when the player inits
defined in: src/js/plugins.js#L7
Simple http request for retrieving external files (e.g. text tracks)
// using url string videojs.xhr('http://example.com/myfile.vtt', function(error, response, responseBody){}); // or options block videojs.xhr({ uri: 'http://example.com/myfile.vtt', method: 'GET', responseType: 'text' }, function(error, response, responseBody){ if (error) { // log the error } else { // successful, do something with the response } });
API is modeled after the Raynos/xhr, which we hope to use after getting browserify implemented. https://github.com/Raynos/xhr/blob/master/index.js
- options
Object|String
Options block or URL string - callback
Function
The callback function
Object
The request
defined in: src/js/xhr.js#L31