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:
- Source:
adProgressData_ :google.ima.dai.api.AdProgressData
Type:
-
google.ima.dai.api.AdProgressData
- Source:
backupUrl_ :string
Type:
- Source:
isLiveContent_ :boolean
Type:
- 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:
- Source:
streamManager_ :google.ima.dai.api.StreamManager
Type:
-
google.ima.dai.api.StreamManager
- Source:
streamPromise_ :Promise.PromiseWithResolvers<string>
Type:
-
Promise.PromiseWithResolvers<string>
- Source:
streamRequestStartTime_ :number
Type:
- 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:
Called by the AdManager to provide an updated configuration any time it
changes.
Parameters:
- 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:
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:
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>