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:
eventManager_ :shaka.util.EventManager
Type:
interstitialIds_ :Set.<string>
Type:
- Set.<string>
interstitials_ :Set.<shaka.ads.InterstitialAdManager.Interstitial>
Type:
onEvent_ :function(!shaka.util.FakeEvent)
Type:
- function(!shaka.util.FakeEvent)
pollTimer_ :shaka.util.Timer
Type:
preloadManagerInterstitials_ :Map.<shaka.ads.InterstitialAdManager.Interstitial, Promise.<?shaka.media.PreloadManager>>
Type:
- Map.<shaka.ads.InterstitialAdManager.Interstitial, Promise.<?shaka.media.PreloadManager>>
Methods
configure(config)
Called by the AdManager to provide an updated configuration any time it
changes.
Parameters:
Name | Type | Description |
---|---|---|
config |
shaka.extern.AdsConfiguration |
cuepointsChanged_()
getCurrentInterstitial_(needPreRoll, numberToSkipopt) → {shaka.ads.InterstitialAdManager.Interstitial}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
needPreRoll |
boolean | |||
numberToSkip |
number |
<optional> |
0 |
Returns:
getInterstitialsInfo_(interstitial) → {Promise.<!Array.<shaka.ads.InterstitialAdManager.Interstitial>>}
Parameters:
Name | Type | Description |
---|---|---|
interstitial |
shaka.extern.Interstitial |
Returns:
- Type
- Promise.<!Array.<shaka.ads.InterstitialAdManager.Interstitial>>
release()
Request that this object release all internal references.
- Implements:
- Source:
setupAd_(interstitial, sequenceLength, adPosition, initialTime, oncePlayedopt)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
interstitial |
shaka.ads.InterstitialAdManager.Interstitial | |||
sequenceLength |
number | |||
adPosition |
number | |||
initialTime |
number | the clock time the ad started at | ||
oncePlayed |
number |
<optional> |
0 |
stop()
Resets the Interstitial manager and removes any continuous polling.
updatePlayerConfig_()
Type Definitions
Asset
Type:
- {URI: string}
Properties:
Name | Type | Description |
---|---|---|
URI |
string |
AssetsList
Type:
- {ASSETS: !Array.<shaka.ads.InterstitialAdManager.Asset>}
Properties:
Name | Type | Description |
---|---|---|
ASSETS |
Array.<shaka.ads.InterstitialAdManager.Asset> |
Interstitial
Type:
- {startTime: number, endTime: ?number, uri: string, isSkippable: boolean, canJump: boolean, resumeOffset: ?number, playoutLimit: ?number, once: boolean, pre: boolean, post: boolean, timelineRange: boolean}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
startTime |
number | ||
endTime |
number |
<nullable> |
|
uri |
string | ||
isSkippable |
boolean | ||
canJump |
boolean | ||
resumeOffset |
number |
<nullable> |
|
playoutLimit |
number |
<nullable> |
|
once |
boolean | ||
pre |
boolean | ||
post |
boolean | ||
timelineRange |
boolean |