Skip to content

How the SDK works

What it consists of

The SDK is a web page (for apps) or a script (for websites). Inside, it has four parts:

  • VAST player loads the tag, follows wrapper chains, selects the video file, and sends tracking to the ad system: impression, quartiles, clicks, errors.
  • UI draws elements on top of the creative: the skip button, the click-through link, and labeling.
  • Controller — the object your code uses to control playback.
  • Events tell your code about every step. The delivery method depends on the platform.

Who's responsible for what

In apps, the work is split: the SDK knows everything about the ad, while your player plays the video. This way the ad runs through the same player as your content — with the same quality and hardware decoding.

TaskSDKYour app
Load the VAST, follow wrapper chains
Select the video file
Play the videoVPAID, browser
Report playback timetimeupdateAd()
Track quartiles and the skip point
Send tracking to the ad system
Draw buttons and labeling
Open the advertiser's site on AdClick
Close the ad and return to the content

What it looks like on screen

The SDK page is transparent and sits on top of the app player. The user sees one screen:

Layers

The WebView is the top layer: it receives taps on the SDK buttons. The app player sits below it. Make the WebView background transparent, or the ad won't be visible.

How playback happens

For the detailed event order, ad pods, and skipping, see Ad lifecycle.

Two builds

NativeWeb
Who it's forAndroid, Android TV, iOSWebsites
What it isA page opened in a WebViewThe ad-sdk.js script and styles
StartsOn its own, from parameters in the addresswindow.adSDK.init()
Controllerwindow.myAdControllercontroller.loader
Eventswindow.Android / AdEventsHandlerloader.on()
VideoApp playerSDK