Chartbreaker
    Preparing search index...

    Interface TextTrackCue

    The TextTrackCue interface of the WebVTT API is the abstract base class for the various derived cue types, such as VTTCue; you will work with these derived types rather than the base class.

    MDN Reference

    interface TextTrackCue {
        endTime: number;
        id: string;
        onenter: null | ((this: TextTrackCue, ev: Event) => any);
        onexit: null | ((this: TextTrackCue, ev: Event) => any);
        pauseOnExit: boolean;
        startTime: number;
        track: null | TextTrack;
        addEventListener<K extends keyof TextTrackCueEventMap>(
            type: K,
            listener: (this: TextTrackCue, ev: TextTrackCueEventMap[K]) => any,
            options?: boolean | AddEventListenerOptions,
        ): void;
        addEventListener(
            type: string,
            listener: EventListenerOrEventListenerObject,
            options?: boolean | AddEventListenerOptions,
        ): void;
        dispatchEvent(event: Event): boolean;
        removeEventListener<K extends keyof TextTrackCueEventMap>(
            type: K,
            listener: (this: TextTrackCue, ev: TextTrackCueEventMap[K]) => any,
            options?: boolean | EventListenerOptions,
        ): void;
        removeEventListener(
            type: string,
            listener: EventListenerOrEventListenerObject,
            options?: boolean | EventListenerOptions,
        ): void;
    }

    Hierarchy

    • EventTarget
      • TextTrackCue
    Index

    Properties

    endTime: number

    The endTime property of the TextTrackCue interface returns and sets the end time of the cue.

    MDN Reference

    id: string

    The id property of the TextTrackCue interface returns and sets the identifier for this cue.

    MDN Reference

    onenter: null | ((this: TextTrackCue, ev: Event) => any)
    onexit: null | ((this: TextTrackCue, ev: Event) => any)
    pauseOnExit: boolean

    The pauseOnExit property of the TextTrackCue interface returns or sets the flag indicating whether playback of the media should pause when the end of the range to which this cue applies is reached.

    MDN Reference

    startTime: number

    The startTime property of the TextTrackCue interface returns and sets the start time of the cue.

    MDN Reference

    track: null | TextTrack

    The track read-only property of the TextTrackCue interface returns the TextTrack object that this cue belongs to.

    MDN Reference

    Methods

    • The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.

      MDN Reference

      Parameters

      • event: Event

      Returns boolean