interface SubtitlesApi {
    onCreate$: Observable<SubtitlesCreateEvent>;
    onHide$: Observable<SubtitlesEvent>;
    onRemove$: Observable<SubtitlesEvent>;
    onShow$: Observable<SubtitlesEvent>;
    onSubtitlesLoaded$: Observable<undefined | SubtitlesLoadedEvent>;
    createVttTrack(
        track: Pick<
            SubtitlesVttTrack,
            "default"
            | "id"
            | "label"
            | "src"
            | "language",
        >,
    ): Observable<undefined | SubtitlesVttTrack>;
    getActiveTrack(): undefined | SubtitlesVttTrack;
    getTracks(): SubtitlesVttTrack[];
    hideActiveTrack(): Observable<void>;
    hideTrack(id: string): Observable<void>;
    removeAllTracks(): Observable<void>;
    removeTrack(id: string): Observable<void>;
    showActiveTrack(): Observable<void>;
    showTrack(id: string): Observable<void>;
    toggleShowHideActiveTrack(): Observable<void>;
}

Hierarchy (View Summary)

  • Api
    • SubtitlesApi

Properties

onCreate$: Observable<SubtitlesCreateEvent>

Fires on subtitles create

onHide$: Observable<SubtitlesEvent>

Fires on subtitles hide

onRemove$: Observable<SubtitlesEvent>

Fires on subtitles remove

onShow$: Observable<SubtitlesEvent>

Fires on subtitles show

onSubtitlesLoaded$: Observable<undefined | SubtitlesLoadedEvent>

Fires on subtitles load. Initial value is undefined. Always emits the current value on subscription.

Methods