Home > hls.js > BaseStreamController

BaseStreamController class

Signature:

export default class BaseStreamController extends TaskLoop implements NetworkComponentAPI 

Extends: TaskLoop

Implements: NetworkComponentAPI

Constructors

Constructor

Modifiers

Description

(constructor)(hls, fragmentTracker, keyLoader, logPrefix, playlistType)

Constructs a new instance of the BaseStreamController class

Properties

Property

Modifiers

Type

Description

_state

protected

string

bitrateTest

protected

boolean

buffering

protected

boolean

bufferingEnabled

readonly

boolean

config

protected

HlsConfig

decrypter

protected

Decrypter

fragCurrent

protected

Fragment | null

fragmentLoader

protected

FragmentLoader

fragmentTracker

protected

FragmentTracker

fragPrevious

protected

MediaFragment | null

hls

protected

Hls

initPTS

protected

RationalTimestamp[]

keyLoader

protected

KeyLoader

lastCurrentTime

protected

number

levelLastLoaded

protected

Level | null

levels

protected

Array<Level> | null

loadingParts

protected

boolean

media

protected

HTMLMediaElement | null

mediaBuffer

protected

Bufferable | null

nextLoadPosition

protected

number

onMediaEnded

protected

() => void

onMediaSeeking

protected

() => void

playlistType

protected

PlaylistLevelType

retryDate

protected

number

startFragRequested

protected

boolean

startPosition

protected

number

startPositionValue

readonly

number

startTimeOffset

protected

number | null

state

string

transmuxer

protected

TransmuxerInterface | null

Methods

Method

Modifiers

Description

_doFragLoad(frag, level, targetBufferTime, progressCallback)

protected

_handleFragmentLoadComplete(fragLoadedEndData)

protected

_handleFragmentLoadProgress(frag)

protected

_handleTransmuxerFlush(chunkMeta)

protected

_loadInitSegment(fragment, level)

protected

_streamEnded(bufferInfo, levelDetails)

protected

afterBufferFlushed(media, bufferType, playlistType)

protected

alignPlaylists(details, previousDetails, switchDetails)

protected

bufferFragmentData(data, frag, part, chunkMeta, noBacktracking)

protected

checkLiveUpdate(details)

protected

clearTrackerIfNeeded(frag)

protected

doTick()

protected

flushBufferGap(frag)

protected

flushMainBuffer(startOffset, endOffset, type)

protected

fragBufferedComplete(frag, part)

protected

fragContextChanged(frag)

protected

getAppendedFrag(position, playlistType)

protected

getCurrentContext(chunkMeta)

protected

getFragmentAtPosition(bufferEnd, end, levelDetails)

protected

getFwdBufferInfo(bufferable, type)

protected

getInitialLiveFragment(levelDetails, fragments)

protected

getLevelDetails()

getLoadPosition()

protected

getMaxBufferLength(levelBitrate)

protected

getNextFragment(pos, levelDetails)

protected

getNextFragmentLoopLoading(frag, levelDetails, bufferInfo, playlistType, maxBufLen)

protected

getNextPart(partList, frag, targetBufferTime)

isLoopLoading(frag, targetBufferTime)

protected

loadFragment(frag, level, targetBufferTime)

protected

mapToInitFragWhenRequired(frag)

onError(event, data)

protected

onFragmentOrKeyLoadError(filterType, data)

protected

onHandlerDestroyed()

protected

onHandlerDestroying()

protected

onManifestLoaded(event, data)

protected

onManifestLoading()

protected

onMediaAttached(event, data)

protected

onMediaDetaching(event, data)

protected

onTickEnd()

protected

pauseBuffering()

recoverWorkerError(data)

protected

reduceLengthAndFlushBuffer(data)

protected

reduceMaxBufferLength(threshold, fragDuration)

protected

registerListeners()

protected

removeUnbufferedFrags(start)

protected

resetFragmentErrors(filterType)

protected

resetFragmentLoading(frag)

protected

resetLoadingState()

protected

resetStartWhenNotLoaded(level)

protected

resetTransmuxer()

protected

resetWhenMissingContext(chunkMeta)

protected

resumeBuffering()

setStartPosition(details, sliding)

protected

startLoad(startPosition)

stopLoad()

triggerEnded()

protected

unregisterListeners()

protected

waitForCdnTuneIn(details)

protected

waitForLive(levelInfo)

protected