ExperimentalReadonly ExperimentaladThe scheduled ad breaks managed by this integration.
Use createAdBreak and removeAdBreak to add or remove ad breaks.
Readonly ExperimentaladA DOM element for rendering ads, owned by this integration.
The element is absolutely positioned over the player's video area (position: absolute; inset: 0),
on top of the content video. It is initially empty and does not receive pointer events.
The integration may add child elements to render non-linear ads, or to play linear ads
with its own ad player (see LinearAdPlayback). It may style this element during
a linear ad break; the player resets its styles when the break ends or when a new source is set during an active break.
Readonly ExperimentaladsThe scheduled ads managed by this integration.
Readonly ExperimentalcontentThe content playback state and controls, independent of the active ad player.
Readonly ExperimentalcontentThe DOM element in which the content is rendered, owned by the player.
The element is positioned in the normal flow of the player's DOM (position: relative),
so it dictates the size of the player's video area. It always contains
contentVideoElement, if that is defined.
During a linear ad break, the integration may style this element to create custom ad layouts,
for example to scale the content down into a corner while an ad is shown in adContainer.
The player resets its styles when the break ends.
visibility: hidden during a linear ad break, except when the playback sets
LinearAdPlayback.usesContentVideoElement. It remains in the normal flow and dictates the size
of the player's video area.Readonly ExperimentalcontentThe video element in which the content is played.
On some platforms, a linear ad must be played in the same video element as the content, for example to keep native fullscreen playback on iOS. In that case, play the linear ad in this element (for example by passing it to a third-party ad SDK), and set LinearAdPlayback.usesContentVideoElement when starting linear ad playback.
undefined when the player can't let ad integrations reuse the content's video element
for linear ad playback, for example when the content is rendered into multiple media elements
or outside of the DOM.
Play linear ads in adContainer instead.Readonly ExperimentalintegrationThe identifier for this integration, as it was passed to Ads.registerServerSideIntegration or Ads.registerClientSideIntegration.
Readonly ExperimentallinearThe built-in linear ad player shared by all client-side ad integrations for this player.
Experimental
Begin the given ad.
Experimental
Create a new ad.
The initial properties to be set on the created ad.
OptionaladBreak: AdBreak
If given, appends the ad to the given existing AdBreak. Otherwise, appends the ad to a new or existing AdBreak with the configured AdInit.timeOffset.
Experimental
Create a new ad break.
This can be used to indicate where ad breaks can be expected in advance, before populating those ad breaks with ads.
The initial properties to be set on the created ad break.
Error If there is already an existing ad break with the given AdBreakInit.timeOffset.
Experimental
End the given ad.
Experimental
End the given ad break.
An ad break begins implicitly when the first of its ads is begun.
The ad break to be ended.
Experimental
End the linear ad break and resume the content.
Optionaloptions: EndLinearAdBreakOptions
Options for resuming the content.
Experimental
Fire a fatal error event on the player.
This stops playback immediately. Use ChromelessPlayer.source to load a new source.
The error.
Optionalcode: ErrorCode
The error code. By default, this is set to ErrorCode.AD_ERROR.
Experimental
Remove the given ad.
Experimental
Remove the given ad break and all of its ads.
The ad break to be removed.
Experimental
Remove all ads and ad breaks.
Experimental
Skip the given ad.
Experimental
Start a linear ad break.
The player pauses the content and hides it (unless the ad is played in the content video element or StartLinearAdBreakOptions.keepContentPlaying is set, see contentElement for how it is hidden), and reports ad playback through its own API by default. StartLinearAdBreakOptions.timeline can route time-related state to the content, while StartLinearAdBreakOptions.audio can route volume and mute state to the content.
Optionaloptions: StartLinearAdBreakOptions
Options for the linear ad break. If StartLinearAdBreakOptions.playback is omitted,
the integration can load an ad with linearAdPlayer.
Experimental
Update the given ad break.
The ad break to be updated.
The properties to be updated on the ad break.
Experimental
Update the playback progression of the given ad.
The ad to be updated.
The playback progress, as a number between 0 (at the start of the ad) and 1 (at the end of the ad).
Error If the ad is not started.
Experimental
Notify the player that the state of the LinearAdPlayback passed to startLinearAdBreak has changed.
The player reads the new state and fires the corresponding events, such as
timeupdate, durationchange,
pause, playing
or volumechange.
loadedmetadata, loadeddata,
canplay, canplaythrough
and readystatechange are derived from readyState changes;
waiting and playing also depend on whether playback is paused.
The controller for a custom client-side ad integration.
Besides the common CustomAdIntegrationController operations, it allows the integration to pause the content and play linear ads, either on its own or through the built-in player.
See
ClientSideAdIntegrationHandler