VideoJS

io.laminext.videojs.api.VideoJS$
object VideoJS extends Component

Attributes

Graph
Supertypes
trait Component
class Object
trait Any
class Object
trait Matchable
class Any
Self type
VideoJS.type

Members list

Concise view

Value members

Concrete methods

def addClass(element: Element, classToAdd: String): Unit
def addLanguage(code: String, data: Object): Unit

Adding languages so that they're available to all players.

Adding languages so that they're available to all players.

Attributes

code

The language code or dictionary property

data

The data values to be translated

Example:
VideoJS.addLanguage("es", js.Dynamic.literal(Hello = "Hola"))
def appendContent(el: Element, content: Any): Unit
def apply(element: String | Element, settings: UndefOr[VideoJSOptions], ready: UndefOr[Function]): 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.

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.

Attributes

element

Video element or video element ID

ready

Optional ready callback

settings

Optional options object for config/settings

def createTimeRange(start: Int | Array[TimeRanges], end: Int): TimeRanges
def emptyEl(element: Element): Unit
def extend(cls: Object, fn: Object): Object
def formatTime(seconds: Int, guide: Int): String
def getAttributes(tag: Element): Object
def getComponent(name: String): Object

Get a component class object by name

Get a component class object by name

Attributes

def getPlayers(): Object

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

def hasClass(element: Element, classToCheck: String): Boolean
def insertContent(el: Element, content: Any): Unit
def isCrossOrigin(url: String): Boolean

Returns whether the url passed is a cross domain request or not.

Returns whether the url passed is a cross domain request or not.

Attributes

url

The url to check

def isEl(value: Any): Boolean
def isTextNode(value: Any): Boolean
def mergeOptions(defaults: Object, overrides: Object, etc: Object): Object
def off(component: Element | Object, event: String | Array[String], handler: Function): VideoJS.type.this.type
def on(component: Element | Object, event: String | Array[String], handler: Function): VideoJS.type.this.type
def one(component: Element | Object, event: String | Array[String], handler: Function): VideoJS.type.this.type
def parseUrl(url: String): Object
def plugin(name: String, fn: Function): Unit

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

Attributes

fn

The plugin function that will be called with options

name

The plugin name

def registerComponent(name: String, comp: Object): Object

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'] }.

Attributes

comp

Component class

name

Class name of the component

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'); 
def registerTech(name: String, tech: Object): Object

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.

Attributes

name

Class name of the tech

tech

Tech class

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'] }); 
def removeClass(element: Element, classToRemove: String): Unit
def setAttributes(el: Element, attributes: Object): Unit
def toggleElClass(element: Element, classToToggle: String, predicate: Boolean | Function): Unit
def triggerEl(element: Object, event: String | Object, hash: Object): Unit

Inherited methods

def $(selector: String, context: Element | String): Element

Attributes

Inherited from:
Component
def $$(selector: String, context: Element | String): NodeList[Node]

Attributes

Inherited from:
Component
def addChild(child: String | Component, options: Object): Unit

Attributes

Inherited from:
Component
def addClass(classToAdd: String): Unit

Attributes

Inherited from:
Component
def buildCSSClass(): String

Attributes

Inherited from:
Component
def children(): Array[Component]

Attributes

Inherited from:
Component
def clearInterval(intervalId: Int): Unit

Attributes

Inherited from:
Component
def clearTimeout(timeoutId: Int): Unit

Attributes

Inherited from:
Component
def contentEl(): Element

Attributes

Inherited from:
Component
def controlText(el: Element): Element

Attributes

Inherited from:
Component
def createEl(tagName: String, properties: Object, attributes: Object): Element

Attributes

Inherited from:
Component
def dimensions(width: Int | String, height: Int | String): Unit

Attributes

Inherited from:
Component
def dispose(): Unit

Attributes

Inherited from:
Component
def el(): Element

Attributes

Inherited from:
Component

Attributes

Inherited from:
Component
def getChild(name: String): Component

Attributes

Inherited from:
Component
def getChildById(id: String): Component

Attributes

Inherited from:
Component
def handleBlur(): Unit

Attributes

Inherited from:
Component
def handleClick(): Unit

Attributes

Inherited from:
Component
def handleFocus(): Unit

Attributes

Inherited from:
Component
def handleKeyPress(): Unit

Attributes

Inherited from:
Component
def hasClass(classToCheck: String): Boolean

Attributes

Inherited from:
Component
def hasOwnProperty(v: String): Boolean

Attributes

Inherited from:
Object
def height(num: Int | String, skipListeners: Boolean): Int

Attributes

Inherited from:
Component
def hide(): Unit

Attributes

Inherited from:
Component
def id(): String

Attributes

Inherited from:
Component
def initChildren(): Unit

Attributes

Inherited from:
Component
def isPrototypeOf(v: Object): Boolean

Attributes

Inherited from:
Object
def name(): String

Attributes

Inherited from:
Component
def off(event: String, handler: Function): Unit

Attributes

Inherited from:
Component
def off(component: Component, event: String, handler: Function): Unit

Attributes

Inherited from:
Component
def on(event: String, handler: Function): Unit

Attributes

Inherited from:
Component
def on(component: Component, event: String, handler: Function): Unit

Attributes

Inherited from:
Component
def one(event: String, handler: Function): Unit

Attributes

Inherited from:
Component
def one(component: Component, event: String, handler: Function): Unit

Attributes

Inherited from:
Component
def options(obj: Object): Object

Attributes

Inherited from:
Component
def player(): Player

Attributes

Inherited from:
Component
def propertyIsEnumerable(v: String): Boolean

Attributes

Inherited from:
Object
def ready(fn: Function, sync: Boolean): Component.this.type

Attributes

Inherited from:
Component
def removeChild(component: Component): Unit

Attributes

Inherited from:
Component
def removeClass(classToRemove: String): Unit

Attributes

Inherited from:
Component
def setInterval(fn: Function, interval: Int): Unit

Attributes

Inherited from:
Component
def setTimeout(fn: Function, timeout: Int): Unit

Attributes

Inherited from:
Component
def show(): Unit

Attributes

Inherited from:
Component
def toLocaleString(): String

Attributes

Inherited from:
Object
def toggleClass(classToToggle: String, predicate: Function | Boolean): Unit

Attributes

Inherited from:
Component
def trigger(event: Object | String, hash: Object): Unit

Attributes

Inherited from:
Component
def triggerReady(): Unit

Attributes

Inherited from:
Component
def valueOf(): Any

Attributes

Inherited from:
Object
def width(num: Int | String, skipListeners: Boolean): Int

Attributes

Inherited from:
Component

Concrete fields

val VERSION: String