Function
Static Public Summary | ||
public |
DemuxerWorker(self: *) |
|
public |
|
|
public |
addGroupId(level: *, type: *, id: *) |
|
public |
adjustPts(sliding: *, details: *) |
|
public |
adjustSliding(oldPlaylist: *, newPlaylist: *) |
|
public |
alignDiscontinuities(lastLevel: *, details: *) Computes the PTS if a new level's fragments using the PTS of a fragment in the last level which shares the same discontinuity sequence. |
|
public |
alignPDT(details: *, lastDetails: *) Computes the PTS of a new level's fragments using the difference in Program Date Time from the last level. |
|
public |
alignStream(lastFrag: *, lastLevel: *, details: *) Using the parameters of the last level, this function computes PTS' of the new fragments so that they form a contiguous stream with the last fragments. The PTS of a fragment lets Hls.js know where it fits into a stream - by knowing every PTS, we know which fragment to download at any given time. PTS is normally computed when the fragment is demuxed, so taking this step saves us time and an extra download. |
|
public |
appendFrame(track: *, data: *, offset: *, pts: *, frameIndex: *): * |
|
public |
clearCurrentCues(track: TextTrack) |
|
public |
computeReloadInterval(currentPlaylist: *, newPlaylist: *, lastRequestTime: *): * |
|
public |
enableLogs(debugConfig: *) |
|
public |
findDiscontinuousReferenceFrag(prevDetails: *, curDetails: *): * |
|
public |
findFirstFragWithCC(fragments: *, cc: *): * |
|
public |
findFragWithCC(fragments: *, CC: *): * |
|
public |
findFragmentByPDT(fragments: Array, PDTValue: undefined, maxFragLookUpTolerance: number): * Returns first fragment whose endPdt value exceeds the given PDT. |
|
public |
findFragmentByPTS(fragPrevious: Fragment, fragments: Array, bufferEnd: number, maxFragLookUpTolerance: number): * Finds a fragment based on the SN of the previous fragment; or based on the needs of the current buffer. |
|
public |
fixLineBreaks(input: *): * |
|
public |
fragmentWithinToleranceTest(bufferEnd: undefined, maxFragLookUpTolerance: undefined, candidate: Fragment): number The test function used by the findFragmentBySn's BinarySearch to look for the best match to the current buffer conditions. |
|
public |
getAudioConfig(observer: *, data: *, offset: *, audioCodec: *): {"config": *, "samplerate": *, "channelCount": *, "codec": *, "manifestCodec": *} |
|
public |
getClosestCue(cues: undefined, time: number): TextTrackCue Given a list of Cues, finds the closest cue matching the given time. |
|
public |
getFrameDuration(samplerate: *): * |
|
public |
getFullFrameLength(data: *, offset: *): * |
|
public |
getHeaderLength(data: *, offset: *): * |
|
public |
getMediaSource(): * MediaSource helper |
|
public |
getSelfScope(): * |
|
public |
initTrackConfig(track: *, observer: *, data: *, offset: *, audioCodec: *) |
|
public |
isCodecSupportedInMp4(codec: string, type: CodecType): boolean |
|
public |
isCodecType(codec: string, type: CodecType): boolean |
|
public |
|
|
public |
isHeaderPattern(data: *, offset: *): * |
|
public |
|
|
public |
mapFragmentIntersection(oldPlaylist: *, newPlaylist: *, intersectionFn: *) |
|
public |
mergeDetails(oldDetails: *, newDetails: *) |
|
public |
mergeSubtitlePlaylists(oldPlaylist: *, newPlaylist: *, referenceStart: number) |
|
public |
newCue(track: undefined, startTime: number, endTime: number, captionScreen: CaptionScreen): * |
|
public |
parseFrameHeader(data: *, offset: *, pts: *, frameIndex: *, frameDuration: *): * |
|
public |
pdtWithinToleranceTest(pdtBufferEnd: number, maxFragLookUpTolerance: number, candidate: Fragment): boolean The test function used by the findFragmentByPdt's BinarySearch to look for the best match to the current buffer conditions. This function tests the candidate's program date time values, as represented in Unix time |
|
public |
|
|
public |
removePadding(buffer: *): * |
|
public |
sendAddTrackEvent(track: TextTrack, videoEl: HTMLMediaElement) |
|
public |
shouldAlignOnDiscontinuities(lastFrag: *, lastLevel: *, details: *): * |
|
public |
toMpegTsClockFromTimescale(value: number, srcScale: number): number |
|
public |
toMsFromMpegTsClock(value: number, round: boolean): number |
|
public |
|
|
public |
|
|
public |
updateFragPTSDTS(details: *, frag: *, startPTS: *, endPTS: *, startDTS: *, endDTS: *): * |
|
public |
updatePTS(fragments: *, fromIdx: *, toIdx: *) |
Static Public
public DemuxerWorker(self: *) source
import DemuxerWorker from 'hls.js/src/demux/demuxer-worker.js'
Params:
Name | Type | Attribute | Description |
self | * |
public addGroupId(level: *, type: *, id: *) source
import {addGroupId} from 'hls.js/src/controller/level-helper.js'
Params:
Name | Type | Attribute | Description |
level | * | ||
type | * | ||
id | * |
public adjustPts(sliding: *, details: *) source
import {adjustPts} from 'hls.js/src/utils/discontinuities.js'
Params:
Name | Type | Attribute | Description |
sliding | * | ||
details | * |
public adjustSliding(oldPlaylist: *, newPlaylist: *) source
import {adjustSliding} from 'hls.js/src/controller/level-helper.js'
Params:
Name | Type | Attribute | Description |
oldPlaylist | * | ||
newPlaylist | * |
public alignDiscontinuities(lastLevel: *, details: *) source
import {alignDiscontinuities} from 'hls.js/src/utils/discontinuities.js'
Computes the PTS if a new level's fragments using the PTS of a fragment in the last level which shares the same discontinuity sequence.
Params:
Name | Type | Attribute | Description |
lastLevel | * | The details of the last loaded level |
|
details | * | The details of the new level |
public alignPDT(details: *, lastDetails: *) source
import {alignPDT} from 'hls.js/src/utils/discontinuities.js'
Computes the PTS of a new level's fragments using the difference in Program Date Time from the last level.
Params:
Name | Type | Attribute | Description |
details | * | The details of the new level |
|
lastDetails | * | The details of the last loaded level |
public alignStream(lastFrag: *, lastLevel: *, details: *) source
import {alignStream} from 'hls.js/src/utils/discontinuities.js'
Using the parameters of the last level, this function computes PTS' of the new fragments so that they form a contiguous stream with the last fragments. The PTS of a fragment lets Hls.js know where it fits into a stream - by knowing every PTS, we know which fragment to download at any given time. PTS is normally computed when the fragment is demuxed, so taking this step saves us time and an extra download.
Params:
Name | Type | Attribute | Description |
lastFrag | * | ||
lastLevel | * | ||
details | * |
public appendFrame(track: *, data: *, offset: *, pts: *, frameIndex: *): * source
import {appendFrame} from 'hls.js/src/demux/adts.js'
Params:
Name | Type | Attribute | Description |
track | * | ||
data | * | ||
offset | * | ||
pts | * | ||
frameIndex | * |
Return:
* |
public clearCurrentCues(track: TextTrack) source
import {clearCurrentCues} from 'hls.js/src/utils/texttrack-utils.ts'
Params:
Name | Type | Attribute | Description |
track | TextTrack |
public computeReloadInterval(currentPlaylist: *, newPlaylist: *, lastRequestTime: *): * source
import {computeReloadInterval} from 'hls.js/src/controller/level-helper.js'
Params:
Name | Type | Attribute | Description |
currentPlaylist | * | ||
newPlaylist | * | ||
lastRequestTime | * |
Return:
* |
public enableLogs(debugConfig: *) source
import {enableLogs} from 'hls.js/src/utils/logger.js'
Params:
Name | Type | Attribute | Description |
debugConfig | * |
public findDiscontinuousReferenceFrag(prevDetails: *, curDetails: *): * source
import {findDiscontinuousReferenceFrag} from 'hls.js/src/utils/discontinuities.js'
Params:
Name | Type | Attribute | Description |
prevDetails | * | ||
curDetails | * |
Return:
* |
public findFirstFragWithCC(fragments: *, cc: *): * source
import {findFirstFragWithCC} from 'hls.js/src/utils/discontinuities.js'
Params:
Name | Type | Attribute | Description |
fragments | * | ||
cc | * |
Return:
* |
public findFragWithCC(fragments: *, CC: *): * source
import {findFragWithCC} from 'hls.js/src/utils/discontinuities.js'
Params:
Name | Type | Attribute | Description |
fragments | * | ||
CC | * |
Return:
* |
public findFragmentByPDT(fragments: Array, PDTValue: undefined, maxFragLookUpTolerance: number): * source
import {findFragmentByPDT} from 'hls.js/src/controller/fragment-finders.ts'
Returns first fragment whose endPdt value exceeds the given PDT.
Return:
* |
public findFragmentByPTS(fragPrevious: Fragment, fragments: Array, bufferEnd: number, maxFragLookUpTolerance: number): * source
import {findFragmentByPTS} from 'hls.js/src/controller/fragment-finders.ts'
Finds a fragment based on the SN of the previous fragment; or based on the needs of the current buffer. This method compensates for small buffer gaps by applying a tolerance to the start of any candidate fragment, thus breaking any traps which would cause the same fragment to be continuously selected within a small range.
Return:
* |
public fixLineBreaks(input: *): * source
import {fixLineBreaks} from 'hls.js/src/utils/vttparser.js'
Params:
Name | Type | Attribute | Description |
input | * |
Return:
* |
public fragmentWithinToleranceTest(bufferEnd: undefined, maxFragLookUpTolerance: undefined, candidate: Fragment): number source
import {fragmentWithinToleranceTest} from 'hls.js/src/controller/fragment-finders.ts'
The test function used by the findFragmentBySn's BinarySearch to look for the best match to the current buffer conditions.
public getAudioConfig(observer: *, data: *, offset: *, audioCodec: *): {"config": *, "samplerate": *, "channelCount": *, "codec": *, "manifestCodec": *} source
import {getAudioConfig} from 'hls.js/src/demux/adts.js'
Params:
Name | Type | Attribute | Description |
observer | * | ||
data | * | ||
offset | * | ||
audioCodec | * |
Return:
{"config": *, "samplerate": *, "channelCount": *, "codec": *, "manifestCodec": *} |
public getClosestCue(cues: undefined, time: number): TextTrackCue source
import {getClosestCue} from 'hls.js/src/utils/texttrack-utils.ts'
Given a list of Cues, finds the closest cue matching the given time. Modified verison of binary search O(log(n)).
Return:
TextTrackCue |
public getFrameDuration(samplerate: *): * source
import {getFrameDuration} from 'hls.js/src/demux/adts.js'
Params:
Name | Type | Attribute | Description |
samplerate | * |
Return:
* |
public getFullFrameLength(data: *, offset: *): * source
import {getFullFrameLength} from 'hls.js/src/demux/adts.js'
Params:
Name | Type | Attribute | Description |
data | * | ||
offset | * |
Return:
* |
public getHeaderLength(data: *, offset: *): * source
import {getHeaderLength} from 'hls.js/src/demux/adts.js'
Params:
Name | Type | Attribute | Description |
data | * | ||
offset | * |
Return:
* |
public getMediaSource(): * source
import {getMediaSource} from 'hls.js/src/utils/mediasource-helper.ts'
MediaSource helper
Return:
* |
public getSelfScope(): * source
import {getSelfScope} from 'hls.js/src/utils/get-self-scope.js'
Return:
* |
public initTrackConfig(track: *, observer: *, data: *, offset: *, audioCodec: *) source
import {initTrackConfig} from 'hls.js/src/demux/adts.js'
Params:
Name | Type | Attribute | Description |
track | * | ||
observer | * | ||
data | * | ||
offset | * | ||
audioCodec | * |
public isCodecSupportedInMp4(codec: string, type: CodecType): boolean source
import {isCodecSupportedInMp4} from 'hls.js/src/utils/codecs.ts'
Params:
Name | Type | Attribute | Description |
codec | string | ||
type | CodecType |
public isCodecType(codec: string, type: CodecType): boolean source
import {isCodecType} from 'hls.js/src/utils/codecs.ts'
Params:
Name | Type | Attribute | Description |
codec | string | ||
type | CodecType |
public isHeader(data: *, offset: *): boolean source
import {isHeader} from 'hls.js/src/demux/adts.js'
Params:
Name | Type | Attribute | Description |
data | * | ||
offset | * |
public isHeaderPattern(data: *, offset: *): * source
import {isHeaderPattern} from 'hls.js/src/demux/adts.js'
Params:
Name | Type | Attribute | Description |
data | * | ||
offset | * |
Return:
* |
public mapFragmentIntersection(oldPlaylist: *, newPlaylist: *, intersectionFn: *) source
import {mapFragmentIntersection} from 'hls.js/src/controller/level-helper.js'
Params:
Name | Type | Attribute | Description |
oldPlaylist | * | ||
newPlaylist | * | ||
intersectionFn | * |
public mergeDetails(oldDetails: *, newDetails: *) source
import {mergeDetails} from 'hls.js/src/controller/level-helper.js'
Params:
Name | Type | Attribute | Description |
oldDetails | * | ||
newDetails | * |
public mergeSubtitlePlaylists(oldPlaylist: *, newPlaylist: *, referenceStart: number) source
import {mergeSubtitlePlaylists} from 'hls.js/src/controller/level-helper.js'
Params:
Name | Type | Attribute | Description |
oldPlaylist | * | ||
newPlaylist | * | ||
referenceStart | number |
|
public newCue(track: undefined, startTime: number, endTime: number, captionScreen: CaptionScreen): * source
import {newCue} from 'hls.js/src/utils/cues.ts'
Params:
Name | Type | Attribute | Description |
track | undefined | ||
startTime | number | ||
endTime | number | ||
captionScreen | CaptionScreen |
Return:
* |
public parseFrameHeader(data: *, offset: *, pts: *, frameIndex: *, frameDuration: *): * source
import {parseFrameHeader} from 'hls.js/src/demux/adts.js'
Params:
Name | Type | Attribute | Description |
data | * | ||
offset | * | ||
pts | * | ||
frameIndex | * | ||
frameDuration | * |
Return:
* |
public pdtWithinToleranceTest(pdtBufferEnd: number, maxFragLookUpTolerance: number, candidate: Fragment): boolean source
import {pdtWithinToleranceTest} from 'hls.js/src/controller/fragment-finders.ts'
The test function used by the findFragmentByPdt's BinarySearch to look for the best match to the current buffer conditions. This function tests the candidate's program date time values, as represented in Unix time
public probe(data: *, offset: *): boolean source
import {probe} from 'hls.js/src/demux/adts.js'
Params:
Name | Type | Attribute | Description |
data | * | ||
offset | * |
public removePadding(buffer: *): * source
import {removePadding} from 'hls.js/src/crypt/aes-decryptor.js'
Params:
Name | Type | Attribute | Description |
buffer | * |
Return:
* |
public sendAddTrackEvent(track: TextTrack, videoEl: HTMLMediaElement) source
import {sendAddTrackEvent} from 'hls.js/src/utils/texttrack-utils.ts'
Params:
Name | Type | Attribute | Description |
track | TextTrack | ||
videoEl | HTMLMediaElement |
public shouldAlignOnDiscontinuities(lastFrag: *, lastLevel: *, details: *): * source
import {shouldAlignOnDiscontinuities} from 'hls.js/src/utils/discontinuities.js'
Params:
Name | Type | Attribute | Description |
lastFrag | * | ||
lastLevel | * | ||
details | * |
Return:
* |
public toMpegTsClockFromTimescale(value: number, srcScale: number): number source
import {toMpegTsClockFromTimescale} from 'hls.js/src/utils/timescale-conversion.ts'
public toMsFromMpegTsClock(value: number, round: boolean): number source
import {toMsFromMpegTsClock} from 'hls.js/src/utils/timescale-conversion.ts'
public toTimescaleFromBase(value: undefined, destScale: number, srcBase: number, round: boolean): number source
import {toTimescaleFromBase} from 'hls.js/src/utils/timescale-conversion.ts'
public toTimescaleFromScale(value: undefined, destScale: number, srcScale: number, round: boolean): number source
import {toTimescaleFromScale} from 'hls.js/src/utils/timescale-conversion.ts'
public updateFragPTSDTS(details: *, frag: *, startPTS: *, endPTS: *, startDTS: *, endDTS: *): * source
import {updateFragPTSDTS} from 'hls.js/src/controller/level-helper.js'
Params:
Name | Type | Attribute | Description |
details | * | ||
frag | * | ||
startPTS | * | ||
endPTS | * | ||
startDTS | * | ||
endDTS | * |
Return:
* |
public updatePTS(fragments: *, fromIdx: *, toIdx: *) source
import {updatePTS} from 'hls.js/src/controller/level-helper.js'
Params:
Name | Type | Attribute | Description |
fragments | * | ||
fromIdx | * | ||
toIdx | * |