Skip to main content
A video ad has three parties: your app, the SDK and the Kontext ad server. Your app asks and decides the moment; the SDK renders and tracks; the server runs the auction, hosts the creative and settles every bid with the advertiser.

The flow

The diagram follows a pause ad. Overlay and linear ads go the same way; only the moment and the show() call differ.
  1. Initialize once at launch. initialize(with:) stores your token and sends a configuration request in the background. Nothing waits on it; ads requests made meanwhile queue behind it.
  2. Create the video’s ads. One VideoAds per episode, with what you know about it. Creating it sends nothing.
  3. Ask for an ad. format(.pause) sends a request with the content and the player size and returns the pause ad. The server runs an auction across its demand partners and answers with an ad, or a no-fill reason.
  4. Look at the price, then load or reject. The VideoAd carries its CPM before anything renders. load() renders the creative off screen and returns once it is ready to draw; reject() tells the server you won’t use it.
  5. Show it at your moment. show(in: playerView) puts the creative on screen inside your player view (overlay, pause); show() presents it full screen (linear). From here the SDK owns the ad: it counts the impression, measures viewability, tracks every interaction, and hands you one didEnd.
  6. The server settles with the advertiser. Every event goes to our server, which reports to the advertiser and bills. An ad you never show is settled too, as not used, when you reject it, destroy the VideoAds, or it expires.

What you provide and what the SDK handles

Where the creative lives

Our server hosts every ad’s creative, and the SDK renders it isolated from your app: the advertiser’s code never runs in your app, a tap opens a URL only after a real touch, and the SDK does all the tracking.

Where to next

Ad formats

Overlay, pause and linear: where they appear, how big, how they end.

Ad lifecycle

What the SDK holds, when it lets go, and the one callback you implement.

Targeting

What to send so ads match the episode and the viewer.

Swift Video SDK

The 10-minute integration.