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 manifestInfo
shaka.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 currentStreamInfo
shaka.media.StreamInfo newStreamInfo
shaka.media.StreamInfo currentSegmentIndexesByUid
Object.<number, !shaka.media.SegmentIndex> newSegmentIndexesByUid
Object.<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 currentManifestInfo
shaka.media.ManifestInfo newManifestInfo
shaka.media.ManifestInfo currentSegmentIndexesByUid
Object.<number, !shaka.media.SegmentIndex> newSegmentIndexesByUid
Object.<number, !shaka.media.SegmentIndex> removedStreamInfos
Array.<!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 currentStreamSetInfo
shaka.media.StreamSetInfo newStreamSetInfo
shaka.media.StreamSetInfo currentSegmentIndexesByUid
Object.<number, !shaka.media.SegmentIndex> newSegmentIndexesByUid
Object.<number, !shaka.media.SegmentIndex> removedStreamInfos
Array.<!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 currentPeriodInfo
shaka.media.PeriodInfo newPeriodInfo
shaka.media.PeriodInfo currentSegmentIndexesByUid
Object.<number, !shaka.media.SegmentIndex> newSegmentIndexesByUid
Object.<number, !shaka.media.SegmentIndex> removedStreamInfos
Array.<!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 currentManifestInfo
shaka.media.ManifestInfo - Source:
Returns:
A promise to a list of StreamInfos that were removed from |currentManifestInfo|.- Type
- Promise.<!Array.<!shaka.media.StreamInfo>>