Constructor
new MediaTailorAdManager(adContainer, networkingEngine, video, onEvent)
Parameters:
Name | Type | Description |
---|---|---|
adContainer |
HTMLElement | |
networkingEngine |
shaka.net.NetworkingEngine | |
video |
HTMLMediaElement | |
onEvent |
function |
- Implements:
- Source:
Members
ad_ :shaka.ads.MediaTailorAd
Type:
adBreaks_ :Array.<!mediaTailor.AdBreak>
Type:
- Array.<!mediaTailor.AdBreak>
adListeners_ :Array.<{target: EventTarget, type: string, listener: shaka.util.EventManager.ListenerType}>
Type:
- Array.<{target: EventTarget, type: string, listener: shaka.util.EventManager.ListenerType}>
eventManager_ :shaka.util.EventManager
Type:
mediaTailorAd_ :mediaTailor.Ad
Type:
- mediaTailor.Ad
mediaTailorAdBreak_ :mediaTailor.AdBreak
Type:
- mediaTailor.AdBreak
networkingEngine_ :shaka.net.NetworkingEngine
Type:
onEvent_ :function(!shaka.util.FakeEvent)
Type:
- function(!shaka.util.FakeEvent)
snapForwardTime_ :number
Time to seek to after an ad if that ad was played as the result of
snapback.
Type:
- number
staticResources_ :Map.<string, !Array.<mediaTailorExternalResource.App>>
Type:
- Map.<string, !Array.<mediaTailorExternalResource.App>>
Methods
addTrackingUrl(url)
Parameters:
Name | Type | Description |
---|---|---|
url |
string |
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.
checkLinearAds_(currentTime)
Parameters:
Name | Type | Description |
---|---|---|
currentTime |
number |
checkNonLinearAds_(currentTime)
Parameters:
Name | Type | Description |
---|---|---|
currentTime |
number |
displayNonLinearAd_(appsnon-null)
Parameters:
Name | Type | Description |
---|---|---|
apps |
Array.<mediaTailorExternalResource.App> |
getCacheKeyForNonLinear_(nonLinearAd) → {string}
Parameters:
Name | Type | Description |
---|---|---|
nonLinearAd |
mediaTailor.NonLinearAd |
Returns:
- Type
- string
onAdBreakEnded_()
onEnded_()
onManifestUpdated(isLive)
Fired when the manifest is updated
Parameters:
Name | Type | Description |
---|---|---|
isLive |
boolean |
onTimeupdate_()
release()
Request that this object release all internal references.
- Implements:
- Source:
removeCurrentAdListeners_(skippedopt)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
skipped |
boolean |
<optional> |
false |
requestSessionInfo_(url, adsParams)
Parameters:
Name | Type | Description |
---|---|---|
url |
string | |
adsParams |
Object |
requestStaticResource_(nonLinearAd)
Parameters:
Name | Type | Description |
---|---|---|
nonLinearAd |
mediaTailor.NonLinearAd |
requestTrackingInfo_(trackingUrl, firstRequest)
Parameters:
Name | Type | Description |
---|---|---|
trackingUrl |
string | |
firstRequest |
boolean |
sendInProgressEvents_(currentTime, ad)
Parameters:
Name | Type | Description |
---|---|---|
currentTime |
number | |
ad |
mediaTailor.Ad |
sendTrackingEvent_(eventType)
Parameters:
Name | Type | Description |
---|---|---|
eventType |
string |
setupAdBreakListeners_()
Setup Ad Break listeners
setupCurrentAdListeners_()
stop()
Resets the MediaTailor manager and removes any continuous polling.
streamRequest(url, adsParams, backupUrl) → {Promise.<string>}
Parameters:
Name | Type | Description |
---|---|---|
url |
string | |
adsParams |
Object | |
backupUrl |
string |
Returns:
- Type
- Promise.<string>