Add the adapter
Track the player
- Any Media3
Player: anExoPlayer, aMediaController, or your ownPlayer. - The main looper: the SDK reads the player on the main thread. A player built on another looper is not followed (an error in the log), and the content counts as not playing.
- Held weakly: the SDK never keeps your player alive. It lets go at
ads.destroy()or the nexttrack.
One player across episodes
Most apps reuse one player and swap its media item. Track it from each episode’sVideoAds once that episode is in the player:
setMediaItem, the new episode’s overlay and pause ads throw Invalidated(ContentChanged) at show: the SDK took the previous item for this episode’s. Track again after setMediaItem and they show.
What the SDK reads
The adapter listens to the player’s own callbacks, so an overlay ends the moment the viewer pauses.