Class: shaka.ads.DashInterstitialParser

Constructor

new DashInterstitialParser()

Source:

Methods

isAlternativeMpd_(region) → {boolean}

Parameters:
Name Type Description
region shaka.extern.TimelineRegionInfo
Source:
Returns:
Type
boolean

isInterstitialRegion(region) → {boolean}

Whether the given DASH region is an interstitial handled by this parser: an alternative-MPD insert/replace event, or an overlay event.
Parameters:
Name Type Description
region shaka.extern.TimelineRegionInfo
Source:
Returns:
Type
boolean

parseAlternativeMpd_(region) → {shaka.extern.AdInterstitial}

Parameters:
Name Type Description
region shaka.extern.TimelineRegionInfo
Source:
Returns:
Type
shaka.extern.AdInterstitial

parseOverlay_(region) → {shaka.extern.AdInterstitial}

Parameters:
Name Type Description
region shaka.extern.TimelineRegionInfo
Source:
Returns:
Type
shaka.extern.AdInterstitial

parseRegion(region) → {shaka.extern.AdInterstitial}

Parses a DASH interstitial region (alternative MPD or overlay event) into an interstitial. Returns null if the region is not a valid interstitial. Callers should gate this with isInterstitialRegion.
Parameters:
Name Type Description
region shaka.extern.TimelineRegionInfo
Source:
Returns:
Type
shaka.extern.AdInterstitial

parseTopLeftSize_(topLeftnon-null, sizenon-null) → {?{topLeft: {x: number, y: number}, size: {x: number, y: number}}}

Parses the integer x/y attributes of TopLeft and Size nodes (used by DASH overlay events). Returns null if any coordinate is missing or invalid.
Parameters:
Name Type Description
topLeft shaka.extern.xml.Node
size shaka.extern.xml.Node
Source:
Returns:
Type
?{topLeft: {x: number, y: number}, size: {x: number, y: number}}