Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

TextTrack

This interface also inherits properties from EventTarget.

interface TextTrack extends EventTarget {
readonly activeCues: TextTrackCueList | null;
readonly cues: TextTrackCueList | null;
readonly id: string;
readonly inBandMetadataTrackDispatchType: string;
readonly kind: TextTrackKind;
readonly label: string;
readonly language: string;
oncuechange: ((this: TextTrack, ev: Event) => any) | null;
addCue(cue: TextTrackCue): void;
addEventListener<K extends keyof TextTrackEventMap>(
type: K,
listener: (this: TextTrack, ev: TextTrackEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void;
removeCue(cue: TextTrackCue): void;
removeEventListener<K extends keyof TextTrackEventMap>(
type: K,
listener: (this: TextTrack, ev: TextTrackEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void;
}
var TextTrack: {
prototype: TextTrack;
new (): TextTrack;
}
;

§Extends

§Properties

§
readonly activeCues: TextTrackCueList | null
[src]

Returns the text track cues from the text track list of cues that are currently active (i.e. that start before the current playback position and end after it), as a TextTrackCueList object.

§
readonly cues: TextTrackCueList | null
[src]

Returns the text track list of cues, as a TextTrackCueList object.

§
readonly id: string
[src]

Returns the ID of the given track.

For in-band tracks, this is the ID that can be used with a fragment if the format supports media fragment syntax, and that can be used with the getTrackById() method.

For TextTrack objects corresponding to track elements, this is the ID of the track element.

§
readonly inBandMetadataTrackDispatchType: string
[src]

Returns the text track in-band metadata track dispatch type string.

§
readonly kind: TextTrackKind
[src]

Returns the text track kind string.

§
readonly label: string
[src]

Returns the text track label, if there is one, or the empty string otherwise (indicating that a custom label probably needs to be generated from the other attributes of the object if the object is exposed to the user).

§
readonly language: string
[src]

Returns the text track language string.

§

Returns the text track mode, represented by a string from the following list:

Can be set, to change the mode.

§
oncuechange: ((this: TextTrack, ev: Event) => any) | null
[src]

§Methods

§
addCue(cue: TextTrackCue): void
[src]

Adds the given cue to textTrack's text track list of cues.

§
addEventListener<K extends keyof TextTrackEventMap>(
type: K,
listener: (this: TextTrack, ev: TextTrackEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
[src]
§
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
[src]
§
removeCue(cue: TextTrackCue): void
[src]

Removes the given cue from textTrack's text track list of cues.

§
removeEventListener<K extends keyof TextTrackEventMap>(
type: K,
listener: (this: TextTrack, ev: TextTrackEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
[src]
§
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void
[src]