Interface SpotXAdDescription

Describes a SpotX ad break request.

Remarks


- Available since v2.13.0.

Example

{
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'
}
}
interface SpotXAdDescription {
    app?: SpotxData;
    cacheBuster?: boolean;
    contentPageUrl?: string;
    custom?: SpotxData;
    device?: SpotxData;
    id: string | number;
    integration: "spotx";
    ipAddress?: string;
    maximumAdDuration?: string | number;
    queryParameters?: SpotxQueryParameter;
    replaceContent?: boolean;
    sources?: string;
    timeOffset?: string | number;
    user?: SpotxData;
}

Hierarchy (view full)

Properties

app?: SpotxData

Application specific SpotX data.

Deprecated

Superseded by queryParameters.app.

cacheBuster?: boolean

Whether the ad break request should contain a cache buster.

Remarks


- A cache buster adds a query parameter 'cb' with a random value to circumvent browser caching mechanisms.

contentPageUrl?: string

The URL of the content page.

custom?: SpotxData

Custom SpotX data.

Deprecated

Superseded by queryParameters.custom.

device?: SpotxData

Device specific SpotX data.

Deprecated

Superseded by queryParameters.device.

id: string | number

The identifier of the ad break requested from SpotX.

integration: "spotx"

The integration of the ad break.

ipAddress?: string

The IP address of the viewer.

maximumAdDuration?: string | number

The maximum duration of the ad, in seconds.

Default Value

No maximum duration.

queryParameters?: SpotxQueryParameter

A record of query string parameters added to the SpotX ad break request. Each entry contains the parameter name with associated value.

Remarks


- Available since v2.38.0.

replaceContent?: boolean

Whether the ad replaces playback of the content.

Remarks


- When the ad ends, the content will resume at the ad break's offset plus its duration.

Default Value


- true for live content,
- false for VOD content.

sources?: string

A source URL which contains the location of ad resources to be scheduled.

Remarks


- This will override the generated URL.

timeOffset?: string | number

Offset after which the ad break will start.

Possible formats:
- A number for the offset in seconds.
- 'start' for a preroll.
- 'end' for a postroll.
- 'HH:MM:SS.mmm' for a timestamp in the playback window.
- A percentage string (XX%) for a proportion of the content duration.

Remarks


- A timestamp which is not in the playback window will result in the ad break not being started.
- Do NOT set for VMAP ads. VMAP resources will ignore this value as they contain an internal offset. https://www.theoplayer.com/docs/theoplayer/how-to-guides/ads/how-to-set-up-vast-and-vmap/#vmap
- Since 2.18, numbers are supported for the Google IMA integration, since 2.21 other formats as well.

Default Value

'start'

user?: SpotxData

User specific SpotX data.

Deprecated

Superseded by queryParameters.user.