A SegmentIndexSource creates a SegmentIndex from a source of metadata, e.g.,
a container or a manifest.
Constructing a SegmentIndex may require a fetch or may require some
non-trivial computation, so constructing several SegmentIndexes before
starting playback may not be desirable. A SegmentIndexSource allows
lazy-loading a SegmentIndex.
A SegmentIndexSource also separates how a SegmentIndex is constructed from
how it behaves, which enables combining SegmentIndexSources and
SegmentIndexes in various ways.
Methods
-
create() → (non-null) {Promise.<!shaka.media.SegmentIndex>}
-
Creates the SegmentIndex. The SegmentIndexSource retains ownership of the SegmentIndex.
- Implementations:
- Source:
Returns:
- Type
- Promise.<!shaka.media.SegmentIndex>
-
destroy()
-
Destroys this SegmentIndexSource.
- Implementations:
- Source: