Home Reference Source

References

summary
public
public

C Hls

public

Simple adapter sub-class of Nodejs-like EventEmitter.

public

Sub-class specialization of EventHandler base class.

public
public

V hlsDefaultConfig: {"autoStartLoad": boolean, "startPosition": *, "defaultAudioCodec": *, "debug": *, "capLevelOnFPSDrop": *, "capLevelToPlayerSize": *, "initialLiveManifestSize": number, "maxBufferLength": number, "maxBufferSize": *, "maxBufferHole": number, "lowBufferWatchdogPeriod": number, "highBufferWatchdogPeriod": number, "nudgeOffset": number, "nudgeMaxRetry": number, "maxFragLookUpTolerance": number, "liveSyncDurationCount": number, "liveMaxLatencyDurationCount": *, "liveSyncDuration": *, "liveMaxLatencyDuration": *, "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": *, "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, ...timelineConfig: Object, "subtitleStreamController": *, "subtitleTrackController": *, "timelineController": *, "audioStreamController": *, "audioTrackController": *, "emeController": *}

public

V HlsEvents: {"MEDIA_ATTACHING": string, "MEDIA_ATTACHED": string, "MEDIA_DETACHING": string, "MEDIA_DETACHED": string, "BUFFER_RESET": string, "BUFFER_CODECS": string, "BUFFER_CREATED": string, "BUFFER_APPENDING": string, "BUFFER_APPENDED": string, "BUFFER_EOS": string, "BUFFER_FLUSHING": string, "BUFFER_FLUSHED": string, "MANIFEST_LOADING": string, "MANIFEST_LOADED": string, "MANIFEST_PARSED": string, "LEVEL_SWITCHING": string, "LEVEL_SWITCHED": string, "LEVEL_LOADING": string, "LEVEL_LOADED": string, "LEVEL_UPDATED": string, "LEVEL_PTS_UPDATED": string, "LEVELS_UPDATED": string, "AUDIO_TRACKS_UPDATED": string, "AUDIO_TRACK_SWITCHING": string, "AUDIO_TRACK_SWITCHED": string, "AUDIO_TRACK_LOADING": string, "AUDIO_TRACK_LOADED": string, "SUBTITLE_TRACKS_UPDATED": string, "SUBTITLE_TRACK_SWITCH": string, "SUBTITLE_TRACK_LOADING": string, "SUBTITLE_TRACK_LOADED": string, "SUBTITLE_FRAG_PROCESSED": string, "CUES_PARSED": string, "NON_NATIVE_TEXT_TRACKS_FOUND": string, "INIT_PTS_FOUND": string, "FRAG_LOADING": string, "FRAG_LOAD_PROGRESS": string, "FRAG_LOAD_EMERGENCY_ABORTED": string, "FRAG_LOADED": string, "FRAG_DECRYPTED": string, "FRAG_PARSING_INIT_SEGMENT": string, "FRAG_PARSING_USERDATA": string, "FRAG_PARSING_METADATA": string, "FRAG_PARSING_DATA": string, "FRAG_PARSED": string, "FRAG_BUFFERED": string, "FRAG_CHANGED": string, "FPS_DROP": string, "FPS_DROP_LEVEL_CAPPING": string, "ERROR": string, "DESTROYING": string, "KEY_LOADING": string, "KEY_LOADED": string, "STREAM_STATE_TRANSITION": string, "LIVE_BACK_BUFFER_REACHED": string}

public

controller

summary
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

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

Returns first fragment whose endPdt value exceeds the given PDT.

public

F 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

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: *, type: *, id: *)

public

F adjustSliding(oldPlaylist: *, newPlaylist: *)

public

F computeReloadInterval(currentPlaylist: *, newPlaylist: *, lastRequestTime: *): *

public

F mapFragmentIntersection(oldPlaylist: *, newPlaylist: *, intersectionFn: *)

public

F mergeDetails(oldDetails: *, newDetails: *)

public

F mergeSubtitlePlaylists(oldPlaylist: *, newPlaylist: *, referenceStart: number)

public

F updateFragPTSDTS(details: *, frag: *, startPTS: *, endPTS: *, startDTS: *, endDTS: *): *

public

F updatePTS(fragments: *, fromIdx: *, toIdx: *)

public

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

public

V FragmentState: {"NOT_LOADED": string, "APPENDING": string, "PARTIAL": string, "OK": string}

public
public
public
public

crypt

summary
public
public
public
public
public

F removePadding(buffer: *): *

demux

summary
public
public
public
public
public

C ID3

ID3 parser

public
public
public
public
public

F appendFrame(track: *, data: *, offset: *, pts: *, frameIndex: *): *

public

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

public

F getFrameDuration(samplerate: *): *

public

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

public

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

public

F initTrackConfig(track: *, observer: *, data: *, offset: *, audioCodec: *)

public

F isHeader(data: *, offset: *): boolean

public

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

public

F parseFrameHeader(data: *, offset: *, pts: *, frameIndex: *, frameDuration: *): *

public

F probe(data: *, offset: *): boolean

public

F DemuxerWorker(self: *)

public
public

V MpegAudio: {"BitratesMap": *, "SamplingRateMap": *, "SamplesCoefficients": *, "BytesInSlot": *, "appendFrame": *, "parseHeader": *, "isHeaderPattern": *, "isHeader": *, "probe": *}

MPEG parser helper

loader

summary
public
public
public
public
public

C Level

public
public

polyfills

summary
public
public

remux

summary
public

C AAC

AAC helper

public

dummy remuxer

public

C MP4

public
public

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

C EWMA

public

Fetch based loader timeout / abort / onprogress not supported for now timeout / abort : some ideas here : https://github.com/whatwg/fetch/issues/20#issuecomment-196113354 but still it is not bullet proof as it fails to avoid data waste....

public
public
public

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

public

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

public

F newCue(track: undefined, startTime: number, endTime: number, captionScreen: CaptionScreen): *

public

F adjustPts(sliding: *, details: *)

public

F 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

F alignPDT(details: *, lastDetails: *)

Computes the PTS of a new level's fragments using the difference in Program Date Time from the last level.

public

F 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

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

public

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

public

F findFragWithCC(fragments: *, CC: *): *

public

F shouldAlignOnDiscontinuities(lastFrag: *, lastLevel: *, details: *): *

public

F getSelfScope(): *

public

F enableLogs(debugConfig: *)

public

MediaSource helper

public

F clearCurrentCues(track: TextTrack)

public

F getClosestCue(cues: undefined, time: number): TextTrackCue

Given a list of Cues, finds the closest cue matching the given time.

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 VTTParser()

public

F fixLineBreaks(input: *): *

public

V BinarySearch: {"search": *}

public

V Hex: {"hexDump": *}

hex dump helper class

public

V logger: *

public
public

V TimeRanges: {"toString": *}

TimeRanges to string helper

public

V WebVTTParser: {"parse": *}