Detach from the player and destroy the native SDK instance. Idempotent. Must be called before the hosting player view unmounts.
End the current session. Mirrors web OptiViewAds.endSession.
Resolve all declared providers in manifest order.
Resolve one provider using the current asset-parameter and macro values.
Register a JS manifest-request interceptor. Runs as a bounded, fail-open
bridge round-trip (see InterceptorPolicy). Pass null to clear.
Optional_policy: InterceptorPolicyRegister a JS manifest-response interceptor. Same round-trip policy as OptiViewAdsConnector.setManifestRequestInterceptor.
Optional_policy: InterceptorPolicyStart an ad session for a channel. Mirrors web OptiViewAds.startSession.
Merge macro values for the next ad request; null removes a name.
Replace the live-update layer of the asset parameters. Mirrors web
OptiViewAds.updateAssetParameters.
Per-key precedence: SessionConfig.assetParameters < updateAssetParameters() <
the manifest session layer (vendorConfiguration.gam.sgai[0].assetParameters or
ssai[0].assetParameters) < the per-asset assetParameters. It replaces the
previous update rather than accumulating onto it. Applies to future ad breaks.
Report an ad click and return its click-through URL without navigating.
Snapshot of the current/upcoming ad break. Mirrors getAdBreakStatus.
Whether ad playback is muted. Mirrors web OptiViewAds.muted.
What the SDK is presenting right now: whether the content player is in
picture-in-picture, and which media owns the surface. Mirrors the web
OptiViewAds.getPresentationState() — both halves are the SDK's own
decisions, so an application (or test harness) inferring them would be
duplicating rules that change. The one every PiP integration needs:
while pinned, a forced-single ad plays THROUGH the content player
(insertion: 'shared-element'), so the player's own clock reports the
AD's progress — anything displaying or asserting content position must
consult showing/insertion instead of reading the player directly.
Ad playback volume in [0, 1]. Mirrors web OptiViewAds.volume.
Report the host app's picture-in-picture state so the SDK can adjust the
break layout (a PiP window is one small surface, so multi-surface break
formats are forced to single while pinned).
Only needed for host players whose library has no presentation-mode event surface the bridge can observe — i.e. react-native-video, where the integrator wires it from the view's own event:
<Video onPictureInPictureStatusChanged={(e) => connector.notePictureInPicture(e.isActive)} …
react-native-theoplayer hosts must NOT call this: the bridge already
observes the player's presentation-mode events there, and the call is
ignored natively (one source of truth per instance). State-only — the SDK
never opens or closes a PiP window itself.
Seek content to time seconds. Mirrors web OptiViewAds.seek: the SDK
owns the seek policy — suppressed during breaks with controls.snapback,
no-op without a session. Prefer this over seeking the host player
directly, which bypasses the policy.
Mute or unmute ad playback; content follows the SDK's audio rules.
Set the ad playback volume in [0, 1]; values outside are clamped.
Skip the active ad break when its manifest policy allows it.
Subscribe to a public SDK event. Payloads are identical to the web SDK's
OptiViewAdsEventMap (plain serializable data).
Remove a previously added listener.
Export the native diagnostics report. Mirrors exportDiagnostics.
Remove a previously registered diagnostic handler.
The react-native-web OptiViewAdsConnector: the same public facade surface as the native connector, delegating every call to an in-process
@dolby-optiview/ads-sdkOptiViewAds— no bridge, no TurboModule, no serialization.Parity notes:
DA-MANIFEST-*INTERCEPT-FAILEDdiagnostics on throw) govern instead.volumechangereflects the effective audio owner exactly as documented for web).