HTMLVideoElement

abstract external class HTMLVideoElement : 
    HTMLMediaElement,
    TexImageSource
(source)

Platform and version requirements: JS

Exposes the JavaScript HTMLVideoElement to Kotlin

Constructors

<init>

HTMLVideoElement()

Exposes the JavaScript HTMLVideoElement to Kotlin

Properties

height

open var height: Int

playsInline

open var playsInline: Boolean

poster

open var poster: String

videoHeight

open val videoHeight: Int

videoWidth

open val videoWidth: Int

width

open var width: Int

Inherited Properties

audioTracks

open val audioTracks: AudioTrackList

autoplay

open var autoplay: Boolean

buffered

open val buffered: TimeRanges

controls

open var controls: Boolean

crossOrigin

open var crossOrigin: String?

currentSrc

open val currentSrc: String

currentTime

open var currentTime: Double

defaultMuted

open var defaultMuted: Boolean

defaultPlaybackRate

open var defaultPlaybackRate: Double

duration

open val duration: Double

ended

open val ended: Boolean

error

open val error: MediaError?

loop

open var loop: Boolean

muted

open var muted: Boolean

networkState

open val networkState: Short

paused

open val paused: Boolean

playbackRate

open var playbackRate: Double

played

open val played: TimeRanges

preload

open var preload: String

readyState

open val readyState: Short

seekable

open val seekable: TimeRanges

seeking

open val seeking: Boolean

src

open var src: String

srcObject

open var srcObject: dynamic

textTracks

open val textTracks: TextTrackList

videoTracks

open val videoTracks: VideoTrackList

volume

open var volume: Double

Inherited Functions

addTextTrack

fun addTextTrack(
    kind: TextTrackKind,
    label: String = definedExternally,
    language: String = definedExternally
): TextTrack

canPlayType

fun canPlayType(type: String): CanPlayTypeResult

fastSeek

fun fastSeek(time: Double)

getStartDate

fun getStartDate(): dynamic

load

fun load()

pause

fun pause()

play

fun play(): Promise<Unit>

Extension Properties

isElement

val Node.isElement: Boolean

Gets a value indicating whether this node is an Element.

isText

val Node.isText: Boolean

Gets a value indicating whether this node is a TEXT_NODE or a CDATA_SECTION_NODE.

Extension Functions

addClass

fun Element.addClass(vararg cssClasses: String): Boolean

Adds CSS class to element. Has no effect if all specified classes are already in class attribute of the element

appendElement

fun Element.appendElement(
    name: String,
    init: Element.() -> Unit
): Element

Appends a newly created element with the specified name to this element.

appendText

fun Element.appendText(text: String): Element

Creates text node and append it to the element.

clear

fun Node.clear()

Removes all the children from this node.

hasClass

fun Element.hasClass(cssClass: String): Boolean

Returns true if the element has the given CSS class style in its 'class' attribute

removeClass

fun Element.removeClass(vararg cssClasses: String): Boolean

Removes all cssClasses from element. Has no effect if all specified classes are missing in class attribute of the element