ClientSideAdIntegrationHandler

public protocol ClientSideAdIntegrationHandler : CustomAdIntegrationHandler

A handler for a custom client-side ad integration.

Remark

This API is experimental and may change in a future version.
  • Handles a scheduled ad description for this integration.

    The call is cancelled when the source changes or the player is destroyed. Check for cancellation after asynchronous work, before creating ads.

    Declaration

    Swift

    @MainActor
    func schedule(adDescription: CustomAdDescription) async throws

    Parameters

    adDescription

    The description of the scheduled ads.

  • play() Default implementation, asynchronous

    Called before content playback begins.

    Default Implementation

    Declaration

    Swift

    @MainActor
    func play() async throws