logo

THEOplayer > Ad

Ad interface

Represents a VAST creative. It is either a linear or non-linear ad.

Signature:

export interface Ad 

Properties

Property

Type

Description

adBreak

AdBreak

The ad break which the ad is part of.

clickThrough

string | undefined

The website of the advertisement.

companions

CompanionAd[]

List of companions which can be displayed outside the player.

duration (optional)

number

The duration of the ad, in seconds.

height

number | undefined

The height of the ad.

id

string | undefined

The identifier of the creative.

integration (optional)

string

The integration of the ad, represented by a value from the following list:
- 'theo'
- 'google-ima'
- 'google-dai'
- 'freewheel'

readyState (optional)

AdReadyState

The ready state of the ad.

resourceURI (optional)

string

The URI of the the ad content.

skipOffset

number | undefined

Offset after which the ad break may be skipped, in seconds.

type

string

The type of the ad, represented by a value from the following list:
- 'linear'
- 'nonlinear'

width

number | undefined

The width of the ad, in pixels.

Property Details

adBreak

The ad break which the ad is part of.

Signature:

adBreak: AdBreak;

Remarks


- Available for VAST-ads.

clickThrough

The website of the advertisement.

Signature:

clickThrough: string | undefined;

Remarks


- Available when the Ad.readyState is 'ready'.

companions

List of companions which can be displayed outside the player.

Signature:

companions: CompanionAd[];

Remarks


- Available when the Ad.readyState is 'ready'.
- Only supported for 'theo' and 'google-dai'.

duration

The duration of the ad, in seconds.

Signature:

duration?: number;

Remarks


- Available when the Ad.readyState is 'ready'.
- Only available for LinearAd.

height

The height of the ad.

Signature:

height: number | undefined;

Remarks


- Available when the Ad.readyState is 'ready'.

id

The identifier of the creative.

Signature:

id: string | undefined;

Remarks


- Available when the Ad.readyState is 'ready'.

integration

The integration of the ad, represented by a value from the following list:
- 'theo'
- 'google-ima'
- 'google-dai'
- 'freewheel'

Signature:

integration?: string;

readyState

The ready state of the ad.

Signature:

readyState?: AdReadyState;

resourceURI

The URI of the the ad content.

Signature:

resourceURI?: string;

Remarks


- Available when the Ad.readyState is 'ready'.

skipOffset

Offset after which the ad break may be skipped, in seconds.

Signature:

skipOffset: number | undefined;

Remarks


- Available when the Ad.readyState is 'ready'.
- If the offset is -1, the ad is unskippable.
- If the offset is 0, the ad is immediately skippable.
- Otherwise it must be a positive number indicating the offset.

type

The type of the ad, represented by a value from the following list:
- 'linear'
- 'nonlinear'

Signature:

type: string;

width

The width of the ad, in pixels.

Signature:

width: number | undefined;

Remarks


- Available when the Ad.readyState is 'ready'.

github
Make sure to follow us on GitHub!
THEO-logo-white
twitter
facebook
linkedin
Copyright © 2020. All Rights Reserved.
Leuven
New York
San Francisco
Singapore
Barcelona