Constructor
new InterstitialAdManager(adContainer, basePlayer, baseVideo, onEvent)
Parameters:
| Name | Type | Description | 
|---|---|---|
| adContainer | HTMLElement | |
| basePlayer | shaka.Player | |
| baseVideo | HTMLMediaElement | |
| onEvent | function | 
- Implements:
- Source:
Members
adEventManager_ :shaka.util.EventManager
Type:
adVideo_ :HTMLMediaElement
Type:
baseVideo_ :HTMLMediaElement
Type:
baseVideo_ :HTMLVideoElement
Type:
- HTMLVideoElement
baseVideo_ :HTMLVideoElement
Type:
- HTMLVideoElement
baseVideo_ :HTMLVideoElement
Type:
- HTMLVideoElement
config_ :shaka.extern.AdsConfiguration
Type:
eventManager_ :shaka.util.EventManager
Type:
interstitials_ :Set<shaka.extern.AdInterstitial>
Type:
lastPlayedAd_ :shaka.extern.AdInterstitial
Type:
onEvent_ :function(!shaka.util.FakeEvent)
Type:
- function(!shaka.util.FakeEvent)
playoutLimitTimer_ :shaka.util.Timer
Type:
pollTimer_ :shaka.util.Timer
Type:
preloadManagerInterstitials_ :Map<shaka.extern.AdInterstitial, Promise<?shaka.media.PreloadManager>>
Type:
- Map<shaka.extern.AdInterstitial, Promise<?shaka.media.PreloadManager>>
preloadOnDomElements_ :Map<shaka.extern.AdInterstitial, !Array<!HTMLLinkElement>>
Type:
- Map<shaka.extern.AdInterstitial, !Array<!HTMLLinkElement>>
timeUpdateTimer_ :shaka.util.Timer
Type:
Methods
addAdUrlInterstitial(url) → {Promise}
Parameters:
| Name | Type | Description | 
|---|---|---|
| url | string | 
Returns:
- Type
- Promise
addEventListeners_()
addInterstitials(interstitialsnon-null)
Parameters:
| Name | Type | Description | 
|---|---|---|
| interstitials | Array<shaka.extern.AdInterstitial> | 
checkForInterstitials_()
checkPreloadOnDomElements_(interstitialnon-null)
Parameters:
| Name | Type | Description | 
|---|---|---|
| interstitial | shaka.extern.AdInterstitial | 
configure(config)
    Called by the AdManager to provide an updated configuration any time it
changes.
    Parameters:
| Name | Type | Description | 
|---|---|---|
| config | shaka.extern.AdsConfiguration | 
cuepointsChanged_()
determineIfUsingBaseVideo_()
getCurrentInterstitial_(needPreRollopt, numberToSkipopt, nullable) → {shaka.extern.AdInterstitial}
Parameters:
| Name | Type | Attributes | Default | Description | 
|---|---|---|---|---|
| needPreRoll | boolean | <optional> | false | |
| numberToSkip | number | <optional> <nullable> | null | 
Returns:
getInterstitials() → {Array<shaka.extern.AdInterstitial>}
    Only for testing
Returns:
- Type
- Array<shaka.extern.AdInterstitial>
getInterstitialsInfo_(hlsMetadata) → {Promise<!Array<shaka.extern.AdInterstitial>>}
Parameters:
| Name | Type | Description | 
|---|---|---|
| hlsMetadata | shaka.extern.HLSMetadata | 
Returns:
- Type
- Promise<!Array<shaka.extern.AdInterstitial>>
getOverlaysInfo_(hlsMetadata) → {Array<shaka.extern.AdInterstitial>}
Parameters:
| Name | Type | Description | 
|---|---|---|
| hlsMetadata | shaka.extern.HLSMetadata | 
Returns:
- Type
- Array<shaka.extern.AdInterstitial>
isPreloadAllowed_(interstitialnon-null) → {boolean}
Parameters:
| Name | Type | Description | 
|---|---|---|
| interstitial | shaka.extern.AdInterstitial | 
Returns:
- Type
- boolean
isSmartTV_() → {boolean}
Returns:
- Type
- boolean
makeAdRequest_(url, contextopt) → {Promise<BufferSource>}
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| url | string | ||
| context | shaka.extern.RequestContext | <optional> | 
Returns:
- Type
- Promise<BufferSource>
onSeeked_()
onTimeUpdate_()
processTrackingEvent_(type)
Parameters:
| Name | Type | Description | 
|---|---|---|
| type | string | 
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> | 
removeEventListeners_()
removePreloadOnDomElements_(interstitialnon-null)
Parameters:
| Name | Type | Description | 
|---|---|---|
| interstitial | shaka.extern.AdInterstitial | 
sendEvent_(type, dictopt)
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| type | string | ||
| dict | Map<string, Object> | <optional> | 
sendTrackingEvent_(url)
Parameters:
| Name | Type | Description | 
|---|---|---|
| url | string | 
setBaseStyles_(interstitial)
Parameters:
| Name | Type | Description | 
|---|---|---|
| interstitial | shaka.extern.AdInterstitial | 
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 | 
setupStaticAd_(interstitial, sequenceLength, adPosition, oncePlayed)
Parameters:
| Name | Type | Description | 
|---|---|---|
| interstitial | shaka.extern.AdInterstitial | |
| sequenceLength | number | |
| adPosition | number | |
| oncePlayed | number | 
setupVideoAd_(interstitial, sequenceLength, adPosition, initialTime, oncePlayed)
Parameters:
| Name | Type | Description | 
|---|---|---|
| interstitial | shaka.extern.AdInterstitial | |
| sequenceLength | number | |
| adPosition | number | |
| initialTime | number | the clock time the ad started at | 
| oncePlayed | number | 
stop()
    Resets the Interstitial manager and removes any continuous polling.
updatePlayerConfig_()
Type Definitions
Asset
Type:
- {URI: string, DURATION: number, X-AD-CREATIVE-SIGNALING: ?shaka.extern.AdCreativeSignaling.CarriageEnvelope}
Properties:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| URI | string | ||
| DURATION | number | ||
| X-AD-CREATIVE-SIGNALING | shaka.extern.AdCreativeSignaling.CarriageEnvelope | <nullable> | 
AssetsList
Type:
- {ASSETS: !Array<shaka.ads.InterstitialAdManager.Asset>, SKIP-CONTROL: ?shaka.ads.InterstitialAdManager.SkipControl, X-AD-CREATIVE-SIGNALING: ?shaka.extern.AdCreativeSignaling.CarriageEnvelope}
Properties:
| Name | Type | Attributes | Description | 
|---|---|---|---|
| ASSETS | Array<shaka.ads.InterstitialAdManager.Asset> | ||
| SKIP-CONTROL | shaka.ads.InterstitialAdManager.SkipControl | <nullable> | |
| X-AD-CREATIVE-SIGNALING | shaka.extern.AdCreativeSignaling.CarriageEnvelope | <nullable> | 
SkipControl
Type:
- {OFFSET: number, DURATION: number}
Properties:
| Name | Type | Description | 
|---|---|---|
| OFFSET | number | |
| DURATION | number |