Class: shaka.media.RegionTimeline

Constructor

new RegionTimeline()

Implements:
Source:

Members

Methods

addRegion(region)

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

(private) findSimilarRegion_(region) → (nullable) {shaka.extern.TimelineRegionInfo}

Find a region in the timeline that has the same scheme id uri, event id, start time and end time. If these four parameters match, we assume it to be the same region. If no similar region can be found, |null| will be returned.
Parameters:
Name Type Description
region shaka.extern.TimelineRegionInfo
Source:
Returns:
Type
shaka.extern.TimelineRegionInfo

(private) onAddRegion_()

Source:

regions() → (non-null) {Iterable.<shaka.extern.TimelineRegionInfo>}

Get an iterable for all the regions in the timeline. This will allow others to see what regions are in the timeline while not being able to change the collection.
Source:
Returns:
Type
Iterable.<shaka.extern.TimelineRegionInfo>

(export) release()

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

setListeners(onAddRegion)

Set the callbacks for events. This will override any previous calls to |setListeners|.
Parameters:
Name Type Description
onAddRegion function(shaka.extern.TimelineRegionInfo) Set the callback for when we add a new region. This callback will only be called when a region is unique (we reject duplicate regions).
Source: