Constructor
new InterstitialAdSession(videonon-null, interstitialnon-null, adnon-null, onEvent, contentPosition)
Parameters:
| Name | Type | Description |
|---|---|---|
video |
HTMLMediaElement | |
interstitial |
shaka.extern.AdInterstitial | |
ad |
shaka.ads.InterstitialAd | |
onEvent |
function | |
contentPosition |
function |
- Implements:
- Source:
Interfaces
Members
ad_ :shaka.ads.InterstitialAd
Type:
contentPosition_ :function(): number
Type:
- function(): number
eventManager_ :shaka.util.EventManager
Type:
interstitial_ :shaka.extern.AdInterstitial
Type:
onEvent_ :function(string)
Type:
- function(string)
playedRanges_ :Array<{start: number, end: number}>
Type:
- Array<{start: number, end: number}>
tracker_ :shaka.ads.InterstitialAdSession.Tracker
Type:
Methods
canComplete() → {boolean}
Returns:
- Type
- boolean
expandUri(uri) → {string}
Expands known VAST macros and uses the VAST unavailable value for context
the player cannot supply. Apps may still add context via request filters.
Parameters:
| Name | Type | Description |
|---|---|---|
uri |
string |
Returns:
- Type
- string
getEventManager() → {shaka.util.EventManager}
Returns:
getPosition() → {number}
The playhead position relative to the start of the interstitial.
Returns:
- Type
- number
hasSeeked() → {boolean}
Whether the user seeked during the interstitial. Browsers fire
timeupdate before seeked, so the seeked event alone is not enough to tell
a skip from the natural end of the interstitial.
Returns:
- Type
- boolean
notify(type)
Forwards an ad event to the tracker. Events describing playback are only
forwarded once playback has actually started.
Parameters:
| Name | Type | Description |
|---|---|---|
type |
string |
refresh()
Delivers data that became valid while it was being resolved, without
replaying events that were already delivered.
release()
Request that this object release all internal references.
- Implements:
- Source:
setTracker(trackernullable)
Attaches the format specific tracker, if any, and resolves its deferred
data. Data that becomes available later is delivered without replaying
events that were already sent.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
tracker |
shaka.ads.InterstitialAdSession.Tracker |
<nullable> |
update()
Advances measurement only over media played at normal speed. Quartiles
and offset events crossed by seeks or fast playback are not backfilled.
Type Definitions
TrackerFactory
Creates the tracker of an interstitial, or null if it has nothing to track.
It is given a function that sends a tracking beacon, expanding its macros,
and a function that fetches a resource.
Type:
- function(!shaka.extern.AdInterstitial, !shaka.ads.InterstitialAdSession, function(string), function(string): !shaka.net.NetworkingEngine.PendingRequest): ?shaka.ads.InterstitialAdSession.Tracker