@theoplayer/react-ui
    Preparing search index...

    Interface Locale

    interface Locale {
        adClickThroughText: string;
        adSkipButtonText: string;
        adText: string;
        airplayAria: string;
        airplayConnectedAria: string;
        audioMenuHeading: string;
        automaticQualityLabel: string;
        chromecastAria: string;
        chromecastConnectedAria: string;
        chromecastDefaultReceiverName: string;
        chromecastHeading: string;
        closeMenuAria: string;
        colorLabels: Record<KnownColor, string>;
        edgeStyleLabels: Record<EdgeStyle, string>;
        errorHeading: string;
        fontFamilyLabels: Record<KnownFontFamily, string>;
        fullscreenAria: string;
        fullscreenExitAria: string;
        highQualityLabel: string;
        languageMenuHeading: string;
        live: string;
        liveStreamLoading: string;
        liveStreamOffline: string;
        lowQualityLabel: string;
        muteAria: string;
        openBadNetworkModeMenuAria: string;
        openLanguageMenuAria: string;
        openPlaybackRateMenuAria: string;
        openSettingsMenuAria: string;
        pauseAria: string;
        playAria: string;
        playbackRateMenuHeading: string;
        playbackTimeAria: string;
        qualityMenuHeading: string;
        replayAria: string;
        seekAria: string;
        seekToLiveAria: string;
        settingsMenuHeading: string;
        subtitleMenuHeading: string;
        subtitleOff: string;
        textTrackStyleBackgroundColor: string;
        textTrackStyleBackgroundOpacity: string;
        textTrackStyleCustomLabel: string;
        textTrackStyleDefaultLabel: string;
        textTrackStyleEdgeStyle: string;
        textTrackStyleFontColor: string;
        textTrackStyleFontFamily: string;
        textTrackStyleFontOpacity: string;
        textTrackStyleFontSize: string;
        textTrackStyleMenuHeading: string;
        textTrackStyleResetLabel: string;
        textTrackStyleWindowColor: string;
        textTrackStyleWindowOpacity: string;
        unknownQualityLabel: string;
        unknownTimeAria: string;
        unmuteAria: string;
        volumeAria: string;
        adBreakText(currentAd: number, totalAds: number): string;
        adCountdownText(remainingDuration: string): string;
        adSkipCountdownText(remainingDuration: string): string;
        formatBandwidth(bandwidth: number): string;
        formatDuration(duration: Duration): string;
        formatLanguage(languageCode: string): string | undefined;
        formatNarrowDuration(duration: Duration): string;
        formatPercentage(percentage: number): string;
        formatPlaybackRate(rate: number): string;
        formatRemainingDuration(duration: string): string;
        seekBackwardAria(offset: string): string;
        seekForwardAria(offset: string): string;
        timeOfTotalAria(time: string, totalDuration: string): string;
    }
    Index

    Properties

    adClickThroughText: string

    The text on an AdClickThroughButton, e.g. "Visit Advertiser".

    adSkipButtonText: string

    The text on an AdSkipButton, e.g. "Skip Ad".

    adText: string

    The text on an AdDisplay, e.g. "Ad".

    airplayAria: string
    airplayConnectedAria: string

    The aria-label for an AirPlayButton when it is connected to AirPlay.

    audioMenuHeading: string

    The section header for audio tracks in a LanguageMenu.

    automaticQualityLabel: string

    The label for an ActiveQualityDisplay or QualityRadioButton when it is showing the "Automatic" quality selection option.

    chromecastAria: string
    chromecastConnectedAria: string

    The aria-label for a ChromecastButton when it is connected to Chromecast.

    chromecastDefaultReceiverName: string

    The default receiver name for a ChromecastDisplay when playing on a Chromecast receiver with an unknown name. This follows the chromecastHeading.

    chromecastHeading: string

    The heading for a ChromecastDisplay when playing on Chromecast. This heading precedes the name of the connected Chromecast receiver.

    closeMenuAria: string
    colorLabels: Record<KnownColor, string>

    The labels for color style options in a TextTrackStyleRadioGroup, keyed by the original English label (e.g. "White", "Black" or "Red").

    edgeStyleLabels: Record<EdgeStyle, string>

    The labels for edge style options in a TextTrackStyleRadioGroup, keyed by an EdgeStyle value.

    errorHeading: string

    The heading for an ErrorDisplay.

    fontFamilyLabels: Record<KnownFontFamily, string>

    The labels for font family style options in a TextTrackStyleRadioGroup, keyed by the original English label (e.g. "Default" or "Monospace Serif").

    fullscreenAria: string
    fullscreenExitAria: string

    The aria-label for a FullscreenButton when in fullscreen mode.

    highQualityLabel: string

    The label for an AutomaticQualitySelector for THEOlive's BadNetworkModeMenu.

    languageMenuHeading: string

    The heading for a LanguageMenu.

    live: string

    The text on a LiveButton, e.g. "LIVE".

    liveStreamLoading: string

    The announcement message on a THEOliveDefaultUI when the stream is loading.

    liveStreamOffline: string

    The announcement message on a THEOliveDefaultUI when the stream is offline and hasn't started yet.

    lowQualityLabel: string

    The label for a BadNetworkModeSelector for THEOlive's BadNetworkModeMenu.

    muteAria: string

    The aria-label for a MuteButton when it is showing a "mute" button.

    openBadNetworkModeMenuAria: string
    openLanguageMenuAria: string
    openPlaybackRateMenuAria: string
    openSettingsMenuAria: string
    pauseAria: string

    The aria-label for a PlayButton when it is showing a "pause" button i.e. when the player is playing.

    playAria: string

    The aria-label for a PlayButton when it is showing a "play" button, i.e. when the player is paused.

    playbackRateMenuHeading: string

    The heading for a PlaybackRateMenu.

    playbackTimeAria: string
    qualityMenuHeading: string

    The text for the quality option in a SettingsMenu.

    replayAria: string

    The aria-label for a PlayButton when it is showing a "replay" button i.e. when the player is paused at the end of the stream.

    seekAria: string

    The aria-label for a TimeRange.

    seekToLiveAria: string
    settingsMenuHeading: string

    The heading for a SettingsMenu.

    subtitleMenuHeading: string

    The section header for subtitle tracks in a LanguageMenu.

    subtitleOff: string

    The label for a TextTrackOffRadioButton to disable the active subtitle track.

    textTrackStyleBackgroundColor: string

    The heading for the background color style option in a TextTrackStyleMenu.

    textTrackStyleBackgroundOpacity: string

    The heading for the background opacity style option in a TextTrackStyleMenu.

    textTrackStyleCustomLabel: string

    The label for a TextTrackStyleDisplay when it is showing a style option that does not match any predefined values.

    textTrackStyleDefaultLabel: string

    The label for the default style option in a TextTrackStyleRadioGroup.

    textTrackStyleEdgeStyle: string

    The heading for the edge style option in a TextTrackStyleMenu.

    textTrackStyleFontColor: string

    The heading for the font color style option in a TextTrackStyleMenu.

    textTrackStyleFontFamily: string

    The heading for the font family style option in a TextTrackStyleMenu.

    textTrackStyleFontOpacity: string

    The heading for the font opacity style option in a TextTrackStyleMenu.

    textTrackStyleFontSize: string

    The heading for the font size style option in a TextTrackStyleMenu.

    textTrackStyleMenuHeading: string

    The heading for a TextTrackStyleMenu.

    textTrackStyleResetLabel: string

    The label for a TextTrackStyleResetButton to reset the text track style.

    textTrackStyleWindowColor: string

    The heading for the window color style option in a TextTrackStyleMenu.

    textTrackStyleWindowOpacity: string

    The heading for the window opacity style option in a TextTrackStyleMenu.

    unknownQualityLabel: string

    The label for a ActiveQualityDisplay when it is showing a quality selection option without any usable label.

    unknownTimeAria: string

    The aria-valuetext for a TimeDisplay and TimeRange when it does not have a valid time to display.

    unmuteAria: string

    The aria-label for a MuteButton when it is showing an "unmute" button.

    volumeAria: string

    Methods

    • The text on an AdDisplay when playing multiple ads in an ad break, e.g. "Ad X of Y".

      Parameters

      • currentAd: number

        The number of the currently playing ad.

      • totalAds: number

        The total number of ads in the current ad break.

      Returns string

    • The text on an AdCountdown, e.g. "Content will resume in X seconds".

      Parameters

      • remainingDuration: string

        The remaining time until the content can be resumed, after being formatted with formatNarrowDuration.

      Returns string

    • The text on an AdSkipButton when it is showing a countdown.

      Parameters

      • remainingDuration: string

        The remaining time until the ad can be skipped, after being formatted with formatNarrowDuration.

      Returns string

    • Formats a bandwidth value.

      This is optional. If not provided, a default Intl.NumberFormat with the "unit" style is used that dynamically picks between the "kilobit-per-second" or "megabit-per-second" units.

      Examples:

      • 150_000 → "150kb/s"
      • 2_500_000 → "2.5Mb/s"

      Parameters

      • bandwidth: number

        A bandwidth value, in bits per second.

      Returns string

    • Formats the given time duration as a human-readable string.

      This is optional. If not provided, a default Intl.DurationFormat with the "long" style is used.

      Examples:

      • { seconds: 5 } → "5 seconds"
      • { minutes: 2, seconds: 10 } → "2 minutes and 10 seconds"

      Parameters

      Returns string

    • Formats a language name.

      This is optional. If not provided, a default Intl.DisplayNames with the "language" type is used.

      Examples for an English locale:

      • "en" → "English"
      • "fr" → "French"
      • "pt-BR" → "Brazilian Portuguese"

      Examples for a French locale:

      • "en" → "anglais"
      • "fr" → "français"
      • "pt-BR" → "portugais brésilien"

      Parameters

      • languageCode: string

      Returns string | undefined

      A localized language name, or undefined if the language code is unknown.

    • Formats the given time duration as a narrow human-readable string.

      This is optional. If not provided, a default Intl.DurationFormat with the "narrow" style is used.

      Examples:

      • { seconds: 5 } → "5s"
      • { minutes: 2, seconds: 10 } → "2m 10s"

      Parameters

      Returns string

    • Formats the given percentage as a human-readable string.

      This is optional. If not provided, a default Intl.NumberFormat with the "percent" style is used.

      Examples:

      • 0.75 → "75%"
      • 1.0 → "100%"

      Parameters

      • percentage: number

        A percentage, between 0.0 and 1.0.

      Returns string

    • Formats the given playback rate for a PlaybackRateMenu and PlaybackRateDisplay.

      Examples:

      • 1 → "Normal"
      • 1.5 → "1.5x"

      Parameters

      • rate: number

        The playback rate.

      Returns string

    • Formats the given remaining time duration as a human-readable string.

      Examples:

      • "5 seconds" → "5 seconds remaining"
      • "2 minutes and 10 seconds" → "2 minutes and 10 seconds remaining"

      Parameters

      Returns string