Class: shaka.media.RegionTimeline

Constructor

new RegionTimeline(getSeekRangenon-null)

Parameters:
Name Type Description
getSeekRange function
Implements:
Source:

Members

REGION_FILTER_INTERVAL :number

Type:
  • number
Source:

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:

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:

filterBySeekRange_()

Source:

findSimilarRegion_(region) → {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

onAddRegion_()

Source:

regions() → {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>

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: