Home > hls.js > StreamController

StreamController class

Signature:

export default class StreamController extends BaseStreamController implements NetworkComponentAPI 

Extends: BaseStreamController

Implements: NetworkComponentAPI

Constructors

Constructor

Modifiers

Description

(constructor)(hls, fragmentTracker, keyLoader)

Constructs a new instance of the StreamController class

Properties

Property

Modifiers

Type

Description

backtrackFragment

protected

Fragment | undefined

Get backtrack fragment. Override to return actual backtrack fragment.

couldBacktrack

protected

boolean

Get could backtrack flag. Override to return actual value.

currentFrag

readonly

Fragment | null

currentLevel

readonly

number

currentProgramDateTime

readonly

Date | null

forceStartLoad

readonly

boolean

hasEnoughToStart

readonly

boolean

maxBufferLength

readonly

number

nextBufferedFrag

readonly

Fragment | null

nextLevel

readonly

number

Methods

Method

Modifiers

Description

_handleFragmentLoadProgress(data)

protected

abortCurrentFrag()

protected

checkFragmentChanged()

protected

doTick()

protected

flushMainBuffer(startOffset, endOffset)

protected

getBufferOutput()

protected

Get the buffer output to use for buffer calculations. Override to use altAudio logic in stream-controller.

getMainFwdBufferInfo()

immediateLevelSwitch()

loadFragment(frag, level, targetBufferTime)

protected

onError(event, data)

protected

onHandlerDestroying()

protected

onManifestLoading()

protected

onMediaAttached(event, data)

protected

onMediaDetaching(event, data)

protected

onTickEnd()

protected

registerListeners()

protected

seekToStartPos()

protected

Seeks to the set startPosition if not equal to the mediaElement's current time.

startLoad(startPosition, skipSeekToStartPosition)

stopLoad()

swapAudioCodec()

unregisterListeners()

protected