OGPlayer Web SDK
    Preparing search index...

    Class ImaAdsProvider

    SPI for a client-side ads integration (Google IMA HTML5, future slot providers) — the web mirror of the mobile AdsProvider SPI. Opt-in: apps that never touch ads load none of this.

    Implements

    Index
    • Wire the provider to the content element and the ad UI container. Called before the first requestAds, and again whenever the host's video element or ad container changes (a re-mounted ad layer) — a provider must adopt the new nodes and release anything bound to the old ones.

      Parameters

      Returns void

    • Remote-control hand-off (Android TV's "Right/Up steps into the ad's own UI"): the SDK's CTV AdsManager.focus() moves real DOM focus into IMA's iframe — asynchronously, a few ms later — onto its skip button when there is one, else its interactive elements. From then on the keys are the SDK's; on Back or OK it hands focus back to the parent document by itself (measured on a Tizen 10 set with a real preroll, 2026-09-24: WINDOW focus + focusin on the player after each of them), where the chrome puts the ring back on the ad play/pause. Returns true when a hand-off was attempted; the chrome confirms a beat later whether focus actually moved (an ad with nothing to focus moves it nowhere).

      Returns boolean

    • Request ads for the item's config. autostart carries the content's autoplay intent: false = hold the break until startPendingBreak().

      Parameters

      Returns void

    • The player/container was resized (fullscreen, layout).

      Parameters

      • width: number
      • height: number
      • fullscreen: boolean

      Returns void

    • IMA plays the creative in its own layer, so the ad's volume is its own.

      Parameters

      • volume: number
      • muted: boolean

      Returns void