OptiView Ads SDK
    Preparing search index...

    OptiView Ads SDK

    The API reference for the OptiView Ads Web SDK version 1.0.0-beta.4.

    The OptiView Ads SDK for web integrates ad playback with your video player. Use it to configure Server-Guided Ad Insertion (SGAI) or Server-Side Ad Insertion (SSAI), manage monetization sessions, respond to playback events, and troubleshoot your integration.

    This API reference documents the SDK's classes, configuration options, events, and data types. Import them from @dolby-optiview/ads-sdk.

    1. Follow the Getting Started guide for installation and a complete integration example.
    2. Connect your content player through a PlayerAdapter, then create an OptiViewAds instance with OptiViewAdsConfig. The web SDK includes a default ad player; you only need CreateAdAdapter for a custom ad player.
    3. Subscribe with OptiViewAds.addEventListener before calling OptiViewAds.startSession. Use SessionConfig for a break-manifest session or SsaiSessionConfig for a stitched stream.
    4. Use OptiViewAds.onDiagnostic to verify the integration and OptiViewAds.exportDiagnostics to capture a support report. Call OptiViewAds.endSession when switching content, or OptiViewAds.destroy when the SDK is no longer needed.
    • SDK & Sessions — start here for the SDK entry point and per-content session options.
    • Configuration — choose insertion and preload modes, audio behavior, and ad-service settings.
    • Events — find event names, typed payloads, and break status for your player UI.
    • Player Integration — connect a supported player or implement a custom player adapter.
    • Break Manifests & Ad Formats — understand break schedules, layouts, assets, and targeting.
    • Manifest Customization — customize manifest requests and responses, and register asset-parameter macros.
    • Diagnostics — configure diagnostic capture, handle records, and export reports for troubleshooting.

    Start with OptiViewAds, then choose the session configuration for your content.

    AdInsertionType
    OptiViewAds
    SessionConfig
    SsaiSessionConfig
    StartSessionConfig

    Configure the SDK instance's playback behavior and ad-service integrations.

    AdInsertionMode
    AdPreloadMode
    AssetParameterMacroUpdates
    BreakWarningsConfig
    ChainingConfig
    DoubleBoxAudio
    GamConfig
    OptiViewAdsConfig
    OptiViewAdsMode
    PtsSource
    SsaiConfig
    TuneInConfig

    Subscribe with OptiViewAds.addEventListener; use typed payloads to keep your UI in sync.

    AdBeginEvent
    AdBreakBeginEvent
    AdBreakEndEvent
    AdBreakPhase
    AdBreakStatus
    AdBreakStatusEvent
    AdChannelChangeEvent
    AdChannelChangeReason
    AdClickEvent
    AdEndEvent
    AdErrorEvent
    AdFirstQuartileEvent
    AdMidpointEvent
    AdThirdQuartileEvent
    AdTimeupdateEvent
    OptiViewAdsEvent
    OptiViewAdsEventHandler
    OptiViewAdsEventMap
    OptiViewAdsEventType
    PlaybackSource
    PlayingEvent
    VolumeChangeEvent
    WaitingEvent

    Connect your content player through PlayerAdapter, or provide a custom ad-player factory.

    CreateAdAdapter
    PlayerAdapter
    PlayerAdapterEvent
    PlayerAdapterEventHandler
    TimedMetadataCue
    VideoQuality

    Model break schedules, ad layouts, assets, targeting, and delivery rules.

    Asset
    AssetType
    AssetUri
    AssetWithCompanion
    Break
    BreakEvent
    BreakFormat
    BreakManifest
    BreakPosition
    BreakVariant
    Controls
    DeliveryMode
    DeliveryRule
    DeviceType
    DoubleBreakVariant
    EventTrigger
    GamVendorConfiguration
    Interaction
    LshapeAdBreakVariant
    LshapeContentBreakVariant
    MediaType
    OverlayBreakVariant
    OverlayPosition
    OverlaySize
    Polling
    SingleBreakVariant
    StaticAsset
    Targeting
    Timebase
    VastAsset
    Vendor
    VendorAsset
    VendorConfiguration
    VendorConfigurationBase

    Intercept manifest requests and responses, and customize ad requests with asset-parameter macros.

    AssetParameterMacro
    AssetParameterMacros
    AssetParameterMacroValue
    ManifestInterceptContext
    ManifestMockResponse
    ManifestRequest
    ManifestRequestContext
    ManifestRequestInterceptor
    ManifestRequestInterceptorResult
    ManifestResponseInterceptor
    OPTIVIEW_ASSET_PARAMETER_MACROS

    Observe the diagnostic stream and export a report when investigating an integration issue.

    ConfigSummary
    DiagnosticCategory
    DiagnosticCodeInfo
    DiagnosticEvent
    DiagnosticHandler
    DiagnosticLevel
    DiagnosticReport
    DiagnosticsConfig
    KnownDiagnosticCode