Creates a VpaidAdUnit.
The VastChain with all the VastResponse
container instance to place the ad
Options Map
Optional
creativeReference to the Vpaid Creative ad unit. Will be null before the ad unit starts.
Optional
errorIf an error occurs it will contain the reference to the error otherwise it will be bull
Optional
errorIf an error occurs it will contain the Vast Error code of the error
Ad unit type. Will be VPAID
for VpaidAdUnit
Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.
The name of the event.
Rest
...args: any[]Returns true if the event had listeners, false otherwise.
Adds the listener function to the end of the listeners array for the event named eventName.
The name of the event.
Listener fn that handles the evt.
The Emitter instance.
Register a callback function that will be called whenever the ad finishes. No matter if it was finished because de ad ended, or cancelled or there was an error playing the ad.
will be called once the ad unit finished
if ad unit is finished.
Adds a one time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.
The name of the event.
Listener fn that handles the evt.
The Emitter instance.
Removes all listeners, or those of the specified eventName.
The name of the event. Optional if omitted all listeners will be removed.
The Emitter instance.
Removes the specified listener from the listener array for the event named eventName.
The name of the event.
Listener fn that handles the evt.
The Emitter instance.
This method resizes the ad unit to fit the available space in the passed VideoAdContainer
Promise that resolves once the unit was resized
if ad unit is not started.
if ad unit is finished.
Generated using TypeDoc
This class provides everything necessary to run a Vpaid ad.