Advertising API

Advertising Callbacks

Callbacks

Callback Description
onBeforePlay(BeforePlayEvent beforePlayEvent) Fired just before the player begins playing.
onBeforeComplete(BeforeCompleteEvent beforeCompleteEvent) Fired just before the player completes playing.
onAdStarted(AdStartedEvent adStartedEvent) VPAID-only This API will trigger when a VPAID ad creative signals to our player that it is starting.
onAdClick(AdClickEvent adClickEvent) Fired whenever a user clicks an ad to be redirected to its landing page.
onAdSchedule(AdScheduleEvent adScheduleEvent) VAST only. Fires when the ad schedule is loaded and parsed by the plugin.
onAdCompanions(AdCompanionsEvent adCompanionsEvent) VAST and IMA. Fired whenever an ad contains companions.
onAdRequest(AdRequestEvent adRequestEvent) VAST only. Fired whenever an ad is requested by the player.
onAdImpression(AdImpressionEvent adImpressionEvent) Fired based on the IAB definition of an ad impression.
onAdComplete(AdCompleteEvent adCompleteEvent) Fired whenever an ad has completed playback.
onAdSkipped(AdSkippedEvent adSkippedEvent) Fired whenever an ad has been skipped.
onAdRequest(AdRequestEvent adRequestEvent) Fired whenever an ad is requested by the player.
onAdTime(AdTimeEvent adTimeEvent) Fired while ad playback is in progress.
onAdPause(AdPauseEvent adPauseEvent) Fired whenever an ad is paused.
onAdPlay(AdPlayEvent adPlayEvent) Fired whenever an ad starts playing or when an ad is unpaused.
onAdError(AdErrorEvent adErrorEvent) Fired whenever an error prevents the ad from playing. Supported for VAST and IMA.