Skip to main content
The SDK follows your content player: where the viewer is in the episode, and whether the content plays. An overlay shows over playing content only and ends when the viewer pauses; a pause ad ends when the content plays again. With a TTSDK player (TTVideoEngine, the BytePlus / Volcengine VOD player SDK), one call gives the SDK all of that.

Add the adapter

  • TTSDK 1.40 or later.
  • TTSDK is not included. The adapter uses your app’s own TTSDK, with your license; it adds no TTSDK artifact and no repository to your build.

Track the engine

Call it once the engine has the episode’s source (setStrategySource, setVideoID, …), when the episode starts. The SDK holds the engine weakly and lets go at ads.destroy() or the next track. Your callback stays yours. The adapter listens with addVideoEngineCallback, next to the callback you set with setVideoEngineCallback, and removes its own when it lets go. An overlay ends the moment the viewer pauses.

In a feed

Short-drama feeds usually give each page its own engine, or hand a page an engine TTSDK pre-rendered for it. Give each page its own VideoAds, and track the page’s engine when the page becomes current:
Show an overlay or pause ad on the current page only. A page swiped away with its ad on screen ends that ad within about a second (INTERRUPTED), so the next page’s ad can show.

The playback speed

TTSDK has no getter for the speed. When the viewer changes it, tell the SDK, so an overlay’s duration counts video seconds correctly:
Without it, the SDK accepts playback up to about 4× and takes a bigger jump for a seek.

What the SDK reads

An overlay or pause ad of a VideoAds then throws Invalidated(ContentChanged) at show once its engine plays another video. An engine playing a URL without a vid is still followed; only that check is skipped.