OptiViewAdsConfig
Org-level SDK configuration, fixed for the lifetime of the OptiViewAds instance. Chaining uses the brain's already-resolved ChainingConfig; the default below matches the web DEFAULT_CHAINING (enabled, 2s gap). tuneIn matches the web DEFAULT_TUNE_IN (enabled, 5s minimum remaining duration).
Constructors
Properties
Safety margin, in seconds, added to a break's effective duration to form the hard cut-off at which the SDK always returns to content — regardless of whether the inserted ad media has reached its own end. Set to 0.0 to cut exactly at the break boundary. Mirrors the web adBreakCutSafetyMarginSec.
Ad insertion strategy; defaults to AdInsertionMode.AUTO, which resolves to overlay on Android.
Ad preload strategy; defaults to AdPreloadMode.AUTO, matching the web DEFAULT_AD_PRELOAD_MODE. Android has no browser UA, so auto resolves to AdPreloadMode.PARALLEL unless the adapter reports supportsParallelBuffering == false — with the AUTO default that capability hint is authoritative without any configuration.
Pre-break warning thresholds (seconds before a non-pre-roll break) at which the SDK emits an adbreakstatus with phase = upcoming. Defaults to none. Mirrors the web breakWarnings config. See BreakWarningsConfig.
Consecutive-break chaining; defaults to on with a 2-second gap.
Keep the content player PLAYING through an eligible replacement break instead of pausing it and seeking back afterwards.
Pin this session's delivery architecture instead of letting the break manifest's delivery rules steer it (ADS-326).
Structured diagnostics settings.
Which side keeps audio during a double-format break: the ad (default) or content.
Optional hook to inspect/modify the manifest HTTP request before the SDK fetches it (initial fetch and every poll). Can redirect the URL, add headers, or short-circuit the network with a mocked raw body (parsed + validated normally). May suspend. On throw emits DA-MANIFEST-REQUEST-INTERCEPT-FAILED and falls back to the normal network fetch. See ManifestRequestInterceptor. The SDK forwards it to the ManifestSource; the default HttpManifestSource applies it.
Optional hook to inspect/modify the break manifest after the SDK fetches and validates it, before it is scheduled. Receives the typed, parsed BreakManifest (initial fetch and every poll) and returns the manifest to use. May suspend. See ManifestResponseInterceptor. The SDK forwards it to the ManifestSource; the default HttpManifestSource applies it.
How long, in seconds, to wait for the stream's EXT-X-PROGRAM-DATE-TIME on a wallclock-timebase session before concluding the stream carries none.
The adapter around the application's content player.
Selects how timebase: "pts" break starts are resolved. PtsSource.MEDIA_TIME uses the manifest start directly. PtsSource.ANVATO_CUE tracks Anvato timed-metadata cues from the content player — HLS ID3 GEOB frames with description Anvatos (MIME application/json) and DASH emsg events with scheme urn:anvato:es1:052016 — whose payload is a query string of the form type=cue&pts=<seconds>. A PTS break is then scheduled at the media time of the observed cue whose pts matches the break's start (±5 ms); a break whose cue has not been observed yet stays pending (surfaced once per break via the DA-ANVATO-CUE-PENDING diagnostic). SGAI only; has no effect on wallclock-timebase manifests. Mirrors the web ptsSource. Defaults to PtsSource.MEDIA_TIME.
How the picture changes at the edges of a break; see TransitionConfig.
Tune-in (join-in-progress); defaults to on with a 5-second minimum remaining duration.