Class: shaka.ads.InterstitialAd

Constructor

new InterstitialAd(video, interstitial, onSkip, sequenceLength, adPosition, isUsingAnotherMediaElement)

Parameters:
Name Type Description
video HTMLMediaElement
interstitial shaka.extern.AdInterstitial
onSkip function
sequenceLength number
adPosition number
isUsingAnotherMediaElement boolean
Source:

Members

adPosition_ :number

Type:
  • number
Source:

isSkippable_ :boolean

Type:
  • boolean
Source:

isUsingAnotherMediaElement_ :boolean

Type:
  • boolean
Source:

mediaReady_ :boolean

The media element is shared by every ad of a pod and is not unloaded between them, so until this ad's own media has loaded the element may still hold the previous ad. While that is the case the time based getters must not report the element's values.
Type:
  • boolean
Source:

onSkip_ :function()

Type:
  • function()
Source:

sequenceLength_ :number

Type:
  • number
Source:

skipFor_ :number

Type:
  • number
Source:

skipOffset_ :number

Type:
  • number
Source:

Methods

canSkipNow()

Source:

getDuration()

Source:

getMediaUrl()

Source:

getPositionInSequence()

Source:

getRemainingTime()

Source:

getSequenceLength()

Source:

getTimeOffset()

Source:

getTimeUntilSkippable()

Source:

hasCustomClick()

Source:

isLinear()

Source:

isSkippable()

Source:

isUsingAnotherMediaElement()

Source:

markMediaReady()

Called by the ad manager once the media element has loaded this ad's own media, after which the element's timings can be trusted.
Source: