Package-level declarations
Types
Per-item ad configuration, interpreted by the player's active AdsProvider. The config type must match the provider the player was built with: AdTagConfig for VAST/VMAP tag providers (ImaAdsProvider — including a FreeWheel ad server answering in VMAP), or a provider-defined implementation from an ads module (e.g. FreewheelConfig from ogplayer-ads-freewheel). A mismatch surfaces AdListener.onAdError and content plays without ads.
Position of an ad break relative to the content.
Metadata of a single ad, including its position in the pod.
App-facing callbacks for ad playback events. All methods have empty defaults.
SPI base for ad-insertion implementations. Apps construct a provider from an ads module and pass it to OGPlayer.Builder.setAdsProvider — exactly one provider per player. Providers come in two styles:
Implemented by the SDK core; ads providers report their events through it. Must be called on the application main thread.
A VAST/VMAP ad tag, consumed by Media3-timeline providers (IMA).
Structured ad failure. Content playback always continues after an ad error — this is reporting, never fatal.
Implemented by the SDK core; a SlotAdsProvider's handle on the content transport. All methods must be called on the application main thread.
Providers that play ads in their own renderer over the content surface (FreeWheel). Content pauses underneath; the SDK core orchestrates the session through SlotAdsHost and receives events through SlotAdsProviderCallbacks.
Superset of AdsProviderCallbacks for slot providers. Implemented by the SDK core; must be called on the application main thread.
Providers that splice ads into the Media3 timeline (IMA). The content engine plays the ad media; the provider supplies the Media3 ads loader.