Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/evt/lib/index.ts>dom.TextTrack

💧EventEmitter's typesafe replacement
Go to Latest
interface dom.TextTrack
implements EventTarget
import { type dom } from "https://deno.land/x/evt@v2.4.7/lib/index.ts";
const { TextTrack } = dom;

This interface also inherits properties from EventTarget.

Properties

readonly
activeCues: TextTrackCueList
readonly
cues: TextTrackCueList
readonly
inBandMetadataTrackDispatchType: string
readonly
kind: string
readonly
label: string
readonly
language: string
mode: TextTrackMode | number
oncuechange: ((this: TextTrack, ev: Event) => any) | null
onerror: ((this: TextTrack, ev: Event) => any) | null
onload: ((this: TextTrack, ev: Event) => any) | null
readonly
readyState: number
readonly
sourceBuffer: SourceBuffer | null
readonly
DISABLED: number
readonly
ERROR: number
readonly
HIDDEN: number
readonly
LOADED: number
readonly
LOADING: number
readonly
NONE: number
readonly
SHOWING: number

Methods

addCue(cue: TextTrackCue): void
removeCue(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
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