object VideoJS extends Object with Component
- Annotations
- @native() @JSImport("video.js", JSImport.Default)
- Alphabetic
- By Inheritance
- VideoJS
- Component
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def $(selector: String, context: |[Element, String] = ???): Element
- Definition Classes
- Component
- def $$(selector: String, context: |[Element, String] = ???): NodeList[Node]
- Definition Classes
- Component
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val VERSION: String
- def addChild(child: |[String, Component], options: Object = ???): Unit
- Definition Classes
- Component
- def addClass(element: Element, classToAdd: String): Unit
- def addClass(classToAdd: String): Unit
- Definition Classes
- Component
- 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.
- code
The language code or dictionary property
- data
The data values to be translated
VideoJS.addLanguage("es", js.Dynamic.literal(Hello = "Hola"))
Example: - def appendContent(el: Element, content: Any): Unit
- def apply(element: |[String, Element], settings: UndefOr[VideoJSOptions] = js.undefined, ready: UndefOr[Function] = js.undefined): Player
Doubles as the main function for users to create a player instance and also the main library object.
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.
- element
Video element or video element ID
- settings
Optional options object for config/settings
- ready
Optional ready callback
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def buildCSSClass(): String
- Definition Classes
- Component
- def children(): Array[Component]
- Definition Classes
- Component
- def clearInterval(intervalId: Int): Unit
- Definition Classes
- Component
- def clearTimeout(timeoutId: Int): Unit
- Definition Classes
- Component
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def contentEl(): Element
- Definition Classes
- Component
- def controlText(el: Element): Element
- Definition Classes
- Component
- def createEl(tagName: String = ???, properties: Object = ???, attributes: Object = ???): Element
- Definition Classes
- Component
- def createTimeRange(start: |[Int, Array[TimeRanges]], end: Int): TimeRanges
- def dimensions(width: |[Int, String], height: |[Int, String]): Unit
- Definition Classes
- Component
- def dispose(): Unit
- Definition Classes
- Component
- def el(): Element
- Definition Classes
- Component
- def emptyEl(element: Element): Unit
- def enableTouchActivity(): Unit
- Definition Classes
- Component
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def extend(cls: Object, fn: Object): Object
- def formatTime(seconds: Int, guide: Int): String
- def getAttributes(tag: Element): Object
- def getChild(name: String): Component
- Definition Classes
- Component
- def getChildById(id: String): Component
- Definition Classes
- Component
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def getComponent(name: String): Object
Get a component class object by name
- def getPlayers(): Object
Get an object with the currently created players, keyed by player ID
- def handleBlur(): Unit
- Definition Classes
- Component
- def handleClick(): Unit
- Definition Classes
- Component
- def handleFocus(): Unit
- Definition Classes
- Component
- def handleKeyPress(): Unit
- Definition Classes
- Component
- def hasClass(element: Element, classToCheck: String): Boolean
- def hasClass(classToCheck: String): Boolean
- Definition Classes
- Component
- def hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def height(num: |[Int, String] = ???, skipListeners: Boolean = ???): Int
- Definition Classes
- Component
- def hide(): Unit
- Definition Classes
- Component
- def id(): String
- Definition Classes
- Component
- def initChildren(): Unit
- Definition Classes
- Component
- 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.
- url
The url to check
- def isEl(value: Any): Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
- def isTextNode(value: Any): Boolean
- def mergeOptions(defaults: Object, overrides: Object, etc: Object): Object
- def name(): String
- Definition Classes
- Component
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def off(component: |[Element, Object], event: |[String, Array[String]], handler: Function): VideoJS.this.type
- def off(event: String, handler: Function): Unit
- Definition Classes
- Component
- def off(component: Component, event: String, handler: Function): Unit
- Definition Classes
- Component
- def on(component: |[Element, Object], event: |[String, Array[String]], handler: Function): VideoJS.this.type
- def on(event: String, handler: Function): Unit
- Definition Classes
- Component
- def on(component: Component, event: String, handler: Function): Unit
- Definition Classes
- Component
- def one(component: |[Element, Object], event: |[String, Array[String]], handler: Function): VideoJS.this.type
- def one(event: String, handler: Function): Unit
- Definition Classes
- Component
- def one(component: Component, event: String, handler: Function): Unit
- Definition Classes
- Component
- def options(obj: Object): Object
- Definition Classes
- Component
- def parseUrl(url: String): Object
- def player(): Player
- Definition Classes
- Component
- def plugin(name: String, fn: Function): Unit
Create a Video.js player plugin.
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
- name
The plugin name
- fn
The plugin function that will be called with options
- def propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
- def ready(fn: Function, sync: Boolean): VideoJS.this.type
- Definition Classes
- Component
- def registerComponent(name: String, comp: Object): Object
Register a component so it can referred to by name.
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'] }.
- name
Class name of the component
- comp
Component class
- returns
The newly registered component
// 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');
Example: - def registerTech(name: String, tech: Object): Object
Register a Tech so it can referred to by name.
Register a Tech so it can referred to by name. This is used in the tech order for the player.
- name
Class name of the tech
- tech
Tech class
- returns
The newly registered Tech
// 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'] });
Example: - def removeChild(component: Component): Unit
- Definition Classes
- Component
- def removeClass(element: Element, classToRemove: String): Unit
- def removeClass(classToRemove: String): Unit
- Definition Classes
- Component
- def setAttributes(el: Element, attributes: Object = ???): Unit
- def setInterval(fn: Function, interval: Int): Unit
- Definition Classes
- Component
- def setTimeout(fn: Function, timeout: Int): Unit
- Definition Classes
- Component
- def show(): Unit
- Definition Classes
- Component
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toLocaleString(): String
- Definition Classes
- Object
- def toString(): String
- Definition Classes
- AnyRef → Any
- def toggleClass(classToToggle: String, predicate: |[Function, Boolean] = ???): Unit
- Definition Classes
- Component
- def toggleElClass(element: Element, classToToggle: String, predicate: |[Boolean, Function] = ???): Unit
- def trigger(event: |[Object, String], hash: Object = ???): Unit
- Definition Classes
- Component
- def triggerEl(element: Object, event: |[String, Object], hash: Object = ???): Unit
- Annotations
- @JSName("trigger")
- def triggerReady(): Unit
- Definition Classes
- Component
- def valueOf(): Any
- Definition Classes
- Object
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def width(num: |[Int, String], skipListeners: Boolean): Int
- Definition Classes
- Component
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated