HTMLMediaElement
Constructors
<init>
Exposes the JavaScript HTMLMediaElement to Kotlin
HTMLMediaElement()
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
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()
Companion Object Properties
ATTRIBUTE_NODE
val ATTRIBUTE_NODE: Short
CDATA_SECTION_NODE
val CDATA_SECTION_NODE: Short
COMMENT_NODE
val COMMENT_NODE: Short
DOCUMENT_FRAGMENT_NODE
val DOCUMENT_FRAGMENT_NODE: Short
DOCUMENT_NODE
val DOCUMENT_NODE: Short
DOCUMENT_POSITION_CONTAINED_BY
val DOCUMENT_POSITION_CONTAINED_BY: Short
DOCUMENT_POSITION_CONTAINS
val DOCUMENT_POSITION_CONTAINS: Short
DOCUMENT_POSITION_DISCONNECTED
val DOCUMENT_POSITION_DISCONNECTED: Short
DOCUMENT_POSITION_FOLLOWING
val DOCUMENT_POSITION_FOLLOWING: Short
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
val DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: Short
DOCUMENT_POSITION_PRECEDING
val DOCUMENT_POSITION_PRECEDING: Short
DOCUMENT_TYPE_NODE
val DOCUMENT_TYPE_NODE: Short
ELEMENT_NODE
val ELEMENT_NODE: Short
ENTITY_NODE
val ENTITY_NODE: Short
ENTITY_REFERENCE_NODE
val ENTITY_REFERENCE_NODE: Short
HAVE_CURRENT_DATA
val HAVE_CURRENT_DATA: Short
HAVE_ENOUGH_DATA
val HAVE_ENOUGH_DATA: Short
HAVE_FUTURE_DATA
val HAVE_FUTURE_DATA: Short
HAVE_METADATA
val HAVE_METADATA: Short
HAVE_NOTHING
val HAVE_NOTHING: Short
NETWORK_EMPTY
val NETWORK_EMPTY: Short
NETWORK_IDLE
val NETWORK_IDLE: Short
NETWORK_LOADING
val NETWORK_LOADING: Short
NETWORK_NO_SOURCE
val NETWORK_NO_SOURCE: Short
NOTATION_NODE
val NOTATION_NODE: Short
PROCESSING_INSTRUCTION_NODE
val PROCESSING_INSTRUCTION_NODE: Short
TEXT_NODE
val TEXT_NODE: Short
Extension Properties
Extension Functions
addClass
Adds CSS class to element. Has no effect if all specified classes are already in class attribute of the element
fun Element.addClass(vararg cssClasses: String): Boolean
hasClass
Returns true if the element has the given CSS class style in its 'class' attribute
fun Element.hasClass(cssClass: String): Boolean
removeClass
Removes all cssClasses from element. Has no effect if all specified classes are missing in class attribute of the element
fun Element.removeClass(vararg cssClasses: String): Boolean
Inheritors
HTMLAudioElement
Exposes the JavaScript HTMLAudioElement to Kotlin
abstract class HTMLAudioElement : HTMLMediaElement
HTMLVideoElement
Exposes the JavaScript HTMLVideoElement to Kotlin
abstract class HTMLVideoElement :
HTMLMediaElement,
CanvasImageSource,
TexImageSource