Class: shaka.ads.ServerSideAdManager

Constructor

new ServerSideAdManager(adContainer, video, locale, onEvent)

Parameters:
Name Type Description
adContainer HTMLElement
video HTMLMediaElement
locale string
onEvent function
Implements:
Source:

Members

adContainer_ :HTMLElement

Type:
  • HTMLElement
Source:

adProgressData_ :google.ima.dai.api.AdProgressData

Type:
  • google.ima.dai.api.AdProgressData
Source:

backupUrl_ :string

Type:
  • string
Source:

isLiveContent_ :boolean

Type:
  • boolean
Source:

onEvent_ :function(!shaka.util.FakeEvent)

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

snapForwardTime_ :number

Time to seek to after an ad if that ad was played as the result of snapback.
Type:
  • number
Source:

streamManager_ :google.ima.dai.api.StreamManager

Type:
  • google.ima.dai.api.StreamManager
Source:

streamRequestStartTime_ :number

Type:
  • number
Source:

Methods

checkForSnapback_()

If a seek jumped over the ad break, return to the start of the ad break, then complete the seek after the ad played through.
Source:

onAdBreakEnded_()

Source:

onAdProgress_(enon-null)

Parameters:
Name Type Description
e google.ima.dai.api.StreamEvent
Source:

onAdStart_(enon-null)

Parameters:
Name Type Description
e google.ima.dai.api.StreamEvent
Source:

onCueMetadataChange(value)

Parameters:
Name Type Description
value shaka.extern.ID3Metadata
Source:

onCuePointsChanged_(enon-null)

Parameters:
Name Type Description
e google.ima.dai.api.StreamEvent
Source:

onLoaded_(enon-null)

Parameters:
Name Type Description
e google.ima.dai.api.StreamEvent
Source:

onTimedMetadata(type, data, timestamp)

Parameters:
Name Type Description
type string
data Uint8Array | string Comes as string in DASH and as Uint8Array in HLS.
timestamp number (in seconds)
Source:

release()

Request that this object release all internal references.
Implements:
Source:

replaceAdTagParameters(adTagParameters)

Parameters:
Name Type Description
adTagParameters Object
Source:

stop()

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

streamRequest(streamRequestnon-null, backupUrlopt) → {Promise.<string>}

Parameters:
Name Type Attributes Description
streamRequest google.ima.dai.api.StreamRequest
backupUrl string <optional>
Source:
Returns:
Type
Promise.<string>