An object with callback functions to provide labels for audio tracks, qualities and subtitle tracks.

interface SourceLabelingConfig {
    qualities?: ((quality) => string);
    subtitles?: ((subtitle) => string);
    tracks?: ((track) => string);
}

Properties

qualities?: ((quality) => string)

A function that generates a label for a quality, usually a video quality.

Type declaration

    • (quality): string
    • Parameters

      • quality: QualityMetadata

        Object with metadata about the quality for which the label should be generated.

      Returns string

subtitles?: ((subtitle) => string)

A function that generates a label for a subtitle.

Type declaration

    • (subtitle): string
    • Parameters

      • subtitle: SubtitleTrack

        The subtitle for which the label should be generated.

      Returns string

tracks?: ((track) => string)

A function that generates a label for a track, usually an audio track.

Type declaration

    • (track): string
    • Parameters

      • track: TrackMetadata

        Object with metadata about the track for which the label should be generated. The id field is populated when used for HLS, the mimeType when used for DASH.

      Returns string