Class: shaka.ads.InterstitialAdManager

Constructor

new InterstitialAdManager(adContainer, player, onEvent, configurePlayeropt, createTrackeropt, signalingopt, nullable)

Parameters:
Name Type Attributes Default Description
adContainer HTMLElement
player shaka.Player
onEvent function
configurePlayer function <optional>
Configures the player of an interstitial.
createTracker shaka.ads.InterstitialAdSession.TrackerFactory <optional>
Creates the format specific tracker of an interstitial.
signaling shaka.ads.InterstitialAdManager.PresentationSignaling_ <optional>
<nullable>
null Reads the format specific signaling of the ads carried in the presentation of an interstitial.
Implements:
Source:

Members

PLAYOUT_LIMIT_TOLERANCE_ :number

Margin, in seconds, within which the playout limit of an ad is considered reached when its media ends. Playback is measured from timeupdate events, which stop slightly before the end of the media.
Type:
  • number
Source:

RANGE_TOLERANCE_ :number

Margin, in seconds, within which a part of a presentation is too short to be an ad of its own.
Type:
  • number
Source:

adContainer_ :HTMLElement

Type:
  • HTMLElement
Source:

adContainer_ :HTMLElement

Type:
  • HTMLElement
Source:

baseVideo_ :HTMLElement

Type:
  • HTMLElement
Source:

baseVideo_ :HTMLVideoElement

Type:
  • HTMLVideoElement
Source:

baseVideo_ :HTMLVideoElement

Type:
  • HTMLVideoElement
Source:

concurrentPresentation_ :shaka.ads.InterstitialConcurrentPresentation

The non-linear interstitial being presented with the primary content, if any.
Type:
Source:

deferredInterstitials_ :Set<shaka.extern.DeferredInterstitial>

Interstitial resources whose resolution has been deferred until playback approaches them. This avoids resolving every ad decision at parse time, which would otherwise create a burst of concurrent requests. See https://github.com/shaka-project/shaka-player/issues/10191
Type:
Source:

embeddedClickTarget_ :HTMLElement

Receives clicks on the current embedded slot, which has no element of its own in the ad container.
Type:
  • HTMLElement
Source:

embeddedGroup_ :string

Type:
  • string
Source:

executions_ :Map<string, {count: number, delta: number}>

The executions of each interstitial with an id: how many times it started playing and how late its last execution started, for the player state parameters of the requests of DASH alternative MPD events (ISO/IEC 23009-1 Annex I.4).
Type:
  • Map<string, {count: number, delta: number}>
Source:

generation_ :number

Type:
  • number
Source:

hasEmbeddedInterstitials_ :boolean

Type:
  • boolean
Source:

interstitialIds_ :Set<string>

Type:
  • Set<string>
Source:

isEnded_ :boolean

Type:
  • boolean
Source:

lastAdCompleteTime_ :number

Wall-clock time (ms) when the last SGAI interstitial ad break finished playing. Used to enforce the interstitialCooldown config.
Type:
  • number
Source:

lastOnPlayoutLimit_ :?function()

Type:
  • ?function()
Source:

lastTime_ :number

Type:
  • number
Source:

layoutRenderer_ :shaka.ads.LayoutRenderer

Places the primary video and the assets of the interstitial being presented.
Type:
Source:

media_ :shaka.ads.InterstitialMediaAsset

The media asset of the interstitials played as video.
Type:
Source:

onEvent_ :function(!shaka.util.FakeEvent)

Type:
  • function(!shaka.util.FakeEvent)
Source:

playingAd_ :boolean

Type:
  • boolean
Source:

playout_ :shaka.ads.InterstitialAdManager.Playout_

Playout of the interstitial being played. Only media actually played counts, so loading or rebuffering its assets does not consume its playout limit.
Type:
Source:

preloadOffsets_ :Map<string, number>

Preload hints (e.g. HLS "com.apple.hls.preload" Date Ranges, RFC 8216bis Appendix F): maps the target ID to the time at which its resources may start being resolved.
Type:
  • Map<string, number>
Source:

preloadOnDomElements_ :Map<shaka.extern.AdInterstitial, !Array<!HTMLLinkElement>>

Type:
Source:

releaseStreaming_ :?function(number)

While playback starts in an ad break, the streaming of the content is held, and this releases it with the position to start at.
Type:
  • ?function(number)
Source:

sortedInterstitials_ :Array<shaka.extern.AdInterstitial>

Cache of interstitials_ sorted by descending start time, invalidated (set to null) whenever interstitials_ changes. Avoids re-sorting on every getCurrentInterstitial_ call (which runs per frame).
Type:
Source:

usingBaseVideo_ :boolean

Type:
  • boolean
Source:

usingListeners_ :boolean

Type:
  • boolean
Source:

videoCallbackId_ :number

Type:
  • number
Source:

Methods

clipPresented_(interstitialnon-null, presentednon-null, range) → {Array<!shaka.ads.InterstitialAdManager.PresentedAd>}

Clips the ads an interstitial is presented as to the part of its media that is played, numbering them within it.
Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
presented Array<!shaka.ads.InterstitialAdManager.PresentedAd>
range {start: number, end: number}
Source:
Returns:
Type
Array<!shaka.ads.InterstitialAdManager.PresentedAd>

getPlayableDuration_(interstitialnon-null) → {number}

How much of the media of an interstitial is played from its start, as limited when its media is loaded.
Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
Source:
Returns:
Type
number

getReturnPosition_(interstitial, startPosition, elapsed) → {number}

Where the content returns to after a linear interstitial that started at the given position of the content and played for the given time: the resume offset after it, the end of the range it replaces when it is clipped to it, and otherwise where the content would be now.
Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
startPosition number
elapsed number
Source:
Returns:
Type
number

present_(interstitialnon-null, signalednon-null, duration) → {Array<!shaka.ads.InterstitialAdManager.PresentedAd>}

The ads an interstitial is presented as, given the ads signaled in its presentation. An ad that covers the whole presentation describes the interstitial itself. Otherwise each of them, and each part of the presentation outside them, is presented as an ad of its own, identified like the assets of an HLS asset list: grouped under the interstitial, with an id of its own. The ads are clipped to the part of the presentation that is played: the range of the interstitial on the primary timeline, when clipped, and its playout limit.
Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
signaled Array<!shaka.ads.InterstitialAdManager.PresentedAd> The signaled ads, with their ranges in the presentation.
duration number The duration of the presentation, or Infinity if it is not known.
Source:
Returns:
Type
Array<!shaka.ads.InterstitialAdManager.PresentedAd>

addAdUrlInterstitial(url) → {Promise}

Parameters:
Name Type Description
url string
Source:
Returns:
Type
Promise

addDeferredInterstitial(descriptornon-null) → {Promise}

Registers a resource whose resolution is controlled by the common scheduler. The resolver owns the resource's format and request details.
Parameters:
Name Type Description
descriptor shaka.extern.DeferredInterstitial
Source:
Returns:
Type
Promise

addEventListeners_()

Source:

addInterstitials(interstitialsnon-null)

Parameters:
Name Type Description
interstitials Array<shaka.extern.AdInterstitial>
Source:

addPreloadHint(targetId, startTime)

Advises that the resources of the interstitial (or deferred resource) with the given ID may be resolved from the given time on. It is translated into a resolutionTimeOffset, computed as the gap between the target's start time and the hint's start time.
Parameters:
Name Type Description
targetId string
startTime number
Source:

applyPreloadOffset_(item)

Sets resolutionTimeOffset from a matching preload hint, if any.
Parameters:
Name Type Description
item {id: ?string, groupId: (?string|undefined), startTime: number, resolutionTimeOffset: (number|undefined)}
Source:

applyUpdatedPlayoutLimit_(interstitialnon-null, playoutLimit)

Applies a newly introduced playout limit to an interstitial. If the interstitial is currently playing as a video ad, the playout-limit timer is re-armed so the running ad is truncated.
Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
playoutLimit number
Source:

canPresent_(interstitial) → {boolean}

Whether the interstitial can be presented with the current capabilities.
Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
Source:
Returns:
Type
boolean

checkForInterstitials_()

Source:

checkPreloadOnDomElements_(interstitialnon-null)

Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
Source:

checkStartInterstitials_()

Before playback starts, loads the interstitials of the ad break where it is going to start, once that is known.
Source:

configure(config)

Called by the AdManager to provide an updated configuration any time it changes.
Parameters:
Name Type Description
config shaka.extern.AdsConfiguration
Source:

createPreloadTask_(interstitialnon-null) → {shaka.ads.InterstitialPreloadTask}

Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
Source:
Returns:
Type
shaka.ads.InterstitialPreloadTask

createSession_(interstitialnon-null, adnon-null, videonon-null, onEvent) → {shaka.ads.InterstitialAdSession}

Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
ad shaka.ads.InterstitialAd
video HTMLMediaElement
onEvent function(string)
Source:
Returns:
Type
shaka.ads.InterstitialAdSession

cuepointsChanged_()

Source:

determineIfUsingBaseVideo_(forceopt)

Sets usingBaseVideo_ to true if the ad can be played with the base video. Then, it either creates or destroys the media element of the media asset, as appropriate.
Parameters:
Name Type Attributes Default Description
force boolean <optional>
false If true, re-create the media element of the media asset if it is appropriate for playback.
Source:

endConcurrentAd_(interstitial, sequenceLength, adPosition, oncePlayed, timeOffset)

Moves on to the next interstitial of the ad break when a concurrent presentation has ended, or ends the ad break.
Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
sequenceLength number
adPosition number
oncePlayed number
timeOffset number
Source:

getCapabilities_() → {shaka.ads.InterstitialAdManager.Capabilities_}

What the device can present together with the primary content.
Source:
Returns:
Type
shaka.ads.InterstitialAdManager.Capabilities_

getCurrentInterstitial_(needPreRollopt, numberToSkipopt, nullable) → {shaka.extern.AdInterstitial}

Parameters:
Name Type Attributes Default Description
needPreRoll boolean <optional>
false
numberToSkip number <optional>
<nullable>
null
Source:
Returns:
Type
shaka.extern.AdInterstitial

getExecutionDelta_(interstitial) → {number}

How late the execution of an interstitial starts if it starts now: the time elapsed since its start (execution-delta, ISO/IEC 23009-1:2026, 5.16.2.2.6 and Annex I.4), 0 before its start and for pre-rolls and post-rolls.
Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
Source:
Returns:
Type
number

getInterstitials() → {Array<shaka.extern.AdInterstitial>}

Only for testing
Source:
Returns:
Type
Array<shaka.extern.AdInterstitial>

getJoin_(interstitial, adPosition) → {{startTime: ?number, consumed: number}}

Where playback of the interstitial starts when it begins at the given position of its sequence, and how much of its playout limit is already consumed. Joining in the middle of an interstitial starts at the offset of the join point unless startWithOffset is false, and consumes the time elapsed since its start unless clip is false (ISO/IEC 23009-1:2026, 5.16.2.2.6).
Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
adPosition number
Source:
Returns:
Type
{startTime: ?number, consumed: number}

getPlayedRange_(interstitialnon-null, adPosition) → {{start: number, end: number}}

The range of the media of an interstitial that is played if it starts now. Without clipping, the interstitial is not bound to its range on the primary timeline. A clipped one ends with that range, so when it is joined late only what is left of the range, or of its playout limit, is played, from the start of the media or from the join position (ISO/IEC 23009-1:2026, 5.16.2.2.6).
Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
adPosition number
Source:
Returns:
Type
{start: number, end: number}

getPlayer() → {shaka.Player}

Source:
Returns:
Type
shaka.Player

getPosition_() → {number}

The position of the primary content. Before its first time update, it is where playback is going to start: the live edge for live content, and the start of the seek range otherwise. Null when that is not known yet, because the presentation is still loading.
Source:
Returns:
Type
number

getRequestUri_(interstitial) → {string}

The URI to request an interstitial with. Its URL parameters are built again with the current player state (ISO/IEC 23009-1 Annex I.4), since the URI of the interstitial carries the values of an unknown state.
Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
Source:
Returns:
Type
string

getSortedInterstitials_() → {Array<shaka.extern.AdInterstitial>}

Returns interstitials_ sorted by descending start time, using a cache that is invalidated whenever interstitials_ changes.
Source:
Returns:
Type
Array<shaka.extern.AdInterstitial>

getStartInterstitial_() → {shaka.extern.AdInterstitial}

The linear interstitial played first when playback starts where it is going to start, if any.
Source:
Returns:
Type
shaka.extern.AdInterstitial

getTimeOffset_(interstitial) → {number}

The AD_BREAK_STARTED/ENDED time offset for an interstitial: 0 for pre-roll, -1 for post-roll, otherwise its start time.
Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
Source:
Returns:
Type
number

getUrlParamState_(interstitial, name, key) → {string}

The value of a player state parameter (ISO/IEC 23009-1 Annex I.4) in a request for the given interstitial, or null when it is not known. The key is the id of the event the parameter refers to, which is not necessarily the interstitial being requested.
Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
name string
key string
Source:
Returns:
Type
string

interstitialId_(interstitial) → {string}

Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
Source:
Returns:
Type
string

isInCooldown_() → {boolean}

Returns true if we are within the interstitialCooldown window that starts after an SGAI interstitial ad break finishes playing. While active, any snapback or next ad break should be skipped.
Source:
Returns:
Type
boolean

isPreloadAllowed_(interstitialnon-null) → {boolean}

Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
Source:
Returns:
Type
boolean

isSmartTV_() → {boolean}

Source:
Returns:
Type
boolean

isWithinPreloadWindow_(interstitialnon-null) → {boolean}

Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
Source:
Returns:
Type
boolean

makeAdRequest_(url, contextopt) → {shaka.net.NetworkingEngine.PendingRequest}

Parameters:
Name Type Attributes Description
url string
context shaka.extern.RequestContext <optional>
Source:
Returns:
Type
shaka.net.NetworkingEngine.PendingRequest

maxJoinDelay_(interstitial) → {number}

How long after the start of an interstitial playback can still start it: until its end when starting in the middle of interstitials is allowed, without limit when it cannot be jumped over, and otherwise 1 second.
Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
Source:
Returns:
Type
number

onTimeUpdate_()

Source:

playMediaAd_(interstitial, presentednon-null, sequenceLength, adPosition, startTime, hooks) → {Promise}

Plays the media of an interstitial in the media asset: loads it, announces and tracks its ads, and counts its playout. What depends on how the interstitial is presented with the primary content is left to the hooks.
Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
presented Array<!shaka.ads.InterstitialAdManager.PresentedAd> The ads presented in the media.
sequenceLength number
adPosition number
startTime number the clock time the interstitial started at
hooks shaka.ads.InterstitialAdManager.MediaAdHooks_
Source:
Returns:
Type
Promise

preloadIfWithinWindow_(interstitialnon-null)

Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
Source:

readPresentedAds_(interstitial, adPosition) → {Promise<?Array<!shaka.ads.InterstitialAdManager.PresentedAd>>}

Reads the ads that the signaling in the presentation of the interstitial describes, limited to the part of the media played from this join.
Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
adPosition number
Source:
Returns:
The ads, or null if the ad break was stopped in the meantime.
Type
Promise<?Array<!shaka.ads.InterstitialAdManager.PresentedAd>>

readsPresentation_(interstitialnon-null) → {boolean}

Whether the ads of the interstitial are signaled in its presentation, which is then parsed before they are announced. Only presentations with a manifest can be parsed in advance.
Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
Source:
Returns:
Type
boolean

release()

Request that this object release all internal references.
Implements:
Source:

removeBaseStyles_(interstitialopt, nullable)

Parameters:
Name Type Attributes Description
interstitial shaka.extern.AdInterstitial <optional>
<nullable>
Source:

removeEventListeners_()

Source:

removeInterstitial_(interstitial)

Removes an interstitial and releases any resources associated with it (preload tasks, preload-on-DOM link elements and bookkeeping sets).
Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
Source:

removePreloadOnDomElements_(interstitialnon-null)

Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
Source:

removeResolvedGroup_(groupIdnullable)

Removes the interstitials previously resolved from the resource with the given group id, so the resource can be resolved again.
Parameters:
Name Type Attributes Description
groupId string <nullable>
Source:

resetResourcesOnSeek_(currentTime)

On a seek into a live break, an already-resolved resource must be re-requested with an updated playback offset that reflects the new playhead position. Reset the cache of any resolved resource whose range now contains the playhead so the poll resolves it again.
Parameters:
Name Type Description
currentTime number
Source:

resolutionAheadTime_(item) → {number}

The look-ahead time (in seconds) used to decide how early an interstitial is resolved/preloaded: the per-interstitial resolutionTimeOffset (DASH earliestResolutionTimeOffset / HLS preload Date Range) when set, otherwise the configured default.
Parameters:
Name Type Description
item {resolutionTimeOffset: (number|undefined)}
Source:
Returns:
Type
number

resolveDeferredInterstitial_(descriptor)

Resolves a deferred resource descriptor and adds the resulting interstitials. Invoked from the poll timer; not awaited.
Parameters:
Name Type Description
descriptor shaka.extern.DeferredInterstitial
Source:

resolveInterstitialResource_(descriptornon-null) → {Promise<!Array<shaka.extern.AdInterstitial>>}

Parameters:
Name Type Description
descriptor shaka.extern.DeferredInterstitial
Source:
Returns:
Type
Promise<!Array<shaka.extern.AdInterstitial>>

retainResolvedResource_(descriptor)

After an resource resolves, either retain its descriptor (so a later seek back into a live break can re-request it with an updated playback offset) or drop it. Retaining is only useful for live streams that allow starting in the middle of an interstitial.
Parameters:
Name Type Description
descriptor shaka.extern.DeferredInterstitial
Source:

sendBeacon_(uri)

Parameters:
Name Type Description
uri string
Source:

sendEvent_(type, dictopt)

Parameters:
Name Type Attributes Description
type string
dict Map<string, ?> <optional>
Source:

sendEventForAd_(interstitialnon-null, type, dictopt)

Parameters:
Name Type Attributes Description
interstitial shaka.extern.AdInterstitial
type string
dict Map<string, ?> <optional>
Source:

setBaseStyles_(interstitial)

Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
Source:

setupAd_(interstitial, sequenceLength, adPosition, initialTime, oncePlayedopt)

Parameters:
Name Type Attributes Default Description
interstitial shaka.extern.AdInterstitial
sequenceLength number
adPosition number
initialTime number the clock time the ad started at
oncePlayed number <optional>
0
Source:

setupConcurrentAssetAd_(interstitial, sequenceLength, adPosition, oncePlayed)

Presents the image or the HTML document of a non-linear interstitial.
Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
sequenceLength number
adPosition number
oncePlayed number
Source:

setupConcurrentMediaAd_(interstitial, sequenceLength, adPosition, oncePlayed) → {Promise}

Plays the media of a non-linear interstitial in a media element of its own, over the primary content, which keeps playing.
Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
sequenceLength number
adPosition number
oncePlayed number
Source:
Returns:
Type
Promise

setupLinearAd_(interstitial, sequenceLength, adPosition, initialTime, oncePlayed) → {Promise}

Plays a linear interstitial, which replaces the primary content.
Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
sequenceLength number
adPosition number
initialTime number the clock time the ad started at
oncePlayed number
Source:
Returns:
Type
Promise

shouldResolveResourceNow_(descriptor) → {boolean}

Whether the given resource should be resolved immediately rather than deferred until playback approaches it.
Parameters:
Name Type Description
descriptor shaka.extern.DeferredInterstitial
Source:
Returns:
Type
boolean

shouldRetainResource_() → {boolean}

Whether resolved resources should be retained so they can be re-requested after a seek. Only meaningful for live streams that allow starting in the middle of an interstitial, where the playback offset would differ.
Source:
Returns:
Type
boolean

showMedia_(current, interstitial)

Shows the media element of the media asset where the interstitial is presented.
Parameters:
Name Type Description
current shaka.extern.AdInterstitial The ad being presented.
interstitial shaka.extern.AdInterstitial
Source:

startAdBreak_(interstitial, timeOffset)

Starts an ad break if none is being played.
Parameters:
Name Type Description
interstitial shaka.extern.AdInterstitial
timeOffset number
Source:

startInAdBreak_()

When playback is going to start in an ad break that replaces the content (e.g. a pre-roll, or a live stream joined during an ad break), the content is not streamed until the ad break ends, so that what the ad break replaces is neither fetched nor shown. The ad break starts as soon as playback does.
Source:

stop()

Resets the Interstitial manager and removes any continuous polling.
Source:

stopEmbeddedInterstitial_(typenullable)

Ends the current embedded slot.
Parameters:
Name Type Attributes Description
type string <nullable>
The event that explains the end, if any.
Source:

updateEmbeddedInterstitial_(seekedopt)

Updates embedded slots independently of the insertion scheduler. Loading or seeking into a slot activates its half-open interval immediately; insertion cooldown and snapback policies do not apply to existing media.
Parameters:
Name Type Attributes Default Description
seeked boolean <optional>
false
Source:

updateInterstitial(id, playoutLimit)

Applies a newly supplied playout limit to a scheduled ad or resource. Existing limits remain unchanged.
Parameters:
Name Type Description
id string
playoutLimit number
Source:

Type Definitions

Capabilities_

Type:
  • {concurrentVideo: number, concurrentImage: boolean}
Properties:
Name Type Description
concurrentVideo number The number of videos that can be decoded and composed at the same time, the primary content included.
concurrentImage boolean Whether an image or an HTML document can be composed over the video.
Source:

MediaAdHooks_

Type:
Properties:
Name Type Attributes Description
prepare function Called with the ad being presented before the media is loaded, to make room for it.
start function Called once the media is loaded, to start playing it. It is given the function that skips the media.
stop function Called with the ad being presented, whether it was skipped and whether it failed to load with a bad HTTP status, once the media has ended.
onAdEvent function <nullable>
Called before each event tracked for the ad being presented.
onTimeUpdate function <nullable>
Called as the media plays.
Source:

Playout_

Type:
  • {id: ?string, limit: number, played: number}
Properties:
Name Type Attributes Description
id string <nullable>
The interstitial, or group of interstitials, the playout belongs to.
limit number The playout limit, in seconds, or Infinity.
played number The media played so far, in seconds.
Source:

PresentationSignaling_

Reads the signaling of the ads carried in the presentation of an interstitial, such as SVTA2053 in a DASH list MPD or in an HLS asset playlist, or the Periods of a DASH list MPD.
Type:
Properties:
Name Type Description
accepts function Whether the ads of the interstitial may be signaled in its presentation.
parse function Returns the ads signaled by the timeline regions and the manifest of the presentation, each one a copy of the interstitial that describes it.
Source:

PresentedAd

An ad that an interstitial is presented as, with its range in the presentation of the interstitial.
Type:
Properties:
Name Type Attributes Description
interstitial shaka.extern.AdInterstitial The ad. It is the interstitial, or a copy of it that describes a part of its presentation.
start number The start of the ad in the presentation, in seconds.
end number <nullable>
The end of the ad in the presentation, in seconds, or null if the ad runs to the end of the presentation.
Source: