Function
Static Public Summary | ||
public |
PTSNormalize(value: number, reference: undefined): number |
|
public |
TransmuxerWorker(self: undefined) |
|
public |
|
|
public |
addCueToTrack(track: TextTrack, cue: VTTCue) |
|
public |
addGroupId(level: Level, type: string, id: string) |
|
public |
adjustSliding(oldDetails: LevelDetails, newDetails: LevelDetails) |
|
public |
adjustSlidingStart(sliding: number, details: LevelDetails) |
|
public |
alignPDT(details: LevelDetails, lastDetails: LevelDetails) Computes the PTS of a new level's fragments using the difference in Program Date Time from the last level. |
|
public |
alignStream(lastFrag: undefined, lastLevel: undefined, details: LevelDetails) 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: DemuxedAudioTrack, data: Uint8Array, offset: number, pts: number, frameIndex: number): {"sample": *, "length": *} |
|
public |
appendFrame(track: DemuxedAudioTrack, data: Uint8Array, offset: number, pts: number, frameIndex: number): {"sample": *, "length": *} |
|
public |
appendUint8Array(data1: Uint8Array, data2: Uint8Array): Uint8Array |
|
public |
assignTrackIdsByGroup(tracks: undefined) |
|
public |
bin2str(buffer: Uint8Array): string |
|
public |
canGetFrameLength(data: Uint8Array, offset: number): boolean |
|
public |
canParse(data: Uint8Array, offset: number): boolean |
|
public |
canParse(data: *, offset: *): * |
|
public |
canParse(data: Uint8Array, offset: number): boolean |
|
public |
|
|
public |
clearCurrentCues(track: TextTrack) |
|
public |
|
|
public |
computeReloadInterval(newDetails: LevelDetails, stats: LoaderStats): number |
|
public |
decodeFrame(frame: *): * |
|
public |
discardEPB(data: Uint8Array): Uint8Array remove Emulation Prevention bytes from a RBSP |
|
public |
dummyTrack(): DemuxedTrack |
|
public |
enableLogs(debugConfig: undefined) |
|
public |
enableStreamingMode(config: undefined) |
|
public |
|
|
public |
|
|
public |
findDiscontinuousReferenceFrag(prevDetails: LevelDetails, curDetails: LevelDetails): * |
|
public |
findFirstFragWithCC(fragments: undefined, cc: number): * |
|
public |
findFragWithCC(fragments: undefined, CC: undefined): * |
|
public |
findFragmentByPDT(fragments: Array, PDTValue: undefined, maxFragLookUpTolerance: number): * Returns first fragment whose endPdt value exceeds the given PDT. |
|
public |
findFragmentByPTS(fragPrevious: undefined, 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 |
generateCueId(startTime: number, endTime: number, text: string): * |
|
public |
getAudioConfig(observer: undefined, data: Uint8Array, offset: number, audioCodec: string): {"config": *, "samplerate": *, "channelCount": *, "codec": *, "manifestCodec": *} |
|
public |
getCuesInRange(cues: undefined, start: number, end: number): * |
|
public |
getDuration(data: Uint8Array, initData: InitData): * |
|
public |
getFragmentWithSN(level: Level, sn: number): * |
|
public |
getFrameDuration(samplerate: number): number |
|
public |
getFullFrameLength(data: Uint8Array, offset: number): number |
|
public |
getHeaderLength(data: Uint8Array, offset: number): number |
|
public |
getID3Data(data: Uint8Array, offset: number): Uint8Array | undefined Returns any adjacent ID3 tags found in data starting at offset, as one block of data |
|
public |
getID3Frames(id3Data: Uint8Array): ID3.Frame[] Returns an array of ID3 frames found in all the ID3 tags in the id3Data |
|
public |
getMediaSource(): * MediaSource helper |
|
public |
getPartWith(level: Level, sn: number, partIndex: number): * |
|
public |
getSkipValue(details: LevelDetails, msn: number): HlsSkip |
|
public |
getStartDTS(initData: InitData, fmp4: Uint8Array): number Determine the base media decode start time, in seconds, for an MP4 fragment. |
|
public |
getTimeStamp(data: Uint8Array): number | undefined Searches for the Elementary Stream timestamp found in the ID3 data chunk |
|
public |
initPTSFn(timestamp: *, timeOffset: *): * Initialize PTS use timestamp unless it is undefined, NaN or Infinity |
|
public |
initTrackConfig(track: DemuxedAudioTrack, observer: HlsEventEmitter, data: Uint8Array, offset: number, audioCodec: string) |
|
public |
isCodecSupportedInMp4(codec: string, type: CodecType): boolean |
|
public |
isCodecType(codec: string, type: CodecType): boolean |
|
public |
isFooter(data: Uint8Array, offset: number): boolean Returns true if an ID3 footer can be found at offset in data |
|
public |
isHeader(data: Uint8Array, offset: number): boolean |
|
public |
isHeader(data: Uint8Array, offset: number): boolean Returns true if an ID3 header can be found at offset in data |
|
public |
isHeader(data: Uint8Array, offset: number): boolean |
|
public |
isHeaderPattern(data: Uint8Array, offset: number): boolean |
|
public |
isHeaderPattern(data: Uint8Array, offset: number): boolean |
|
public |
|
|
public |
|
|
public |
isTimeStampFrame(frame: ID3 frame): * Returns true if the ID3 frame is an Elementary Stream timestamp frame |
|
public |
mapFragmentIntersection(oldDetails: LevelDetails, newDetails: LevelDetails, intersectionFn: FragmentIntersection) |
|
public |
mapPartIntersection(oldParts: undefined, newParts: undefined, intersectionFn: PartIntersection) |
|
public |
mergeConfig(defaultConfig: HlsConfig, userConfig: Partial): HlsConfig |
|
public |
mergeDetails(oldDetails: LevelDetails, newDetails: LevelDetails) |
|
public |
newCue(track: undefined, startTime: number, endTime: number, captionScreen: CaptionScreen): * |
|
public |
offsetStartDTS(initData: InitData, fmp4: Uint8Array, timeOffset: number) |
|
public |
parseFrameHeader(data: Uint8Array, offset: number, pts: number, frameIndex: number, frameDuration: number): {"headerLength": *, "frameLength": *, "stamp": *} |
|
public |
parseHeader(data: Uint8Array, offset: number): {"sampleRate": *, "channelCount": *, "frameLength": *, "samplesPerFrame": *} |
|
public |
parseIMSC1(payload: ArrayBuffer, initPTS: number, timescale: number, callBack: undefined, errorCallBack: undefined) |
|
public |
parseInitSegment(initSegment: Uint8Array): InitData |
|
public |
parseSegmentIndex(initSegment: Uint8Array): {"earliestPresentationTime": *, "timescale": *, "version": *, "referencesCount": *, "references": *, "moovEndOffset": *} |
|
public |
parseTimeStamp(input: *): * |
|
public |
parseWebVTT(vttByteArray: ArrayBuffer, initPTS: number, timescale: number, vttCCs: VTTCCs, cc: number, timeOffset: number, callBack: undefined, errorCallBack: undefined) |
|
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 |
probe(data: Uint8Array, offset: number): boolean |
|
public |
probe(data: Uint8Array, offset: number): boolean |
|
public |
readUint16(buffer: undefined, offset: number): number |
|
public |
readUint32(buffer: undefined, offset: number): number |
|
public |
removeCuesInRange(track: TextTrack, start: number, end: number) |
|
public |
removePadding(array: Uint8Array): Uint8Array |
|
public |
segmentValidRange(data: Uint8Array): SegmentedRange |
|
public |
sendAddTrackEvent(track: TextTrack, videoEl: HTMLMediaElement) |
|
public |
shouldAlignOnDiscontinuities(lastFrag: undefined, lastLevel: Level, details: LevelDetails): boolean |
|
public |
sliceUint8(array: Uint8Array, start: number, end: number): Uint8Array |
|
public |
toMpegTsClockFromTimescale(value: number, srcScale: number): number |
|
public |
toMsFromMpegTsClock(value: number, round: boolean): number |
|
public |
|
|
public |
|
|
public |
updateFragPTSDTS(details: undefined, frag: Fragment, startPTS: number, endPTS: number, startDTS: number, endDTS: number): number |
|
public |
|
|
public |
utf8ArrayToStr(array: *, exitOnNull: boolean): * |
|
public |
writeUint32(buffer: undefined, offset: number, value: number) |
Static Public
public PTSNormalize(value: number, reference: undefined): number source
import {PTSNormalize} from 'hls.js/src/remux/mp4-remuxer.ts'
public TransmuxerWorker(self: undefined) source
import TransmuxerWorker from 'hls.js/src/demux/transmuxer-worker.ts'
Params:
Name | Type | Attribute | Description |
self | undefined |
public addCueToTrack(track: TextTrack, cue: VTTCue) source
import {addCueToTrack} from 'hls.js/src/utils/texttrack-utils.ts'
Params:
Name | Type | Attribute | Description |
track | TextTrack | ||
cue | VTTCue |
public addGroupId(level: Level, type: string, id: string) source
import {addGroupId} from 'hls.js/src/controller/level-helper.ts'
public adjustSliding(oldDetails: LevelDetails, newDetails: LevelDetails) source
import {adjustSliding} from 'hls.js/src/controller/level-helper.ts'
Params:
Name | Type | Attribute | Description |
oldDetails | LevelDetails | ||
newDetails | LevelDetails |
public adjustSlidingStart(sliding: number, details: LevelDetails) source
import {adjustSlidingStart} from 'hls.js/src/utils/discontinuities.ts'
Params:
Name | Type | Attribute | Description |
sliding | number | ||
details | LevelDetails |
public alignPDT(details: LevelDetails, lastDetails: LevelDetails) source
import {alignPDT} from 'hls.js/src/utils/discontinuities.ts'
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 | LevelDetails | ||
lastDetails | LevelDetails |
public alignStream(lastFrag: undefined, lastLevel: undefined, details: LevelDetails) source
import {alignStream} from 'hls.js/src/utils/discontinuities.ts'
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 | undefined | ||
lastLevel | undefined | ||
details | LevelDetails |
public appendFrame(track: DemuxedAudioTrack, data: Uint8Array, offset: number, pts: number, frameIndex: number): {"sample": *, "length": *} source
import {appendFrame} from 'hls.js/src/demux/adts.ts'
Params:
Name | Type | Attribute | Description |
track | DemuxedAudioTrack | ||
data | Uint8Array | ||
offset | number | ||
pts | number | ||
frameIndex | number |
Return:
{"sample": *, "length": *} |
public appendFrame(track: DemuxedAudioTrack, data: Uint8Array, offset: number, pts: number, frameIndex: number): {"sample": *, "length": *} source
import {appendFrame} from 'hls.js/src/demux/mpegaudio.ts'
Params:
Name | Type | Attribute | Description |
track | DemuxedAudioTrack | ||
data | Uint8Array | ||
offset | number | ||
pts | number | ||
frameIndex | number |
Return:
{"sample": *, "length": *} |
public appendUint8Array(data1: Uint8Array, data2: Uint8Array): Uint8Array source
import {appendUint8Array} from 'hls.js/src/utils/mp4-tools.ts'
Params:
Name | Type | Attribute | Description |
data1 | Uint8Array | ||
data2 | Uint8Array |
public assignTrackIdsByGroup(tracks: undefined) source
import {assignTrackIdsByGroup} from 'hls.js/src/controller/level-helper.ts'
Params:
Name | Type | Attribute | Description |
tracks | undefined |
public bin2str(buffer: Uint8Array): string source
import {bin2str} from 'hls.js/src/utils/mp4-tools.ts'
Params:
Name | Type | Attribute | Description |
buffer | Uint8Array |
public canGetFrameLength(data: Uint8Array, offset: number): boolean source
import {canGetFrameLength} from 'hls.js/src/demux/adts.ts'
Params:
Name | Type | Attribute | Description |
data | Uint8Array | ||
offset | number |
public canParse(data: Uint8Array, offset: number): boolean source
import {canParse} from 'hls.js/src/demux/adts.ts'
Params:
Name | Type | Attribute | Description |
data | Uint8Array | ||
offset | number |
public canParse(data: *, offset: *): * source
import {canParse} from 'hls.js/src/demux/id3.ts'
Params:
Name | Type | Attribute | Description |
data | * | ||
offset | * |
Return:
* |
public canParse(data: Uint8Array, offset: number): boolean source
import {canParse} from 'hls.js/src/demux/mpegaudio.ts'
Params:
Name | Type | Attribute | Description |
data | Uint8Array | ||
offset | number |
public changeTypeSupported(): boolean source
import {changeTypeSupported} from 'hls.js/src/is-supported.ts'
public clearCurrentCues(track: TextTrack) source
import {clearCurrentCues} from 'hls.js/src/utils/texttrack-utils.ts'
Params:
Name | Type | Attribute | Description |
track | TextTrack |
public computeRawDurationFromSamples(trun: undefined): number source
import {computeRawDurationFromSamples} from 'hls.js/src/utils/mp4-tools.ts'
Params:
Name | Type | Attribute | Description |
trun | undefined |
public computeReloadInterval(newDetails: LevelDetails, stats: LoaderStats): number source
import {computeReloadInterval} from 'hls.js/src/controller/level-helper.ts'
Params:
Name | Type | Attribute | Description |
newDetails | LevelDetails | ||
stats | LoaderStats |
public decodeFrame(frame: *): * source
import {decodeFrame} from 'hls.js/src/demux/id3.ts'
Params:
Name | Type | Attribute | Description |
frame | * |
Return:
* |
public discardEPB(data: Uint8Array): Uint8Array source
import {discardEPB} from 'hls.js/src/demux/tsdemuxer.ts'
remove Emulation Prevention bytes from a RBSP
Params:
Name | Type | Attribute | Description |
data | Uint8Array |
public dummyTrack(): DemuxedTrack source
import {dummyTrack} from 'hls.js/src/demux/dummy-demuxed-track.ts'
Return:
DemuxedTrack |
public enableLogs(debugConfig: undefined) source
import {enableLogs} from 'hls.js/src/utils/logger.ts'
Params:
Name | Type | Attribute | Description |
debugConfig | undefined |
public enableStreamingMode(config: undefined) source
import {enableStreamingMode} from 'hls.js/src/config.ts'
Params:
Name | Type | Attribute | Description |
config | undefined |
public fetchSupported(): boolean source
import {fetchSupported} from 'hls.js/src/utils/fetch-loader.ts'
public findBox(input: undefined, path: Array): Array source
import {findBox} from 'hls.js/src/utils/mp4-tools.ts'
public findDiscontinuousReferenceFrag(prevDetails: LevelDetails, curDetails: LevelDetails): * source
import {findDiscontinuousReferenceFrag} from 'hls.js/src/utils/discontinuities.ts'
Params:
Name | Type | Attribute | Description |
prevDetails | LevelDetails | ||
curDetails | LevelDetails |
Return:
* |
public findFirstFragWithCC(fragments: undefined, cc: number): * source
import {findFirstFragWithCC} from 'hls.js/src/utils/discontinuities.ts'
Return:
* |
public findFragWithCC(fragments: undefined, CC: undefined): * source
import {findFragWithCC} from 'hls.js/src/controller/fragment-finders.ts'
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: undefined, 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 generateCueId(startTime: number, endTime: number, text: string): * source
import {generateCueId} from 'hls.js/src/utils/webvtt-parser.ts'
Return:
* |
public getAudioConfig(observer: undefined, data: Uint8Array, offset: number, audioCodec: string): {"config": *, "samplerate": *, "channelCount": *, "codec": *, "manifestCodec": *} source
import {getAudioConfig} from 'hls.js/src/demux/adts.ts'
Params:
Name | Type | Attribute | Description |
observer | undefined | ||
data | Uint8Array | ||
offset | number | ||
audioCodec | string |
Return:
{"config": *, "samplerate": *, "channelCount": *, "codec": *, "manifestCodec": *} |
public getCuesInRange(cues: undefined, start: number, end: number): * source
import {getCuesInRange} from 'hls.js/src/utils/texttrack-utils.ts'
Return:
* |
public getDuration(data: Uint8Array, initData: InitData): * source
import {getDuration} from 'hls.js/src/utils/mp4-tools.ts'
Params:
Name | Type | Attribute | Description |
data | Uint8Array | ||
initData | InitData |
Return:
* |
public getFragmentWithSN(level: Level, sn: number): * source
import {getFragmentWithSN} from 'hls.js/src/controller/level-helper.ts'
Return:
* |
public getFrameDuration(samplerate: number): number source
import {getFrameDuration} from 'hls.js/src/demux/adts.ts'
Params:
Name | Type | Attribute | Description |
samplerate | number |
public getFullFrameLength(data: Uint8Array, offset: number): number source
import {getFullFrameLength} from 'hls.js/src/demux/adts.ts'
Params:
Name | Type | Attribute | Description |
data | Uint8Array | ||
offset | number |
public getHeaderLength(data: Uint8Array, offset: number): number source
import {getHeaderLength} from 'hls.js/src/demux/adts.ts'
Params:
Name | Type | Attribute | Description |
data | Uint8Array | ||
offset | number |
public getID3Data(data: Uint8Array, offset: number): Uint8Array | undefined source
import {getID3Data} from 'hls.js/src/demux/id3.ts'
Returns any adjacent ID3 tags found in data starting at offset, as one block of data
Params:
Name | Type | Attribute | Description |
data | Uint8Array | The data to search in |
|
offset | number | The offset at which to start searching |
Return:
Uint8Array | undefined | The block of data containing any ID3 tags found or undefined if no header is found at the starting offset |
public getID3Frames(id3Data: Uint8Array): ID3.Frame[] source
import {getID3Frames} from 'hls.js/src/demux/id3.ts'
Returns an array of ID3 frames found in all the ID3 tags in the id3Data
Params:
Name | Type | Attribute | Description |
id3Data | Uint8Array | The ID3 data containing one or more ID3 tags |
Return:
ID3.Frame[] | Array of ID3 frame objects |
public getMediaSource(): * source
import {getMediaSource} from 'hls.js/src/utils/mediasource-helper.ts'
MediaSource helper
Return:
* |
public getPartWith(level: Level, sn: number, partIndex: number): * source
import {getPartWith} from 'hls.js/src/controller/level-helper.ts'
Return:
* |
public getSkipValue(details: LevelDetails, msn: number): HlsSkip source
import {getSkipValue} from 'hls.js/src/types/level.ts'
Params:
Name | Type | Attribute | Description |
details | LevelDetails | ||
msn | number |
Return:
HlsSkip |
public getStartDTS(initData: InitData, fmp4: Uint8Array): number source
import {getStartDTS} from 'hls.js/src/utils/mp4-tools.ts'
Determine the base media decode start time, in seconds, for an MP4 fragment. If multiple fragments are specified, the earliest time is returned.
The base media decode time can be parsed from track fragment metadata:
moof > traf > tfdt.baseMediaDecodeTime
It requires the timescale value from the mdhd to interpret.
Params:
Name | Type | Attribute | Description |
initData | InitData | ||
fmp4 | Uint8Array |
public getTimeStamp(data: Uint8Array): number | undefined source
import {getTimeStamp} from 'hls.js/src/demux/id3.ts'
Searches for the Elementary Stream timestamp found in the ID3 data chunk
Params:
Name | Type | Attribute | Description |
data | Uint8Array | Block of data containing one or more ID3 tags |
Return:
number | undefined | The timestamp |
public initPTSFn(timestamp: *, timeOffset: *): * source
import {initPTSFn} from 'hls.js/src/demux/base-audio-demuxer.ts'
Initialize PTS
use timestamp unless it is undefined, NaN or Infinity
Params:
Name | Type | Attribute | Description |
timestamp | * | ||
timeOffset | * |
Return:
* |
public initTrackConfig(track: DemuxedAudioTrack, observer: HlsEventEmitter, data: Uint8Array, offset: number, audioCodec: string) source
import {initTrackConfig} from 'hls.js/src/demux/adts.ts'
Params:
Name | Type | Attribute | Description |
track | DemuxedAudioTrack | ||
observer | HlsEventEmitter | ||
data | Uint8Array | ||
offset | number | ||
audioCodec | string |
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 isFooter(data: Uint8Array, offset: number): boolean source
import {isFooter} from 'hls.js/src/demux/id3.ts'
Returns true if an ID3 footer can be found at offset in data
Params:
Name | Type | Attribute | Description |
data | Uint8Array | The data to search in |
|
offset | number | The offset at which to start searching |
public isHeader(data: Uint8Array, offset: number): boolean source
import {isHeader} from 'hls.js/src/demux/adts.ts'
Params:
Name | Type | Attribute | Description |
data | Uint8Array | ||
offset | number |
public isHeader(data: Uint8Array, offset: number): boolean source
import {isHeader} from 'hls.js/src/demux/id3.ts'
Returns true if an ID3 header can be found at offset in data
Params:
Name | Type | Attribute | Description |
data | Uint8Array | The data to search in |
|
offset | number | The offset at which to start searching |
public isHeader(data: Uint8Array, offset: number): boolean source
import {isHeader} from 'hls.js/src/demux/mpegaudio.ts'
Params:
Name | Type | Attribute | Description |
data | Uint8Array | ||
offset | number |
public isHeaderPattern(data: Uint8Array, offset: number): boolean source
import {isHeaderPattern} from 'hls.js/src/demux/adts.ts'
Params:
Name | Type | Attribute | Description |
data | Uint8Array | ||
offset | number |
public isHeaderPattern(data: Uint8Array, offset: number): boolean source
import {isHeaderPattern} from 'hls.js/src/demux/mpegaudio.ts'
Params:
Name | Type | Attribute | Description |
data | Uint8Array | ||
offset | number |
public isPromise(p: undefined): * source
import {isPromise} from 'hls.js/src/demux/transmuxer.ts'
Params:
Name | Type | Attribute | Description |
p | undefined |
Return:
* |
public isTimeStampFrame(frame: ID3 frame): * source
import {isTimeStampFrame} from 'hls.js/src/demux/id3.ts'
Returns true if the ID3 frame is an Elementary Stream timestamp frame
Params:
Name | Type | Attribute | Description |
frame | ID3 frame |
Return:
* |
public mapFragmentIntersection(oldDetails: LevelDetails, newDetails: LevelDetails, intersectionFn: FragmentIntersection) source
import {mapFragmentIntersection} from 'hls.js/src/controller/level-helper.ts'
Params:
Name | Type | Attribute | Description |
oldDetails | LevelDetails | ||
newDetails | LevelDetails | ||
intersectionFn | FragmentIntersection |
public mapPartIntersection(oldParts: undefined, newParts: undefined, intersectionFn: PartIntersection) source
import {mapPartIntersection} from 'hls.js/src/controller/level-helper.ts'
public mergeConfig(defaultConfig: HlsConfig, userConfig: Partial): HlsConfig source
import {mergeConfig} from 'hls.js/src/config.ts'
Params:
Name | Type | Attribute | Description |
defaultConfig | HlsConfig | ||
userConfig | Partial |
Return:
HlsConfig |
public mergeDetails(oldDetails: LevelDetails, newDetails: LevelDetails) source
import {mergeDetails} from 'hls.js/src/controller/level-helper.ts'
Params:
Name | Type | Attribute | Description |
oldDetails | LevelDetails | ||
newDetails | LevelDetails |
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 offsetStartDTS(initData: InitData, fmp4: Uint8Array, timeOffset: number) source
import {offsetStartDTS} from 'hls.js/src/utils/mp4-tools.ts'
Params:
Name | Type | Attribute | Description |
initData | InitData | ||
fmp4 | Uint8Array | ||
timeOffset | number |
public parseFrameHeader(data: Uint8Array, offset: number, pts: number, frameIndex: number, frameDuration: number): {"headerLength": *, "frameLength": *, "stamp": *} source
import {parseFrameHeader} from 'hls.js/src/demux/adts.ts'
Params:
Name | Type | Attribute | Description |
data | Uint8Array | ||
offset | number | ||
pts | number | ||
frameIndex | number | ||
frameDuration | number |
Return:
{"headerLength": *, "frameLength": *, "stamp": *} |
public parseHeader(data: Uint8Array, offset: number): {"sampleRate": *, "channelCount": *, "frameLength": *, "samplesPerFrame": *} source
import {parseHeader} from 'hls.js/src/demux/mpegaudio.ts'
Params:
Name | Type | Attribute | Description |
data | Uint8Array | ||
offset | number |
Return:
{"sampleRate": *, "channelCount": *, "frameLength": *, "samplesPerFrame": *} |
public parseIMSC1(payload: ArrayBuffer, initPTS: number, timescale: number, callBack: undefined, errorCallBack: undefined) source
import {parseIMSC1} from 'hls.js/src/utils/imsc1-ttml-parser.ts'
Params:
Name | Type | Attribute | Description |
payload | ArrayBuffer | ||
initPTS | number | ||
timescale | number | ||
callBack | undefined | ||
errorCallBack | undefined |
public parseInitSegment(initSegment: Uint8Array): InitData source
import {parseInitSegment} from 'hls.js/src/utils/mp4-tools.ts'
Params:
Name | Type | Attribute | Description |
initSegment | Uint8Array |
Return:
InitData |
public parseSegmentIndex(initSegment: Uint8Array): {"earliestPresentationTime": *, "timescale": *, "version": *, "referencesCount": *, "references": *, "moovEndOffset": *} source
import {parseSegmentIndex} from 'hls.js/src/utils/mp4-tools.ts'
Params:
Name | Type | Attribute | Description |
initSegment | Uint8Array |
Return:
{"earliestPresentationTime": *, "timescale": *, "version": *, "referencesCount": *, "references": *, "moovEndOffset": *} |
public parseTimeStamp(input: *): * source
import {parseTimeStamp} from 'hls.js/src/utils/vttparser.js'
Params:
Name | Type | Attribute | Description |
input | * |
Return:
* |
public parseWebVTT(vttByteArray: ArrayBuffer, initPTS: number, timescale: number, vttCCs: VTTCCs, cc: number, timeOffset: number, callBack: undefined, errorCallBack: undefined) source
import {parseWebVTT} from 'hls.js/src/utils/webvtt-parser.ts'
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: Uint8Array, offset: number): boolean source
import {probe} from 'hls.js/src/demux/adts.ts'
Params:
Name | Type | Attribute | Description |
data | Uint8Array | ||
offset | number |
public probe(data: Uint8Array, offset: number): boolean source
import {probe} from 'hls.js/src/demux/mpegaudio.ts'
Params:
Name | Type | Attribute | Description |
data | Uint8Array | ||
offset | number |
public readUint16(buffer: undefined, offset: number): number source
import {readUint16} from 'hls.js/src/utils/mp4-tools.ts'
public readUint32(buffer: undefined, offset: number): number source
import {readUint32} from 'hls.js/src/utils/mp4-tools.ts'
public removeCuesInRange(track: TextTrack, start: number, end: number) source
import {removeCuesInRange} from 'hls.js/src/utils/texttrack-utils.ts'
public removePadding(array: Uint8Array): Uint8Array source
import {removePadding} from 'hls.js/src/crypt/aes-decryptor.ts'
Params:
Name | Type | Attribute | Description |
array | Uint8Array |
public segmentValidRange(data: Uint8Array): SegmentedRange source
import {segmentValidRange} from 'hls.js/src/utils/mp4-tools.ts'
Params:
Name | Type | Attribute | Description |
data | Uint8Array |
Return:
SegmentedRange |
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: undefined, lastLevel: Level, details: LevelDetails): boolean source
import {shouldAlignOnDiscontinuities} from 'hls.js/src/utils/discontinuities.ts'
Params:
Name | Type | Attribute | Description |
lastFrag | undefined | ||
lastLevel | Level | ||
details | LevelDetails |
public sliceUint8(array: Uint8Array, start: number, end: number): Uint8Array source
import {sliceUint8} from 'hls.js/src/utils/typed-array.ts'
Params:
Name | Type | Attribute | Description |
array | Uint8Array | ||
start | number | ||
end | number |
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: undefined, frag: Fragment, startPTS: number, endPTS: number, startDTS: number, endDTS: number): number source
import {updateFragPTSDTS} from 'hls.js/src/controller/level-helper.ts'
public updatePTS(fragments: undefined, fromIdx: number, toIdx: number) source
import {updatePTS} from 'hls.js/src/controller/level-helper.ts'
public utf8ArrayToStr(array: *, exitOnNull: boolean): * source
import {utf8ArrayToStr} from 'hls.js/src/demux/id3.ts'
Params:
Name | Type | Attribute | Description |
array | * | ||
exitOnNull | boolean |
|
Return:
* |