THEOplayer Web SDK
    Preparing search index...

    Interface CustomAdIntegrationHandler

    The common handler for a custom ad integration.

    You can implement one or more of these methods to hook into various parts of the player's lifecycle and perform your integration-specific ad handling.

    interface CustomAdIntegrationHandler {
        destroy?(): MaybeAsync<void>;
        resetSource?(): MaybeAsync<void>;
        setSource?(source: SourceDescription): MaybeAsync<SourceDescription>;
        skipAd?(ad: Ad): void;
    }

    Hierarchy (View Summary)

    Index
    • Handler which will be called when the player is destroyed.

      This allows the integration to clean up any resources, such as DOM elements or event listeners.

      Returns MaybeAsync<void>

    • Handler which will be called before a new source is loaded into the player, or before the player is destroyed.

      This allows the integration to clean up any source-specific resources, such as scheduled ads or pending HTTP requests.

      Returns MaybeAsync<void>