Skip to main content
Version: 7.12.0

SpotX

SpotX is a global video ad serving platform providing digital media owners with a solution that allows them to monetize their content with video advertising across desktop, mobile and connected devices.

SDKs

Web SDKAndroid SDKiOS SDKtvOS SDKAndroid TV SDKChromecast SDK
YesNoNoNoNoNo

Prerequisites

Your THEOplayer SDK must have the SpotX module enabled. You can enable this module when building your THEOplayer SDK through the THEOplayer Development Portal.

Integrating SpotX

Web SDK

Add the SpotX ad integration when configuring the player

player.source = {
sources: ...,
ads: [{
integration: 'spotx',
...
}]
}

the {{SpotXAdDescription}} object provides the following properties:

MethodTypeOptionalDescription
integrationstringyesUse the value 'spotx' to use the SpotX ad integration. The SpotX integration uses Google IMA. To use Google IMA, it is required to load the SDK first. You can find the getting started of Google IMA sdk at: https://developers.google.com/interactive-media-ads/docs/sdks/html5/quickstart
idnumber or stringnoYour SpotX id
cacheBusterbooleanyesAdd the cb parameter with a random number to the SpotX tag.
maximumAdDurationnumber or stringyes
customSpotXDatayesSpotX custom data
appSpotXDatayesSpotX app data
deviceSpotXDatayesSpotX device data
userSpotXDatayesSpotX user data
sourcesstringyesSpotX ad tag (to directly set the SpotX source link)

Example:

player.source = {
sources: ...,
ads: [{
integration: 'spotx',
id: 123456,
cacheBuster: true,
app: {
bundle: 'com.exampleapps.example',
name: 'My CTV App'
},
device: {
ifa: '38400000-8cf0-11bd-b23e-10b96e40000d',
ua: 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/56.0.2924.75 Mobile/14E5239e Safari/602.1',
geo: {
lat: -24.378528,
lon: -128.325119
},
dnt: 1,
lmt: 1,
},
custom: {
category: ['category1', 'category2'],
somekey: 'somevalue'
},
user: {
yob: 1984,
gender: 'm'
}
}
]};

iOS/tvOS SDK

This API is currently not available on the iOS/tvOS SDK.

Android (TV) SDK

This API is currently not available on the Android (TV) SDK.