VideoAdContainer

VideoAdContainer

new VideoAdContainer(placeholder, videoElementopt)

This class provides everything necessary to contain and create a video ad within a given placeholder Element.

Parameters:
Name Type Attributes Default Description
placeholder HTMLDivElement

DIV that will contain the ad.

videoElement HTMLVideoElement <optional>
null

optional videoElement that will be used to play the ad.

Source:

Methods

(async) addScript(src, options)

Adds the passed script to the ad container.

Parameters:
Name Type Description
src string

script source uri.

options Object

Options map.

Properties
Name Type Description
type string

Defaults to 'text/javascript'.

async boolean

if "true" the "async" attribute is added to the new script. Defaults to false.

defer boolean

if "true" the "defer" attribute is added to the new script. Defaults to true.

Source:

destroy()

Destroys the VideoAdContainer.

Source:

isDestroyed() → {boolean}

Checks if the container is destroyed.

Source: