Constructor
new ManifestUpdater(newManifestInfonon-null)
Creates a ManifestUpdater.
This function takes ownership of |newManifestInfo|.
Parameters:
| Name | Type | Description |
|---|---|---|
newManifestInfo |
shaka.media.ManifestInfo |
- Source:
Members
-
(private, non-null) newManifestInfo_ :shaka.media.ManifestInfo
-
Type:
- Source:
Methods
-
(private, static) createSegmentIndexes_(manifestInfonon-null) → (non-null) {Promise.<!Object.<number, !shaka.media.SegmentIndex>>}
-
Creates every SegmentIndex contained in |manifestInfo|.
Parameters:
Name Type Description manifestInfoshaka.media.ManifestInfo - Source:
Returns:
- Type
- Promise.<!Object.<number, !shaka.media.SegmentIndex>>
-
(private, static) integrateSegmentIndexes_(currentStreamInfonon-null, newStreamInfonon-null, currentSegmentIndexesByUidnon-null, newSegmentIndexesByUidnon-null)
-
Integrates |newStreamInfo|'s SegmentIndex into |currentStreamSet|'s SegmentIndex.
Parameters:
Name Type Description currentStreamInfoshaka.media.StreamInfo newStreamInfoshaka.media.StreamInfo currentSegmentIndexesByUidObject.<number, !shaka.media.SegmentIndex> newSegmentIndexesByUidObject.<number, !shaka.media.SegmentIndex> - Source:
-
(private, static) mergePeriodInfos_(currentManifestInfonon-null, newManifestInfonon-null, currentSegmentIndexesByUidnon-null, newSegmentIndexesByUidnon-null, removedStreamInfosnon-null)
-
Merges PeriodInfos from |newManifestInfo_| into |currentManifestInfo|. Populates |removedStreamInfos| with any StreamInfos from |currentManifestInfo| that have been removed.
Parameters:
Name Type Description currentManifestInfoshaka.media.ManifestInfo newManifestInfoshaka.media.ManifestInfo currentSegmentIndexesByUidObject.<number, !shaka.media.SegmentIndex> newSegmentIndexesByUidObject.<number, !shaka.media.SegmentIndex> removedStreamInfosArray.<!shaka.media.StreamInfo> - Source:
-
(private, static) mergeStreamInfos_(currentStreamSetInfonon-null, newStreamSetInfonon-null, currentSegmentIndexesByUidnon-null, newSegmentIndexesByUidnon-null, removedStreamInfosnon-null)
-
Merges StreamInfos from |newStreamSetInfo| into |currentStreamSetInfo|.
Parameters:
Name Type Description currentStreamSetInfoshaka.media.StreamSetInfo newStreamSetInfoshaka.media.StreamSetInfo currentSegmentIndexesByUidObject.<number, !shaka.media.SegmentIndex> newSegmentIndexesByUidObject.<number, !shaka.media.SegmentIndex> removedStreamInfosArray.<!shaka.media.StreamInfo> - Source:
-
(private, static) mergeStreamSetInfos_(currentPeriodInfonon-null, newPeriodInfonon-null, currentSegmentIndexesByUidnon-null, newSegmentIndexesByUidnon-null, removedStreamInfosnon-null)
-
Merges StreamSetInfos from |newPeriodInfo| into |currentPeriodInfo|.
Parameters:
Name Type Description currentPeriodInfoshaka.media.PeriodInfo newPeriodInfoshaka.media.PeriodInfo currentSegmentIndexesByUidObject.<number, !shaka.media.SegmentIndex> newSegmentIndexesByUidObject.<number, !shaka.media.SegmentIndex> removedStreamInfosArray.<!shaka.media.StreamInfo> - Source:
-
destroy()
-
Destroys this ManifestUpdater.
- Source:
-
update(currentManifestInfonon-null) → (non-null) {Promise.<!Array.<!shaka.media.StreamInfo>>}
-
Updates |currentManifestInfo|. Although this function is asynchronous, all modifications to |currentManifestInfo| occur synchronously immediately before the returned promise resolves.
Parameters:
Name Type Description currentManifestInfoshaka.media.ManifestInfo - Source:
Returns:
A promise to a list of StreamInfos that were removed from |currentManifestInfo|.- Type
- Promise.<!Array.<!shaka.media.StreamInfo>>