Amazon Vinyl
    Preparing search index...

    Interface TextTrackController

    Full controller for the current media's text tracks. Selection is driven declaratively through the controller's options (VinylOptions.text); this interface only adds the render lifecycle used by the owning media track.

    interface TextTrackController {
        activeTextTrack: TextTrackInfo | null;
        textTracks: readonly TextTrackInfo[];
        get active(): boolean;
        activate(): void;
        deactivate(): void;
        hasAnyListeners(): boolean;
        hasListeners(type: keyof TextTrackEventMap): boolean;
        on<K extends keyof TextTrackEventMap>(
            type: K,
            handler: EventHandler<TextTrackEventMap[K]>,
            options?: SignalOptions,
        ): Unsubscribe;
    }

    Hierarchy (View Summary)

    Implemented by

    Index
    activeTextTrack: TextTrackInfo | null

    The currently active text track, or null if none is active.

    textTracks: readonly TextTrackInfo[]

    The list of currently discovered text tracks.

    • get active(): boolean

      Returns true if this text track controller is active.

      Returns boolean

    • Resumes rendering the active selection after a deactivate, reloading its cues. No-op when nothing is selected or already rendering. Called when the owning media track is reactivated.

      Returns void

    • Suspends cue rendering without changing the active selection: cancels any in-flight load and hides the DOM text track (so its cues stop showing). Called when the owning media track is deactivated — e.g. while an ad plays over the suspended content. activate rebuilds it.

      Returns void