ExperimentalReadonly ExperimentalcurrentThe current linear-ad playback position, in seconds.
Readonly ExperimentaldurationThe duration of the loaded linear-ad source, in seconds.
Readonly ExperimentalelementThe shared DOM element used to play linear ads.
This element is a sibling of ClientSideAdIntegrationController.contentElement. During a linear ad break that does not use LinearAdPlayback.usesContentVideoElement, it replaces the hidden content element in the normal flow, or is shown over the content when StartLinearAdBreakOptions.keepContentPlaying is set.
The integration may style this element freely during a break, for example to show the ad next to the content.
Readonly ExperimentalendedWhether the loaded linear-ad source has ended.
Readonly ExperimentalerrorThe current linear-ad playback error, or undefined if there is no error.
ExperimentalmutedWhether the linear ad is muted.
Readonly ExperimentalpausedWhether the linear ad player is paused.
Readonly ExperimentalreadyThe ready state of the linear ad, using the same values as ChromelessPlayer.readyState.
Optional Readonly ExperimentalusesWhether this playback really renders the linear ad in ClientSideAdIntegrationController.contentVideoElement instead of ClientSideAdIntegrationController.adContainer.
Set this to true only when this playback plays the ad in the content video element,
so the player can hand over the element before the ad starts and restore the content afterwards.
The player reads this property once, when ClientSideAdIntegrationController.startLinearAdBreak is called.
false or omitted when ClientSideAdIntegrationController.contentVideoElement is undefined.false. A wrapper around it must also return false.Readonly ExperimentalvideoThe height of the linear-ad video, or 0 if unknown.
Readonly ExperimentalvideoThe width of the linear-ad video, or 0 if unknown.
ExperimentalvolumeThe linear-ad volume, between 0 and 1.
Experimental
Add the given listener for the given event type(s).
The type of the event.
The callback which is executed when the event occurs.
Experimental
Load and play a linear ad source through the built-in player.
The source may contain a single ad or a whole ad break with multiple ads.
If ad is given, the source contains only that ad and the player reports its lifecycle through
CustomAdIntegrationController.beginAd, CustomAdIntegrationController.updateAdProgress
and CustomAdIntegrationController.endAd, and updates Ad.duration if not yet known.
If ad is omitted, the integration must report the ads in the source itself, for example based on
timed metadata and CustomAdIntegrationController.content.
If a third-party playback delegate is active for the break, this method still loads and plays the source through the built-in player, but the player's API continues to report the active delegate's state.
The media to play, e.g. an MP4 or HLS file.
Optionalad: Ad
The single ad in the source, if any. It must be created through
CustomAdIntegrationController.createAd with type 'linear'.
A promise that resolves when the source has ended or playback was stopped,
or rejects if the source could not be played. In the latter case, the player also fires an
aderror event.
ad can only be supplied during a break.ad is given, playback is also stopped when Ads.skip is called (unless overridden by
ClientSideAdIntegrationHandler.skipAd) or when the integration calls
CustomAdIntegrationController.skipAd, CustomAdIntegrationController.endAd
or CustomAdIntegrationController.removeAd for that ad.Experimental
Pause playback of the linear ad.
Called by ChromelessPlayer.pause during linear ad playback.
Experimental
Resume playback of the linear ad.
Called by ChromelessPlayer.play during linear ad playback.
Experimental
Preload a linear ad source through the built-in player.
The built-in player starts loading the source in the background, while the content keeps playing. A later call to load with exactly the same source starts faster.
The media to preload, e.g. an MP4 or HLS file.
A promise that resolves when enough of the source is loaded to start playback,
or rejects if the source could not be preloaded. In the latter case, no aderror event is fired.
Experimental
Remove the given listener for the given event type(s).
The type of the event.
The callback which will be removed.
Experimental
Stop the source currently playing through the built-in player.
The built-in player stops and unloads the source started with load, and the promise returned by that call resolves. A linear ad break stays active, so the integration can load another source or end the break.
Use this to skip an ad in ClientSideAdIntegrationHandler.skipAd, or to exit an ad early.
The built-in linear ad player shared by client-side ad integrations for one player.
It can be used during or outside a linear ad break. Its playback state is reported through the player's API only when it is used directly, or through a forwarding wrapper, as the break's StartLinearAdBreakOptions.playback.