Interface MKSubtitlesAPI

interface MKSubtitlesAPI {
    add(subtitle: MKSubtitleTrack): void;
    cueEnter(cue: MKSubtitleCueEvent): void;
    cueExit(cue: MKSubtitleCueEvent): void;
    disable(subtitleID: string): void;
    enable(subtitleID: string, exclusive?: boolean): void;
    list(): MKSubtitleTrack[];
    remove(subtitleID: string): void;
}

Methods

  • Disable an enabled subtitle track.

    Parameters

    Returns void

  • Enables a subtitle track.

    Multiple tracks can be enabled concurrently depending on the exclusive flag.

    Parameters

    • subtitleID: string

      the id of the MKSubtitleTrack to enable

    • Optionalexclusive: boolean

      Optional, default is true and all other enabled tracks will be disabled. When set to false, the given track will be enabled additionally.

    Returns void

  • Removes a subtitle. Disables it in case it's enabled before removal.

    Parameters

    Returns void