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
config_ :shaka.extern.AdsConfiguration
Type:
eventManager_ :shaka.util.EventManager
Type:
interstitialIds_ :Set.<string>
Type:
- Set.<string>
interstitials_ :Set.<shaka.extern.AdInterstitial>
Type:
lastPlayedAd_ :shaka.extern.AdInterstitial
Type:
onEvent_ :function(!shaka.util.FakeEvent)
Type:
- function(!shaka.util.FakeEvent)
pollTimer_ :shaka.util.Timer
Type:
preloadManagerInterstitials_ :Map.<shaka.extern.AdInterstitial, Promise.<?shaka.media.PreloadManager>>
Type:
- Map.<shaka.extern.AdInterstitial, Promise.<?shaka.media.PreloadManager>>
timeUpdateTimer_ :shaka.util.Timer
Type:
Methods
addAdUrlInterstitial(url) → {Promise}
Parameters:
Name | Type | Description |
---|---|---|
url |
string |
Returns:
- Type
- Promise
addInterstitials(interstitialsnon-null)
Parameters:
Name | Type | Description |
---|---|---|
interstitials |
Array.<shaka.extern.AdInterstitial> |
addMetadata(hlsInterstitial)
Parameters:
Name | Type | Description |
---|---|---|
hlsInterstitial |
shaka.extern.HLSInterstitial |
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_(needPreRoll, numberToSkip, lastPlayedAdopt, nullable) → {shaka.extern.AdInterstitial}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
needPreRoll |
boolean | ||
numberToSkip |
number | ||
lastPlayedAd |
shaka.extern.AdInterstitial |
<optional> <nullable> |
Returns:
getInterstitialsInfo_(hlsInterstitial) → {Promise.<!Array.<shaka.extern.AdInterstitial>>}
Parameters:
Name | Type | Description |
---|---|---|
hlsInterstitial |
shaka.extern.HLSInterstitial |
Returns:
- Type
- Promise.<!Array.<shaka.extern.AdInterstitial>>
makeAdRequest_(url, contextopt) → {Promise.<BufferSource>}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
url |
string | ||
context |
shaka.extern.RequestContext |
<optional> |
Returns:
- Type
- Promise.<BufferSource>
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.extern.AdInterstitial | |||
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>, SKIP-CONTROL: ?shaka.ads.InterstitialAdManager.SkipControl}
Properties:
Name | Type | Description |
---|---|---|
ASSETS |
Array.<shaka.ads.InterstitialAdManager.Asset> | |
SKIP-CONTROL |
shaka.ads.InterstitialAdManager.SkipControl |
SkipControl
Type:
- {ENABLE-SKIP-AFTER: number, ENABLE-SKIP-FOR: number}
Properties:
Name | Type | Description |
---|---|---|
ENABLE-SKIP-AFTER |
number | |
ENABLE-SKIP-FOR |
number |