interface SubtitlesApi {
    onCreate$: Observable<SubtitlesCreateEvent>;
    onHide$: Observable<SubtitlesEvent>;
    onRemove$: Observable<SubtitlesEvent>;
    onShow$: Observable<SubtitlesEvent>;
    onSubtitlesLoaded$: BehaviorSubject<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 full)

  • 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$: BehaviorSubject<undefined | SubtitlesLoadedEvent>

Fires on subtitles load. Initial value is undefined.

Methods