Skip to content

Class: MOQtailVideoElement ​

A <video>-backed element implementing HTMLMediaElement and the media-ui-extensions IDL.

Extends ​

  • CustomVideoElementClass<this> & MediaTracks

Constructors ​

Constructor ​

new MOQtailVideoElement(): MOQtailVideoElement

Returns ​

MOQtailVideoElement

Overrides ​

MediaTracksMixin(CustomVideoElement).constructor

Accessors ​

buffered ​

Get Signature ​

get buffered(): TimeRanges

The buffered read-only property of HTMLMediaElement objects returns a new static normalized TimeRanges object that represents the ranges of the media resource, if any, that the user agent has buffered at the moment the buffered property is accessed.

MDN Reference

Returns ​

TimeRanges

Overrides ​

MediaTracksMixin(CustomVideoElement).buffered


config ​

Get Signature ​

get config(): MOQtailPlayerOptions | undefined

Player options, read on each load. Without plugins, liveBuffer() and abr() are the ones; a list, even an empty one, is taken as written, so one without them plays without a buffer or ABR controller. Changing it doesn't restart playback.

Returns ​

MOQtailPlayerOptions | undefined

Set Signature ​

set config(value): void

Parameters ​
value ​

MOQtailPlayerOptions | undefined

Returns ​

void


currentTime ​

Get Signature ​

get currentTime(): number

Live with an accessible window, the element's times count from the window's start: seekbars such as Video.js's start at 0. The inner video and the player keep media time.

Returns ​

number

Set Signature ​

set currentTime(value): void

The HTMLMediaElement interface's currentTime property specifies the current playback time in seconds.

MDN Reference

Parameters ​
value ​

number

Returns ​

void

Overrides ​

MediaTracksMixin(CustomVideoElement).currentTime


error ​

Get Signature ​

get error(): MediaError | null

The HTMLMediaElement.error property is the MediaError object for the most recent error, or null if there has not been an error. When an error event is received by the element, you can determine details about what happened by examining this object.

MDN Reference

Returns ​

MediaError | null

Overrides ​

MediaTracksMixin(CustomVideoElement).error


liveEdgeStart ​

Get Signature ​

get liveEdgeStart(): number

Proposal 0007: where the live edge starts, in seconds; NaN on demand.

Returns ​

number


player ​

Get Signature ​

get player(): MOQtailPlayer | undefined

Returns ​

MOQtailPlayer | undefined


seekable ​

Get Signature ​

get seekable(): TimeRanges

Live, the accessible window, or nothing without one.

Returns ​

TimeRanges

Overrides ​

MediaTracksMixin(CustomVideoElement).seekable


streamType ​

Get Signature ​

get streamType(): StreamType

Returns ​

StreamType


targetLiveWindow ​

Get Signature ​

get targetLiveWindow(): number

Proposal 0007: live, Infinity with an accessible window (DVR) and 0 without; NaN otherwise. Players such as Video.js treat a media as live only when it has this and liveEdgeStart.

Returns ​

number

Methods ​

attributeChangedCallback() ​

attributeChangedCallback(name, oldValue?, newValue?): void

Parameters ​

name ​

string

oldValue? ​

string | null

newValue? ​

string | null

Returns ​

void

Overrides ​

MediaTracksMixin(CustomVideoElement).attributeChangedCallback


handleEvent() ​

handleEvent(event): void

The inner video's error is left out: the sink recovers from those, and fatal ones arrive through the player.

Parameters ​

event ​

Event

Returns ​

void

Overrides ​

MediaTracksMixin(CustomVideoElement).handleEvent


load() ​

load(): void

Destroys the player, then builds a new one from src and config, as preload and autoplay ask.

Returns ​

void

Overrides ​

MediaTracksMixin(CustomVideoElement).load


play() ​

play(): Promise<void>

The HTMLMediaElement play() method attempts to begin playback of the media. It returns a Promise which is resolved when playback has been successfully started.

MDN Reference

Returns ​

Promise<void>

Overrides ​

MediaTracksMixin(CustomVideoElement).play


getTemplateHTML() ​

static getTemplateHTML(attrs): string

Parameters ​

attrs ​

Record<string, string>

Returns ​

string

Overrides ​

MediaTracksMixin(CustomVideoElement).getTemplateHTML