ExperimentalOptionaldestroyExperimental
Handler which will be called when the player is destroyed.
This allows the integration to clean up any resources, such as DOM elements or event listeners.
OptionalplayExperimental
Handler which will be called when the player starts playing the current source for the first time, before any content is shown.
This allows the integration to play pre-roll ads, or to initialize ad SDKs that require a user gesture.
To play a pre-roll, call ClientSideAdIntegrationController.startLinearAdBreak before
the returned promise resolves. The player waits for the returned promise, and then starts playing
the content unless linear ad playback was started. If the promise does not settle within a timeout and no linear ad break
was started, the player fires a non-blocking aderror event and starts playing the content.
aderror event
(as if by calling CustomAdIntegrationController.error) and starts playing the content.OptionalresetExperimental
Handler which will be called before a new source is loaded into the player, or before the player is destroyed.
This allows the integration to clean up any source-specific resources, such as scheduled ads or pending HTTP requests.
error event
(as if by calling CustomAdIntegrationController.fatalError).Experimental
Handler which will be called when an ad is scheduled for this integration, either through SourceDescription.ads (after any CustomAdIntegrationHandler.setSource handlers have transformed it) or through Ads.schedule.
The integration decides how and when to load ads from the given description, for example by watching CustomAdIntegrationController.content for the time offset of a mid-roll. Once loaded, it should report them using CustomAdIntegrationController.createAdBreak and CustomAdIntegrationController.createAd.
The description of the scheduled ad(s).
"start", "end", a percentage or a number of seconds.aderror event
(as if by calling CustomAdIntegrationController.error).OptionalsetExperimental
Handler which will be called when a new source is loaded into the player.
This allows the integration to transform the source description, e.g. by calling an external service to replace the content URL, or by adding a fixed pre-roll linear ad to the list of ads.
error event
(as if by calling CustomAdIntegrationController.fatalError).OptionalskipExperimental
Handler which will be called when an ad is requested to be skipped.
To skip the ad, the handler should call CustomAdIntegrationController.skipAd.
aderror event
(as if by calling CustomAdIntegrationController.error).
A handler for a custom client-side ad integration.
In a client-side ad integration, ads are separate from the content: the integration loads its ads from an AdDescription, and pauses the content to play a linear ad.
Use Ads.registerClientSideIntegration to register an integration with the player.
See
ClientSideAdIntegrationController