Kind: global class
- HLSVod
- new HLSVod(vodManifestUri, splices, timeOffset, startTimeOffset, header, opts)
- .defaultAudioGroupAndLang
- .load()
- .loadAfter(previousVod)
- .reload(mediaSeqNo, additionalSegments, additionalAudioSegments, insertAfter) ⇒
- .addMetadata(key, value)
- .getVodUri()
- .getLiveMediaSequenceSegments(seqIdx)
- .getLiveAudioSequenceSegments(seqIdx)
- .getMediaSegments()
- .getLiveMediaSequenceAudioSegments(audioGroupId, audioLanguage, seqIdx)
- .getLiveMediaSequenceSubtitleSegments(subtitleGroupId, subtitleLanguage, seqIdx)
- .getBandwidths()
- .getLiveMediaSequencesCount()
- .getLastSequenceMediaSequenceValue()
- .getLastSequenceMediaSequenceValueAudio()
- .getLastSequenceMediaSequenceValueSubtitle()
- .getLiveMediaSequences(offset, bandwidth, seqIdx, discOffset, padding, forceTargetDuration)
- .getLiveMediaAudioSequences()
- .getLiveMediaSubtitleSequences()
- .getUsageProfiles()
- .getLastDiscontinuity()
- .getLastDiscontinuityAudio()
- .getDeltaTimes()
- .getPlayheadPositions()
- .releasePreviousVod()
- .getDuration()
- .getLastUsedDiscSeq()
- ._copyAudioGroupsFromPrevious()
- ._copySubtitleGroupsFromPrevious()
Create an HLS VOD instance
Param | Type | Description |
---|---|---|
vodManifestUri | string |
the uri to the master manifest of the VOD |
splices | Object |
an array of ad splice objects |
timeOffset | number |
time offset as unix timestamp ms |
startTimeOffset | number |
start time offset in N ms from start |
header | string |
prepend the m3u8 playlist with this text |
opts | string |
other options |
TODO: Handle case where prevVod and nextVod have many groups and languages, but none of them match. Currently, it only sets a default if there is only one possible group and lang to match with on the prevVod.
Kind: instance property of HLSVod
Load and parse the HLS VOD
Kind: instance method of HLSVod
Load and parse the HLS VOD where the first media sequences contains the end sequences of the previous VOD
Kind: instance method of HLSVod
Param | Type | Description |
---|---|---|
previousVod | HLSVod |
the previous VOD to concatenate to |
Removes all segments that come before or after a specified media sequence. Then adds the new additional segments in front or behind. It finally creates new media sequences with the updated collection of segments.
Kind: instance method of HLSVod
Returns: A promise that new Media Sequences have been made
Param | Type | Description |
---|---|---|
mediaSeqNo | number |
The media Sequence index that is the live index. |
additionalSegments | object |
New group of segments to merge with a possible subset of this.segments |
additionalAudioSegments | object |
New group of audio segments to merge with a possible subset of this.segments |
insertAfter | boolean |
Whether the additional segments are to be added in front of the live index or behind |
Add metadata timed for this VOD
Kind: instance method of HLSVod
Param | Type | Description |
---|---|---|
key | key |
EXT-X-DATERANGE attribute key |
value | * |
Retrieve master manifest Uri for this VOD
Kind: instance method of HLSVod
Get all segments (duration, uri) for a specific media sequence
Kind: instance method of HLSVod
Param | Type | Description |
---|---|---|
seqIdx | number |
media sequence index (first is 0) |
Get all audio segments (duration, uri) for a specific media sequence
Kind: instance method of HLSVod
Param | Type | Description |
---|---|---|
seqIdx | number |
media sequence index (first is 0) |
Get all segments (duration, uri)
Kind: instance method of HLSVod
Get all audio segments (duration, uri) for a specific media sequence based on audio group and lang
Kind: instance method of HLSVod
Param | Type | Description |
---|---|---|
audioGroupId | string |
audio group Id |
audioLanguage | string |
audio language |
seqIdx | number |
media sequence index (first is 0) |
Get all subtitle segments (duration, uri) for a specific media sequence
Kind: instance method of HLSVod
Param | Type | Description |
---|---|---|
subtitleGroupId | string |
subtitle group Id |
subtitleLanguage | string |
subtitle language |
seqIdx | number |
media sequence index (first is 0) |
Get the available bandwidths for this VOD
Kind: instance method of HLSVod
Get the number of media sequences for this VOD
Kind: instance method of HLSVod
Get the media-sequence value for the last media sequence of this VOD
Kind: instance method of HLSVod
Get the media-sequence value for the last audio media sequence of this VOD
Kind: instance method of HLSVod
Get the media-sequence value for the last subtitle media sequence of this VOD
Kind: instance method of HLSVod
Get the HLS live media sequence for a specific media sequence and bandwidth
Kind: instance method of HLSVod
Param | Type | Description |
---|---|---|
offset | number |
add this offset to all media sequences in the EXT-X-MEDIA-SEQUENCE tag |
bandwidth | string |
|
seqIdx | number |
|
discOffset | number |
add this offset to all discontinuity sequences in the EXT-X-DISCONTINUITY-SEQUENCE tag |
padding | number |
add extra seconds on the EXT-X-TARGETDURATION |
forceTargetDuration | number |
enforce a fixed EXT-X-TARGETDURATION |
Gets a hls/makes m3u8-file with all of the correct audio segments belonging to a given groupID & language for a particular sequence.
Kind: instance method of HLSVod
Gets a hls/makes m3u8-file with all of the correct subtitle segments belonging to a given groupID & language for a particular sequence.
Kind: instance method of HLSVod
Get the usage profile for this VOD
Kind: instance method of HLSVod
Get the last discontinuity sequence number
Kind: instance method of HLSVod
Get the last audio discontinuity sequence number
Kind: instance method of HLSVod
Get the delta times for each media sequence.
Kind: instance method of HLSVod
Returns the playhead position for each media sequence
Kind: instance method of HLSVod
Remove pointers to previous VOD and release to garbage collector
Kind: instance method of HLSVod
Returns the current duration calculated from the sum of the duration of all segments
Kind: instance method of HLSVod
Returns the last added Discontinuity sequence count from getLiveMediaSequences()
Kind: instance method of HLSVod
Gets previous VOD's audio -groupIds, -langs, -segments from its last sequence and adds them to the current VOD's this.audioSegments property.
Kind: instance method of HLSVod
Gets previous VOD's subtitle -groupIds, -langs, -segments from its last sequence and adds them to the current VOD's this.subtitleSegments property.
Kind: instance method of HLSVod