Class: shaka.media.RegionTimeline

Constructor

new RegionTimeline()

Constructor
Implements:
Source:

Members

(static, constant) REGION_FILTER_INTERVAL :number

Type:
  • number
Source:

(private) filterTimer_ :shaka.util.Timer

Make sure all of the regions we're tracking are within the seek range or further in the future. We don't want to store regions that fall before the start of the seek range.
Type:
Source:

(private) getSeekRange_ :function():{start: number, end: number}

Type:
  • function():{start: number, end: number}
Source:

Methods

addRegion(region)

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

(private) filterBySeekRange_()

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: