OptiView Ads SDK for React Native
    Preparing search index...

    OptiView Ads SDK for React Native

    The API reference for the OptiView Ads React Native SDK version 1.0.0-beta.6-custom.1364.

    The OptiView Ads SDK for React Native brings the native Android, iOS and tvOS SDKs to a React Native app: a typed JavaScript facade over the native OptiViewAds orchestrator, which owns scheduling, ad rendering and IMA. Configuration, sessions and events mirror the web SDK, so an integration reads the same on every platform.

    This API reference documents the package's functions, connector methods, configuration options, events and data types. Import them from @dolby-optiview/ads-sdk-react-native; on react-native-web the same names come from the package's web entry.

    1. Follow the Getting Started guide for installation and a complete integration example.
    2. Obtain the host player's handle — player.nativeHandle for react-native-theoplayer, or useReactVideoHandle for react-native-video — and call createOptiViewAds with an OptiViewAdsReactNativeConfig.
    3. Subscribe with OptiViewAdsConnector.addEventListener before calling OptiViewAdsConnector.startSession with a SessionConfig.
    4. Use OptiViewAdsConnector.onDiagnostic to verify the integration and OptiViewAdsConnector.exportDiagnostics to capture a support report. Call OptiViewAdsConnector.endSession when switching content, and OptiViewAdsConnector.destroy before the player view unmounts.
    • SDK & Sessions — start here for the connector, its factory and the per-content session options.
    • Configuration — the bridge-safe configuration and the interceptor round-trip policy.
    • Events — event names, typed payloads and break status for your player UI.
    • Player Integration — connect react-native-theoplayer or react-native-video through the native player handle.
    • Break Manifests & Ad Formats — the break schedule types carried by events and interceptors.
    • Manifest Customization — intercept manifest requests and responses, and register asset-parameter macros.
    • Diagnostics — handle diagnostic records and export reports for troubleshooting.

    Start with createOptiViewAds, which returns the OptiViewAdsConnector for one player.

    createOptiViewAds
    CreateOptiViewAdsConnector
    NativeOptiViewAdsConnector
    OptiViewAdsConnector
    RnPresentationState
    SessionConfig
    WebOptiViewAdsConnector

    Configure the SDK instance; every option is plain data that crosses the bridge unchanged.

    AdInsertionMode
    AdPreloadMode
    AssetParameterMacroUpdates
    BreakWarningsConfig
    ChainingConfig
    DEFAULT_INTERCEPTOR_TIMEOUT_MS
    DoubleBoxAudio
    GamConfig
    InterceptorPolicy
    NonBridgeableConfigKey
    OptiViewAdsMode
    OptiViewAdsReactNativeConfig
    OptiViewAdsWebConfig
    PtsSource
    SsaiConfig
    TuneInConfig

    Subscribe with OptiViewAdsConnector.addEventListener; payloads are identical to the web SDK's.

    AdBreakBeginEvent
    AdBreakEndEvent
    AdBreakStatus
    AdBreakStatusEvent
    OptiViewAdsEvent
    OptiViewAdsEventHandler
    OptiViewAdsEventMap
    OptiViewAdsEventType

    Give the SDK the native view handle of the host player component.

    getReactVideoViewTag
    NativePlayerHandleOwner
    ReactVideoTargetEvent
    useReactVideoHandle
    UseReactVideoHandleResult

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

    Break
    BreakEvent
    BreakManifest
    BreakPosition
    EventTrigger

    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.

    DiagnosticEvent
    DiagnosticHandler
    DiagnosticReport
    DiagnosticsConfig