Constructor
new SvtaInterstitialTracker()
- Implements:
- Source:
Classes
Members
pods_ :Map<string, shaka.ads.SvtaInterstitialTracker.PodEntry>
Pods whose slots are carried separately, by id. The first object seen
is kept, so the pod state is shared by all its slots.
Type:
- Map<string, shaka.ads.SvtaInterstitialTracker.PodEntry>
podStates_ :WeakMap<shaka.extern.AdCreativeSignaling.Pod, shaka.ads.SvtaInterstitialTracker.PodState>
Type:
remoteFields_ :WeakMap<Object, !Promise>
Type:
- WeakMap<Object, !Promise>
requests_ :Set<shaka.net.NetworkingEngine.PendingRequest>
Type:
slotFired_ :WeakMap<shaka.extern.AdCreativeSignaling.Slot, !Set<shaka.ads.InterstitialTracker.Event>>
Tracking events already sent for embedded slots. Watching an embedded
slot again (e.g. after seeking back) is not a new ad view.
Type:
slotIds_ :Set<string>
Ids of the standalone slots already seen. Duplicates, e.g. from a
manifest update, are not scheduled again, so they are not linked.
Type:
- Set<string>
unlinkedSlots_ :Map<string, shaka.extern.AdInterstitial>
Standalone slots not yet linked to a pod, by id. Their pod may arrive
later.
Type:
- Map<string, shaka.extern.AdInterstitial>
Methods
attach_(entry, slot)
Parameters:
| Name | Type | Description |
|---|---|---|
entry |
shaka.ads.SvtaInterstitialTracker.PodEntry | |
slot |
shaka.extern.AdInterstitial |
contains_(entry, slot) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
entry |
shaka.ads.SvtaInterstitialTracker.PodEntry | |
slot |
shaka.extern.AdInterstitial |
Returns:
- Type
- boolean
getTracking_(containernon-null) → {Array<shaka.extern.AdCreativeSignaling.TrackingEvent>}
Parameters:
| Name | Type | Description |
|---|---|---|
container |
shaka.extern.AdCreativeSignaling.Slot | shaka.extern.AdCreativeSignaling.Pod |
Returns:
- Type
- Array<shaka.extern.AdCreativeSignaling.TrackingEvent>
create(interstitialnon-null, sessionnon-null, sendBeacon, fetch) → {shaka.ads.InterstitialAdSession.Tracker}
Parameters:
| Name | Type | Description |
|---|---|---|
interstitial |
shaka.extern.AdInterstitial | |
session |
shaka.ads.InterstitialAdSession | |
sendBeacon |
function(string) | |
fetch |
function(string): !shaka.net.NetworkingEngine.PendingRequest |
Returns:
linkPods(podsnon-null, interstitialsnon-null)
Links slots to the pod whose interval contains them, when the pod and its
slots are carried separately (SVTA2053 section 5.2.2). They may arrive in
any order, so each new pod or slot is matched against the ones already
seen. Slots already nested in a pod are left as they are.
Parameters:
| Name | Type | Description |
|---|---|---|
pods |
Array<!shaka.ads.SvtaInterstitialParser.StandalonePod> | |
interstitials |
Array<shaka.extern.AdInterstitial> |
release()
Request that this object release all internal references.
- Implements:
- Source:
reset()
Forgets the state of the current asset. Pending responses are discarded,
even if the network abort arrives late.
resolveContainer_(containernon-null, sessionnon-null, fetch) → {Promise}
Resolves each remote container once, when its media is needed. Responses
replace the field rather than appending to its inline fallback.
Parameters:
| Name | Type | Description |
|---|---|---|
container |
shaka.extern.AdCreativeSignaling.Pod | shaka.extern.AdCreativeSignaling.Slot | |
session |
shaka.ads.InterstitialAdSession | |
fetch |
function(string): !shaka.net.NetworkingEngine.PendingRequest |
Returns:
- Type
- Promise
Type Definitions
PodEntry
Type:
- {pod: !shaka.extern.AdCreativeSignaling.Pod, startTime: number, endTime: number, slots: !Array<shaka.extern.AdInterstitial>}
PodState
Type:
- {fired: !Set<shaka.extern.AdCreativeSignaling.TrackingEvent>, started: boolean, ended: boolean}