OGPlayer Web SDK
    Preparing search index...

    Interface OGUIConfig

    Per-control visibility + behavior.

    interface OGUIConfig {
        adBlockerPolicy: "none" | "notice" | "block";
        adPauseIconSvg?: string;
        adPlayIconSvg?: string;
        audioTrackIconSvg?: string;
        colors?: Partial<OGControlColors>;
        contentRatingsTimeoutMs: number;
        controlsTimeoutMs: number;
        customActions: CustomAction[];
        dimens?: Partial<OGControlDimens>;
        doubleClickToSeek: boolean;
        errorMessageProvider?: (error: OGPlayerError) => string | null | undefined;
        errorTextStyle?: string;
        fullscreenEnterIconSvg?: string;
        fullscreenExitIconSvg?: string;
        inputMode: InputMode;
        keyboardShortcuts: boolean;
        keymap?: Partial<Record<string, OGKeyAction | null>>;
        locale?: string;
        onFullscreenExitRequest?: () => void;
        pauseIconSvg?: string;
        playIconSvg?: string;
        qualityIconSvg?: string;
        renderErrorOverlay?: (
            error: OGPlayerError,
            retry: () => void,
        ) => HTMLElement;
        replayIconSvg?: string;
        retryButtonLabel: string;
        retryButtonStyle?: string;
        seekBackwardIconSvg?: string;
        seekForwardIconSvg?: string;
        showAdCueMarkers: boolean;
        showAudioTrackButton: boolean;
        showContentRatings: boolean;
        showFullscreenButton: boolean;
        showProgressBar: boolean;
        showQualityButton: boolean;
        showRetryButton: boolean;
        showSeekButtons: boolean;
        showSpeedButton: boolean;
        showSubtitleButton: boolean;
        showTimeLabels: boolean;
        showTitle: boolean;
        showUpNext: boolean;
        showVolumeButton: boolean;
        skipNextIconSvg?: string;
        skipPreviousIconSvg?: string;
        speedIconSvg?: string;
        strings?: Partial<OGStrings>;
        subtitlesIconSvg?: string;
        titleStyle?: string;
        titleTimeoutMs: number;
        upNextLeadSeconds: number;
        upNextStyle?: string;
        upNextText: string;
        volumeMuteIconSvg?: string;
        volumeOnIconSvg?: string;
    }
    Index
    adBlockerPolicy: "none" | "notice" | "block"

    What happens when an ad blocker is detected (error 902):

    • "notice": content plays ad-free with a dismissible nudge (default)
    • "block": playback stops and the video is hidden until the viewer disables the blocker and reloads — the hard broadcaster line
    • "none": the SDK stays quiet; the host handles the 902 event itself
    adPauseIconSvg?: string
    adPlayIconSvg?: string
    audioTrackIconSvg?: string
    colors?: Partial<OGControlColors>

    Chrome theming — partial overrides merged over the OGPlayer defaults (mobile parity: OGControlColors / OGControlDimens).

    contentRatingsTimeoutMs: number
    controlsTimeoutMs: number
    customActions: CustomAction[]
    dimens?: Partial<OGControlDimens>
    doubleClickToSeek: boolean
    errorMessageProvider?: (error: OGPlayerError) => string | null | undefined

    Your own error-overlay text, in any language — called with the full OGPlayerError (stable codes: 2000 network, 3000 source, 4000 DRM, 5000 renderer, 6000 live, 9000 unknown). Return null/undefined for the SDK default. The error object still reaches onError unchanged.

    errorTextStyle?: string

    Extra inline CSS for the error-overlay message text (same contract as titleStyle), e.g. "font-family:Georgia,serif;font-size:16px".

    fullscreenEnterIconSvg?: string
    fullscreenExitIconSvg?: string
    inputMode: InputMode

    Input model of the chrome. "pointer" (default) is today's mouse/touch chrome. "remote" ADDS D-pad / OK / Back / media-key navigation for TV remotes on top of it (a pointer remote such as LG's Magic Remote keeps working), sizes the chrome for ten-foot viewing (tvDimens), and drops the fullscreen button (a TV app is always full-screen). Playback behaviour is untouched. Also settable as the input="remote" attribute. Back is consumed only while the chrome has something to dismiss; with the chrome down it bubbles with its default claimed and the element fires og-back.

    keyboardShortcuts: boolean

    Keyboard shortcuts while the player has focus (default true): Space/K play-pause, ←/→ and J/L seek by the seek increment, ↑/↓ volume, M mute, F fullscreen, C subtitles on/off, 0–9 jump to 0–90 % (VOD), Home/End start/end (live edge on live), Esc leaves fullscreen. Seek keys obey the live rules and stay inert during ads. false = the element handles no keys at all (not even Space) — the host owns the keyboard.

    keymap?: Partial<Record<string, OGKeyAction | null>>

    Per-key overrides merged over the default map: { m: null } removes mute, { p: "playPause" } adds a key, { ArrowUp: "seekForward" } remaps one. Keys are KeyboardEvent.key values; letters are case-insensitive. Unmapped keys pass through to the page.

    locale?: string

    BCP-47 language of the track names built from a track's language code ("de" → "Duits" with "nl"), via the browser's Intl.DisplayNames. Default "en" — the browser's own language is never assumed. The element's lang attribute (<og-player lang="nl">) sets it too; a config value wins.

    onFullscreenExitRequest?: () => void

    When set, the fullscreen-exit button calls this instead of leaving fullscreen — the host decides (typically: close the screen). Mobile parity: onFullscreenExitRequest. The browser's own Esc key still exits directly (platform behavior that cannot be intercepted).

    pauseIconSvg?: string
    playIconSvg?: string

    Glyph overrides — inline SVG markup, tinted like the chrome (mobile parity: setPlayIcon / setPauseIcon / setSeekForwardIcon …).

    qualityIconSvg?: string
    renderErrorOverlay?: (error: OGPlayerError, retry: () => void) => HTMLElement

    Your own error UI, rendered ON the player surface when a fatal playback error occurs (embedded and fullscreen alike). Return an element; the SDK mounts it exactly when the built-in overlay would show, clears it on retry/new load, and skips the built-in overlay entirely (so errorMessageProvider / showRetryButton / retryButtonLabel don't apply). The retry callback runs player.retry() plus the SDK's housekeeping.

    replayIconSvg?: string
    retryButtonLabel: string

    Label of the Retry button (default "Retry"). Left at the default it follows strings.retry; any other value wins over strings.retry.

    retryButtonStyle?: string

    Extra inline CSS for the error overlay's Retry button, e.g. "background:#3D6EF5;color:#fff;font-family:Georgia,serif".

    seekBackwardIconSvg?: string
    seekForwardIconSvg?: string
    showAdCueMarkers: boolean

    Yellow VMAP break dots on the scrubber (mobile parity).

    showAudioTrackButton: boolean
    showContentRatings: boolean
    showFullscreenButton: boolean
    showProgressBar: boolean
    showQualityButton: boolean
    showRetryButton: boolean

    Show a Retry button on the error overlay (default true). Retry reloads the failed item — VOD resumes where playback stopped.

    showSeekButtons: boolean
    showSpeedButton: boolean
    showSubtitleButton: boolean
    showTimeLabels: boolean
    showTitle: boolean
    showUpNext: boolean

    "Up next" countdown card in the lead window before a playlist item ends (default true). false = the queue still auto-advances, silently.

    showVolumeButton: boolean
    skipNextIconSvg?: string
    skipPreviousIconSvg?: string

    Playlist previous / next glyphs of the remote chrome, where the two buttons flank play/pause (mobile parity: setSkipPreviousIcon / setSkipNextIcon). Pointer mode draws neither button.

    speedIconSvg?: string
    strings?: Partial<OGStrings>

    Every word the chrome shows or reads to screen readers — a partial map merged over the English defaults (like colors / dimens), with the same keys on every OGPlayer platform: { subtitles: "Ondertiteling", subtitlesOff: "Uit", retry: "Opnieuw proberen" }. Placeholders are {name} tokens; unknown keys are ignored. errorMessageProvider, retryButtonLabel and upNextText still win where set.

    subtitlesIconSvg?: string
    titleStyle?: string

    Extra CSS applied to the title overlay (mobile parity: titleTextStyle / titleFont), e.g. font-size:22px; font-family:Georgia;.

    titleTimeoutMs: number
    upNextLeadSeconds: number

    Seconds before the end at which the card appears (default 10, clamped to 1–60).

    upNextStyle?: string

    Extra inline CSS for the card (same contract as titleStyle), e.g. "background:#F6C445E6;color:#131313;font-family:Georgia,serif".

    upNextText: string

    Card text template — {seconds} and {title} are substituted (default "Next in {seconds}"). Your copy, any language. Left at the default it follows strings.upNext; any other value wins over it.

    volumeMuteIconSvg?: string
    volumeOnIconSvg?: string