Home Reference Source

References

summary
public

C Hls

public

Sub-class specialization of EventHandler base class.

public
public

F mergeConfig(defaultConfig: HlsConfig, userConfig: Partial): HlsConfig

public
public
public

V hlsDefaultConfig: {"autoStartLoad": boolean, "startPosition": *, "defaultAudioCodec": *, "debug": *, "capLevelOnFPSDrop": *, "capLevelToPlayerSize": *, "initialLiveManifestSize": number, "maxBufferLength": number, "backBufferLength": *, "maxBufferSize": *, "maxBufferHole": number, "highBufferWatchdogPeriod": number, "nudgeOffset": number, "nudgeMaxRetry": number, "maxFragLookUpTolerance": number, "liveSyncDurationCount": number, "liveMaxLatencyDurationCount": *, "liveSyncDuration": *, "liveMaxLatencyDuration": *, "maxLiveSyncPlaybackRate": number, "liveDurationInfinity": *, "liveBackBufferLength": *, "maxMaxBufferLength": number, "enableWorker": boolean, "enableSoftwareAES": boolean, "manifestLoadingTimeOut": number, "manifestLoadingMaxRetry": number, "manifestLoadingRetryDelay": number, "manifestLoadingMaxRetryTimeout": number, "startLevel": *, "levelLoadingTimeOut": number, "levelLoadingMaxRetry": number, "levelLoadingRetryDelay": number, "levelLoadingMaxRetryTimeout": number, "fragLoadingTimeOut": number, "fragLoadingMaxRetry": number, "fragLoadingRetryDelay": number, "fragLoadingMaxRetryTimeout": number, "startFragPrefetch": *, "fpsDroppedMonitoringPeriod": number, "fpsDroppedMonitoringThreshold": number, "appendErrorMaxRetry": number, "loader": *, "fLoader": *, "pLoader": *, "xhrSetup": *, "licenseXhrSetup": *, "licenseResponseCallback": *, "abrController": *, "bufferController": *, "capLevelController": *, "fpsController": *, "stretchShortVideoTrack": *, "maxAudioFramesDrift": number, "forceKeyFrameOnDiscontinuity": boolean, "abrEwmaFastLive": number, "abrEwmaSlowLive": number, "abrEwmaFastVoD": number, "abrEwmaSlowVoD": number, "abrEwmaDefaultEstimate": number, "abrBandWidthFactor": number, "abrBandWidthUpFactor": number, "abrMaxWithRealBitrate": *, "maxStarvationDelay": number, "maxLoadingDelay": number, "minAutoBitrate": *, "emeEnabled": *, "widevineLicenseUrl": *, "drmSystemOptions": *, "requestMediaKeySystemAccessFunc": *, "testBandwidth": boolean, "progressive": *, "lowLatencyMode": boolean, ...timelineConfig: Object, "subtitleStreamController": *, "subtitleTrackController": *, "timelineController": *, "audioStreamController": *, "audioTrackController": *, "emeController": *}

public

controller

summary
public
public
public
public
public
public
public
public
public

Controller to deal with encrypted media extensions (EME)

public
public
public
public
public
public
public
public
public
public
public

F findFragWithCC(fragments: undefined, cc: number): *

public

F findFragmentByPDT(fragments: Array, PDTValue: undefined, maxFragLookUpTolerance: number): *

Returns first fragment whose endPdt value exceeds the given PDT.

public

F 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

F 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

F 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

F addGroupId(level: Level, type: string, id: string)

public

F addSliding(details: LevelDetails, start: number)

public

F adjustSliding(oldDetails: LevelDetails, newDetails: LevelDetails)

public
public

F computeReloadInterval(newDetails: LevelDetails, stats: LoaderStats): number

public

F getFragmentWithSN(level: Level, sn: number, fragCurrent: undefined): *

public

F getPartWith(level: Level, sn: number, partIndex: number): *

public

F mapFragmentIntersection(oldDetails: LevelDetails, newDetails: LevelDetails, intersectionFn: FragmentIntersection)

public

F mapPartIntersection(oldParts: undefined, newParts: undefined, intersectionFn: PartIntersection)

public

F mergeDetails(oldDetails: LevelDetails, newDetails: LevelDetails)

public

F updateFragPTSDTS(details: undefined, frag: Fragment, startPTS: number, endPTS: number, startDTS: number, endDTS: number): number

public

F updatePTS(fragments: undefined, fromIdx: number, toIdx: number)

public

V State: {"STOPPED": string, "IDLE": string, "KEY_LOADING": string, "FRAG_LOADING": string, "FRAG_LOADING_WAITING_RETRY": string, "WAITING_TRACK": string, "PARSING": string, "PARSED": string, "BACKTRACKING": string, "ENDED": string, "ERROR": string, "WAITING_INIT_PTS": string, "WAITING_LEVEL": string}

public
public
public
public

crypt

summary
public
public
public
public
public

demux

summary
public
public
public
public
public
public
public
public
public
public
public
public
public

F appendFrame(track: DemuxedAudioTrack, data: Uint8Array, offset: number, pts: number, frameIndex: number): {"sample": *, "length": *, "missing": *}

public
public

F canParse(data: Uint8Array, offset: number): boolean

public

F getAudioConfig(observer: undefined, data: Uint8Array, offset: number, audioCodec: string): {"config": *, "samplerate": *, "channelCount": *, "codec": *, "manifestCodec": *}

public

F getFrameDuration(samplerate: number): number

public
public
public

F initTrackConfig(track: DemuxedAudioTrack, observer: HlsEventEmitter, data: Uint8Array, offset: number, audioCodec: string)

public

F isHeader(data: Uint8Array, offset: number): boolean

public
public

F parseFrameHeader(data: Uint8Array, offset: number, pts: number, frameIndex: number, frameDuration: number): {"headerLength": *, "frameLength": *, "stamp": *}

public

F probe(data: Uint8Array, offset: number): boolean

public

F initPTSFn(timestamp: *, timeOffset: *): *

Initialize PTS

use timestamp unless it is undefined, NaN or Infinity

public

F dummyTrack(): DemuxedTrack

public

F canParse(data: *, offset: *): *

public

F decodeFrame(frame: *): *

public

F getID3Data(data: Uint8Array, offset: number): Uint8Array | undefined

Returns any adjacent ID3 tags found in data starting at offset, as one block of data

public

F getID3Frames(id3Data: Uint8Array): ID3.Frame[]

Returns an array of ID3 frames found in all the ID3 tags in the id3Data

public

F getTimeStamp(data: Uint8Array): number | undefined

Searches for the Elementary Stream timestamp found in the ID3 data chunk

public

F isFooter(data: Uint8Array, offset: number): boolean

Returns true if an ID3 footer can be found at offset in data

public

F isHeader(data: Uint8Array, offset: number): boolean

Returns true if an ID3 header can be found at offset in data

public

F isTimeStampFrame(frame: ID3 frame): *

Returns true if the ID3 frame is an Elementary Stream timestamp frame

public

F utf8ArrayToStr(array: *, exitOnNull: boolean): *

public

F appendFrame(track: DemuxedAudioTrack, data: Uint8Array, offset: number, pts: number, frameIndex: number): {"sample": *, "length": *, "missing": *}

public

F canParse(data: Uint8Array, offset: number): boolean

public

F isHeader(data: Uint8Array, offset: number): boolean

public
public

F parseHeader(data: Uint8Array, offset: number): {"sampleRate": *, "channelCount": *, "frameLength": *, "samplesPerFrame": *}

public

F probe(data: Uint8Array, offset: number): boolean

public
public

F isPromise(p: undefined): *

public

remove Emulation Prevention bytes from a RBSP

public

V testables: {"decodeTextFrame": *}

loader

summary
public
public
public
public
public

C Part

public
public
public
public
public
public

performance

summary
public

polyfills

summary
public
public

remux

summary
public

C AAC

AAC helper

public

C MP4

public
public
public

F normalizePts(value: number, reference: undefined): number

types

summary
public
public

C Level

public
public

F getSkipValue(details: LevelDetails, msn: number): HlsSkip

utils

summary
public
public
public

Keep a CEA-608 screen of 32x15 styled characters

public
public

C Row

CEA-608 row consisting of NR_COLS instances of StyledUnicodeChar.

public
public
public

C EWMA

public
public
public
public
public

F isCodecSupportedInMp4(codec: string, type: CodecType): boolean

public

F isCodecType(codec: string, type: CodecType): boolean

public

F adjustSlidingStart(sliding: number, details: LevelDetails)

public

F 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

F 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

F findDiscontinuousReferenceFrag(prevDetails: LevelDetails, curDetails: LevelDetails): *

public

F findFirstFragWithCC(fragments: undefined, cc: number): *

public

F shouldAlignOnDiscontinuities(lastFrag: undefined, lastLevel: Level, details: LevelDetails): boolean

public
public

F parseIMSC1(payload: ArrayBuffer, initPTS: number, timescale: number, callBack: undefined, errorCallBack: undefined)

public

F enableLogs(debugConfig: undefined)

public

MediaSource helper

public
public
public
public

F findBox(input: undefined, path: Array): Array

public

F getDuration(data: Uint8Array, initData: InitData): *

public

F getStartDTS(initData: InitData, fmp4: Uint8Array): number

Determine the base media decode start time, in seconds, for an MP4 fragment.

public

F offsetStartDTS(initData: InitData, fmp4: Uint8Array, timeOffset: number)

public

F parseInitSegment(initSegment: Uint8Array): InitData

public

F parseSegmentIndex(initSegment: Uint8Array): {"earliestPresentationTime": *, "timescale": *, "version": *, "referencesCount": *, "references": *, "moovEndOffset": *}

public

F readUint16(buffer: undefined, offset: number): number

public

F readUint32(buffer: undefined, offset: number): number

public

F segmentValidRange(data: Uint8Array): SegmentedRange

public

F writeUint32(buffer: undefined, offset: number, value: number)

public

F addCueToTrack(track: TextTrack, cue: VTTCue)

public

F clearCurrentCues(track: TextTrack)

public

F getCuesInRange(cues: undefined, start: number, end: number): *

public

F removeCuesInRange(track: TextTrack, start: number, end: number)

public

F sendAddTrackEvent(track: TextTrack, videoEl: HTMLMediaElement)

public
public
public

F toTimescaleFromBase(value: undefined, destScale: number, srcBase: number, round: boolean): number

public

F toTimescaleFromScale(value: undefined, destScale: number, srcScale: number, round: boolean): number

public

F sliceUint8(array: Uint8Array, start: number, end: number): Uint8Array

public
public

F parseTimeStamp(input: string): *

public

F generateCueId(startTime: number, endTime: number, text: string): *

public

F parseWebVTT(vttByteArray: ArrayBuffer, initPTS: number, timescale: number, vttCCs: VTTCCs, cc: number, timeOffset: number, callBack: undefined, errorCallBack: undefined)

public

V BinarySearch: {"search": *}

public

V Cues: {"newCue": function}

public

V Hex: {"hexDump": *}

hex dump helper class

public
public

V logger: *

public
public

V TimeRanges: {"toString": *}

TimeRanges to string helper