HTMLMediaElement

Overview

The HTMLMediaElement interface adds to HTMLElement the properties and methods needed to support basic media-related capabilities that are common to audio and video.

Location


 

addTextTrack

Adds a text track (such as a track for subtitles) to a media element.

 

method addTextTrack: dynamic

 

dynamic addTextTrack()

 

func addTextTrack() -> dynamic

 

dynamic addTextTrack()

 

Function addTextTrack() As dynamic

audioTracks

 

property audioTracks: HTMLElement read write;

 

HTMLElement audioTracks { get; set; }

 

var audioTracks: HTMLElement { get{} set{} }

 

HTMLElement audioTracks { __get; __set; }

 

Property audioTracks() As HTMLElement

autoplay

 

property autoplay: dynamic read write;

 

dynamic autoplay { get; set; }

 

var autoplay: dynamic { get{} set{} }

 

dynamic autoplay { __get; __set; }

 

Property autoplay() As dynamic

buffered

 

property buffered: TimeRanges read;

 

TimeRanges buffered { get; }

 

var buffered: TimeRanges { get{} }

 

TimeRanges buffered { __get; }

 

ReadOnly Property buffered() As TimeRanges

canPlayType

Given a string specifying a MIME media type (potentially with the codecs parameter included), canPlayType() returns the string probably if the media should be playable, maybe if there's not enough information to determine whether the media will play or not, or an empty string if the media cannot be played.

 

method canPlayType(parmediaType: dynamic): String

 

String canPlayType(dynamic parmediaType)

 

func canPlayType(_ parmediaType: dynamic) -> String

 

String canPlayType(dynamic parmediaType)

 

Function canPlayType(parmediaType As dynamic) As String

Parameters:

  • parmediaType:

controller

 

property controller: HTMLElement read write;

 

HTMLElement controller { get; set; }

 

var controller: HTMLElement { get{} set{} }

 

HTMLElement controller { __get; __set; }

 

Property controller() As HTMLElement

controls

 

property controls: Boolean read write;

 

Boolean controls { get; set; }

 

var controls: Boolean { get{} set{} }

 

Boolean controls { __get; __set; }

 

Property controls() As Boolean

controlsList

 

property controlsList: DOMTokenList read;

 

DOMTokenList controlsList { get; }

 

var controlsList: DOMTokenList { get{} }

 

DOMTokenList controlsList { __get; }

 

ReadOnly Property controlsList() As DOMTokenList

crossOrigin

 

property crossOrigin: String read write;

 

String crossOrigin { get; set; }

 

var crossOrigin: String { get{} set{} }

 

String crossOrigin { __get; __set; }

 

Property crossOrigin() As String

currentSrc

 

property currentSrc: String read;

 

String currentSrc { get; }

 

var currentSrc: String { get{} }

 

String currentSrc { __get; }

 

ReadOnly Property currentSrc() As String

currentTime

 

property currentTime: DateTime read write;

 

DateTime currentTime { get; set; }

 

var currentTime: DateTime { get{} set{} }

 

DateTime currentTime { __get; __set; }

 

Property currentTime() As DateTime

defaultMuted

 

property defaultMuted: Boolean read write;

 

Boolean defaultMuted { get; set; }

 

var defaultMuted: Boolean { get{} set{} }

 

Boolean defaultMuted { __get; __set; }

 

Property defaultMuted() As Boolean

defaultPlaybackRate

 

property defaultPlaybackRate: Double read write;

 

Double defaultPlaybackRate { get; set; }

 

var defaultPlaybackRate: Double { get{} set{} }

 

Double defaultPlaybackRate { __get; __set; }

 

Property defaultPlaybackRate() As Double

disableRemotePlayback

 

property disableRemotePlayback: Boolean read write;

 

Boolean disableRemotePlayback { get; set; }

 

var disableRemotePlayback: Boolean { get{} set{} }

 

Boolean disableRemotePlayback { __get; __set; }

 

Property disableRemotePlayback() As Boolean

duration

 

property duration: dynamic read;

 

dynamic duration { get; }

 

var duration: dynamic { get{} }

 

dynamic duration { __get; }

 

ReadOnly Property duration() As dynamic

ended

 

property ended: Boolean read;

 

Boolean ended { get; }

 

var ended: Boolean { get{} }

 

Boolean ended { __get; }

 

ReadOnly Property ended() As Boolean

error

 

property error: dynamic read;

 

dynamic error { get; }

 

var error: dynamic { get{} }

 

dynamic error { __get; }

 

ReadOnly Property error() As dynamic

load

Resets the media to the beginning and selects the best available source from the sources provided using the src attribute or the element specifies multiple media resources for the <picture>, the <audio> element, or the <video> element."><source> element.

 

method load: HTMLElement

 

HTMLElement load()

 

func load() -> HTMLElement

 

HTMLElement load()

 

Function load() As HTMLElement

loop

 

property loop: Boolean read write;

 

Boolean loop { get; set; }

 

var loop: Boolean { get{} set{} }

 

Boolean loop { __get; __set; }

 

Property loop() As Boolean

mediaGroup

 

property mediaGroup: String read write;

 

String mediaGroup { get; set; }

 

var mediaGroup: String { get{} set{} }

 

String mediaGroup { __get; __set; }

 

Property mediaGroup() As String

muted

 

property muted: Boolean read write;

 

Boolean muted { get; set; }

 

var muted: Boolean { get{} set{} }

 

Boolean muted { __get; __set; }

 

Property muted() As Boolean

networkState

 

property networkState: UInt16 read;

 

UInt16 networkState { get; }

 

var networkState: UInt16 { get{} }

 

UInt16 networkState { __get; }

 

ReadOnly Property networkState() As UInt16

onencrypted

 

property onencrypted: EventListener read write;

 

EventListener onencrypted { get; set; }

 

var onencrypted: EventListener { get{} set{} }

 

EventListener onencrypted { __get; __set; }

 

Property onencrypted() As EventListener

onwaitingforkey

 

property onwaitingforkey: EventListener read write;

 

EventListener onwaitingforkey { get; set; }

 

var onwaitingforkey: EventListener { get{} set{} }

 

EventListener onwaitingforkey { __get; __set; }

 

Property onwaitingforkey() As EventListener

pause

Pauses the media playback.

 

method pause: dynamic

 

dynamic pause()

 

func pause() -> dynamic

 

dynamic pause()

 

Function pause() As dynamic

paused

 

property paused: Boolean read;

 

Boolean paused { get; }

 

var paused: Boolean { get{} }

 

Boolean paused { __get; }

 

ReadOnly Property paused() As Boolean

play

Begins playback of the media.

 

method play: dynamic

 

dynamic play()

 

func play() -> dynamic

 

dynamic play()

 

Function play() As dynamic

playbackRate

 

property playbackRate: Double read write;

 

Double playbackRate { get; set; }

 

var playbackRate: Double { get{} set{} }

 

Double playbackRate { __get; __set; }

 

Property playbackRate() As Double

played

 

property played: TimeRanges read;

 

TimeRanges played { get; }

 

var played: TimeRanges { get{} }

 

TimeRanges played { __get; }

 

ReadOnly Property played() As TimeRanges

preload

 

property preload: String read write;

 

String preload { get; set; }

 

var preload: String { get{} set{} }

 

String preload { __get; __set; }

 

Property preload() As String

readyState

 

property readyState: UInt16 read;

 

UInt16 readyState { get; }

 

var readyState: UInt16 { get{} }

 

UInt16 readyState { __get; }

 

ReadOnly Property readyState() As UInt16

seekable

 

property seekable: TimeRanges read;

 

TimeRanges seekable { get; }

 

var seekable: TimeRanges { get{} }

 

TimeRanges seekable { __get; }

 

ReadOnly Property seekable() As TimeRanges

seeking

 

property seeking: Boolean read;

 

Boolean seeking { get; }

 

var seeking: Boolean { get{} }

 

Boolean seeking { __get; }

 

ReadOnly Property seeking() As Boolean

src

 

property src: String read write;

 

String src { get; set; }

 

var src: String { get{} set{} }

 

String src { __get; __set; }

 

Property src() As String

srcObject

 

property srcObject: MediaStream read write;

 

MediaStream srcObject { get; set; }

 

var srcObject: MediaStream { get{} set{} }

 

MediaStream srcObject { __get; __set; }

 

Property srcObject() As MediaStream

textTracks

 

property textTracks: TextTrack read;

 

TextTrack textTracks { get; }

 

var textTracks: TextTrack { get{} }

 

TextTrack textTracks { __get; }

 

ReadOnly Property textTracks() As TextTrack

videoTracks

 

property videoTracks: HTMLElement read;

 

HTMLElement videoTracks { get; }

 

var videoTracks: HTMLElement { get{} }

 

HTMLElement videoTracks { __get; }

 

ReadOnly Property videoTracks() As HTMLElement

volume

 

property volume: Double read write;

 

Double volume { get; set; }

 

var volume: Double { get{} set{} }

 

Double volume { __get; __set; }

 

Property volume() As Double

 

audioTracks

 

property audioTracks: HTMLElement read write;

 

HTMLElement audioTracks { get; set; }

 

var audioTracks: HTMLElement { get{} set{} }

 

HTMLElement audioTracks { __get; __set; }

 

Property audioTracks() As HTMLElement

autoplay

 

property autoplay: dynamic read write;

 

dynamic autoplay { get; set; }

 

var autoplay: dynamic { get{} set{} }

 

dynamic autoplay { __get; __set; }

 

Property autoplay() As dynamic

buffered

 

property buffered: TimeRanges read;

 

TimeRanges buffered { get; }

 

var buffered: TimeRanges { get{} }

 

TimeRanges buffered { __get; }

 

ReadOnly Property buffered() As TimeRanges

controller

 

property controller: HTMLElement read write;

 

HTMLElement controller { get; set; }

 

var controller: HTMLElement { get{} set{} }

 

HTMLElement controller { __get; __set; }

 

Property controller() As HTMLElement

controls

 

property controls: Boolean read write;

 

Boolean controls { get; set; }

 

var controls: Boolean { get{} set{} }

 

Boolean controls { __get; __set; }

 

Property controls() As Boolean

controlsList

 

property controlsList: DOMTokenList read;

 

DOMTokenList controlsList { get; }

 

var controlsList: DOMTokenList { get{} }

 

DOMTokenList controlsList { __get; }

 

ReadOnly Property controlsList() As DOMTokenList

crossOrigin

 

property crossOrigin: String read write;

 

String crossOrigin { get; set; }

 

var crossOrigin: String { get{} set{} }

 

String crossOrigin { __get; __set; }

 

Property crossOrigin() As String

currentSrc

 

property currentSrc: String read;

 

String currentSrc { get; }

 

var currentSrc: String { get{} }

 

String currentSrc { __get; }

 

ReadOnly Property currentSrc() As String

currentTime

 

property currentTime: DateTime read write;

 

DateTime currentTime { get; set; }

 

var currentTime: DateTime { get{} set{} }

 

DateTime currentTime { __get; __set; }

 

Property currentTime() As DateTime

defaultMuted

 

property defaultMuted: Boolean read write;

 

Boolean defaultMuted { get; set; }

 

var defaultMuted: Boolean { get{} set{} }

 

Boolean defaultMuted { __get; __set; }

 

Property defaultMuted() As Boolean

defaultPlaybackRate

 

property defaultPlaybackRate: Double read write;

 

Double defaultPlaybackRate { get; set; }

 

var defaultPlaybackRate: Double { get{} set{} }

 

Double defaultPlaybackRate { __get; __set; }

 

Property defaultPlaybackRate() As Double

disableRemotePlayback

 

property disableRemotePlayback: Boolean read write;

 

Boolean disableRemotePlayback { get; set; }

 

var disableRemotePlayback: Boolean { get{} set{} }

 

Boolean disableRemotePlayback { __get; __set; }

 

Property disableRemotePlayback() As Boolean

duration

 

property duration: dynamic read;

 

dynamic duration { get; }

 

var duration: dynamic { get{} }

 

dynamic duration { __get; }

 

ReadOnly Property duration() As dynamic

ended

 

property ended: Boolean read;

 

Boolean ended { get; }

 

var ended: Boolean { get{} }

 

Boolean ended { __get; }

 

ReadOnly Property ended() As Boolean

error

 

property error: dynamic read;

 

dynamic error { get; }

 

var error: dynamic { get{} }

 

dynamic error { __get; }

 

ReadOnly Property error() As dynamic

loop

 

property loop: Boolean read write;

 

Boolean loop { get; set; }

 

var loop: Boolean { get{} set{} }

 

Boolean loop { __get; __set; }

 

Property loop() As Boolean

mediaGroup

 

property mediaGroup: String read write;

 

String mediaGroup { get; set; }

 

var mediaGroup: String { get{} set{} }

 

String mediaGroup { __get; __set; }

 

Property mediaGroup() As String

muted

 

property muted: Boolean read write;

 

Boolean muted { get; set; }

 

var muted: Boolean { get{} set{} }

 

Boolean muted { __get; __set; }

 

Property muted() As Boolean

networkState

 

property networkState: UInt16 read;

 

UInt16 networkState { get; }

 

var networkState: UInt16 { get{} }

 

UInt16 networkState { __get; }

 

ReadOnly Property networkState() As UInt16

onencrypted

 

property onencrypted: EventListener read write;

 

EventListener onencrypted { get; set; }

 

var onencrypted: EventListener { get{} set{} }

 

EventListener onencrypted { __get; __set; }

 

Property onencrypted() As EventListener

onwaitingforkey

 

property onwaitingforkey: EventListener read write;

 

EventListener onwaitingforkey { get; set; }

 

var onwaitingforkey: EventListener { get{} set{} }

 

EventListener onwaitingforkey { __get; __set; }

 

Property onwaitingforkey() As EventListener

paused

 

property paused: Boolean read;

 

Boolean paused { get; }

 

var paused: Boolean { get{} }

 

Boolean paused { __get; }

 

ReadOnly Property paused() As Boolean

playbackRate

 

property playbackRate: Double read write;

 

Double playbackRate { get; set; }

 

var playbackRate: Double { get{} set{} }

 

Double playbackRate { __get; __set; }

 

Property playbackRate() As Double

played

 

property played: TimeRanges read;

 

TimeRanges played { get; }

 

var played: TimeRanges { get{} }

 

TimeRanges played { __get; }

 

ReadOnly Property played() As TimeRanges

preload

 

property preload: String read write;

 

String preload { get; set; }

 

var preload: String { get{} set{} }

 

String preload { __get; __set; }

 

Property preload() As String

readyState

 

property readyState: UInt16 read;

 

UInt16 readyState { get; }

 

var readyState: UInt16 { get{} }

 

UInt16 readyState { __get; }

 

ReadOnly Property readyState() As UInt16

seekable

 

property seekable: TimeRanges read;

 

TimeRanges seekable { get; }

 

var seekable: TimeRanges { get{} }

 

TimeRanges seekable { __get; }

 

ReadOnly Property seekable() As TimeRanges

seeking

 

property seeking: Boolean read;

 

Boolean seeking { get; }

 

var seeking: Boolean { get{} }

 

Boolean seeking { __get; }

 

ReadOnly Property seeking() As Boolean

src

 

property src: String read write;

 

String src { get; set; }

 

var src: String { get{} set{} }

 

String src { __get; __set; }

 

Property src() As String

srcObject

 

property srcObject: MediaStream read write;

 

MediaStream srcObject { get; set; }

 

var srcObject: MediaStream { get{} set{} }

 

MediaStream srcObject { __get; __set; }

 

Property srcObject() As MediaStream

textTracks

 

property textTracks: TextTrack read;

 

TextTrack textTracks { get; }

 

var textTracks: TextTrack { get{} }

 

TextTrack textTracks { __get; }

 

ReadOnly Property textTracks() As TextTrack

videoTracks

 

property videoTracks: HTMLElement read;

 

HTMLElement videoTracks { get; }

 

var videoTracks: HTMLElement { get{} }

 

HTMLElement videoTracks { __get; }

 

ReadOnly Property videoTracks() As HTMLElement

volume

 

property volume: Double read write;

 

Double volume { get; set; }

 

var volume: Double { get{} set{} }

 

Double volume { __get; __set; }

 

Property volume() As Double

 

addTextTrack

Adds a text track (such as a track for subtitles) to a media element.

 

method addTextTrack: dynamic

 

dynamic addTextTrack()

 

func addTextTrack() -> dynamic

 

dynamic addTextTrack()

 

Function addTextTrack() As dynamic

canPlayType

Given a string specifying a MIME media type (potentially with the codecs parameter included), canPlayType() returns the string probably if the media should be playable, maybe if there's not enough information to determine whether the media will play or not, or an empty string if the media cannot be played.

 

method canPlayType(parmediaType: dynamic): String

 

String canPlayType(dynamic parmediaType)

 

func canPlayType(_ parmediaType: dynamic) -> String

 

String canPlayType(dynamic parmediaType)

 

Function canPlayType(parmediaType As dynamic) As String

Parameters:

  • parmediaType:

load

Resets the media to the beginning and selects the best available source from the sources provided using the src attribute or the element specifies multiple media resources for the <picture>, the <audio> element, or the <video> element."><source> element.

 

method load: HTMLElement

 

HTMLElement load()

 

func load() -> HTMLElement

 

HTMLElement load()

 

Function load() As HTMLElement

pause

Pauses the media playback.

 

method pause: dynamic

 

dynamic pause()

 

func pause() -> dynamic

 

dynamic pause()

 

Function pause() As dynamic

play

Begins playback of the media.

 

method play: dynamic

 

dynamic play()

 

func play() -> dynamic

 

dynamic play()

 

Function play() As dynamic