TTVideoEngine, the BytePlus / Volcengine VOD player SDK), one call gives the SDK all of that.
Add the product
KontextVideoTTSDK is a second product of the same package. In Xcode, add it next to KontextVideoSDK (File → Add Package Dependencies, then tick both), or in Package.swift:
currentPlaybackTime, playbackState, playbackSpeed), so it builds without TTSDK and works with your app’s own TTSDK and license.
Track the engine
- Call it once the engine has the episode’s source, when the episode starts.
- The trailing closure names the episode the engine plays (its vid, its URL). An overlay or pause ad of this
VideoAdsthrowsinvalidated(.contentChanged)atshowonce it returns another value. Without it, only the engine moving to anotherVideoAdsis checked. - Your delegate stays yours. TTSDK has one
delegate, and the SDK never sets it: it reads the engine four times a second while an overlay or pause ad is on screen, and at everyshow. - Held weakly: the SDK never keeps the engine alive. It lets go at
destroy()or the nexttrack.
In a feed
Short-drama feeds usually give each page its own engine. Give each page its ownVideoAds, and track the page’s engine when the page becomes current:
.interrupted), so the next page’s ad can show.
What the SDK reads
An object that is not a
TTVideoEngine (it lacks those properties) is followed as never playing, with an error on the console.