Class: shaka.ads.InterstitialAdManager

Constructor

new InterstitialAdManager(adContainer, basePlayer, baseVideo, onEvent)

Parameters:
Name Type Description
adContainer HTMLElement
basePlayer shaka.Player
baseVideo HTMLMediaElement
onEvent function
Implements:
Source:

Members

adContainer_ :HTMLElement

Type:
  • HTMLElement
Source:

interstitialIds_ :Set.<string>

Type:
  • Set.<string>
Source:

lastTime_ :number

Type:
  • number
Source:

onEvent_ :function(!shaka.util.FakeEvent)

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

playingAd_ :boolean

Type:
  • boolean
Source:

usingBaseVideo_ :boolean

Type:
  • boolean
Source:

Methods

addMetadata(interstitial)

Parameters:
Name Type Description
interstitial shaka.extern.Interstitial
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:

createMediaElement_() → {HTMLMediaElement}

Source:
Returns:
Type
HTMLMediaElement

cuepointsChanged_()

Source:

getCurrentInterstitial_(needPreRoll, numberToSkipopt) → {shaka.ads.InterstitialAdManager.Interstitial}

Parameters:
Name Type Attributes Default Description
needPreRoll boolean
numberToSkip number <optional>
0
Source:
Returns:
Type
shaka.ads.InterstitialAdManager.Interstitial

getInterstitialsInfo_(interstitial) → {Promise.<!Array.<shaka.ads.InterstitialAdManager.Interstitial>>}

Parameters:
Name Type Description
interstitial shaka.extern.Interstitial
Source:
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
Source:

stop()

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

updatePlayerConfig_()

Source:

Type Definitions

Asset

Type:
  • {URI: string}
Properties:
Name Type Description
URI string
Source:

AssetsList

Type:
Properties:
Name Type Description
ASSETS Array.<shaka.ads.InterstitialAdManager.Asset>
Source:

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
Source: