VideoJS
Attributes
- Graph
-
- Supertypes
- Self type
-
VideoJS.type
Members list
Value members
Concrete methods
Adding languages so that they're available to all players.
Adding languages so that they're available to all players.
Value parameters
- code
-
The language code or dictionary property
- data
-
The data values to be translated
Attributes
- Example
-
VideoJS.addLanguage("es", js.Dynamic.literal(Hello = "Hola"))
Doubles as the main function for users to create a player instance and also the main library object. The videojs function can be used to initialize or retrieve a player.
Doubles as the main function for users to create a player instance and also the main library object. The videojs function can be used to initialize or retrieve a player.
Value parameters
- element
-
Video element or video element ID
- ready
-
Optional ready callback
- settings
-
Optional options object for config/settings
Attributes
Get a component class object by name
Get a component class object by name
Attributes
Get an object with the currently created players, keyed by player ID
Get an object with the currently created players, keyed by player ID
Attributes
Returns whether the url passed is a cross domain request or not.
Returns whether the url passed is a cross domain request or not.
Value parameters
- url
-
The url to check
Attributes
Create a Video.js player plugin. Plugins are only initialized when options for the plugin are included in the player options, or the plugin function on the player instance is called. See the plugin guide in the docs for a more detailed example
Create a Video.js player plugin. Plugins are only initialized when options for the plugin are included in the player options, or the plugin function on the player instance is called. See the plugin guide in the docs for a more detailed example
Value parameters
- fn
-
The plugin function that will be called with options
- name
-
The plugin name
Attributes
Register a component so it can referred to by name. Used when adding to other components, either through addChild component.addChild('myComponent') or through default children options { children: ['myComponent'] }.
Register a component so it can referred to by name. Used when adding to other components, either through addChild component.addChild('myComponent') or through default children options { children: ['myComponent'] }.
Value parameters
- comp
-
Component class
- name
-
Class name of the component
Attributes
- Returns
-
The newly registered component
- Example
-
// Get a component to subclass var VjsButton = videojs.getComponent('Button'); // Subclass the component (see 'extend' doc for more info) var MySpecialButton = videojs.extend(VjsButton, {}); // Register the new component VjsButton.registerComponent('MySpecialButton', MySpecialButton); // (optionally) add the new component as a default player child myPlayer.addChild('MySpecialButton');
Register a Tech so it can referred to by name. This is used in the tech order for the player.
Register a Tech so it can referred to by name. This is used in the tech order for the player.
Value parameters
- name
-
Class name of the tech
- tech
-
Tech class
Attributes
- Returns
-
The newly registered Tech
- Example
-
// get the Html5 Tech var Html5 = videojs.getTech('Html5'); var MyTech = videojs.extend(Html5, {}); // Register the new Tech VjsButton.registerTech('Tech', MyTech); var player = videojs('myplayer', { techOrder: ['myTech', 'html5'] });
Inherited methods
Attributes
- Inherited from:
- Component
Attributes
- Inherited from:
- Component
Attributes
- Inherited from:
- Component
Attributes
- Inherited from:
- Component
Attributes
- Inherited from:
- Component
Attributes
- Inherited from:
- Component
Attributes
- Inherited from:
- Component
Attributes
- Inherited from:
- Component
Attributes
- Inherited from:
- Component
Attributes
- Inherited from:
- Component
Attributes
- Inherited from:
- Component
Attributes
- Inherited from:
- Component
Attributes
- Inherited from:
- Component
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Component
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Component
Attributes
- Inherited from:
- Component
Attributes
- Inherited from:
- Component
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Component
Attributes
- Inherited from:
- Component
Attributes
- Inherited from:
- Component
Attributes
- Inherited from:
- Component
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Component
Attributes
- Inherited from:
- Component
Attributes
- Inherited from:
- Object