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

currentFrag

readonly

Fragment | null

currentLevel

readonly

number

currentProgramDateTime

readonly

Date | null

forceStartLoad

readonly

boolean

hasEnoughToStart

readonly

boolean

maxBufferLength

readonly

number

nextBufferedFrag

readonly

MediaFragment | null

nextLevel

readonly

number

Methods

Method

Modifiers

Description

_handleFragmentLoadProgress(data)

protected

doTick()

protected

flushMainBuffer(startOffset, endOffset)

protected

getMainFwdBufferInfo()

immediateLevelSwitch()

loadFragment(frag, level, targetBufferTime)

protected

nextLevelSwitch()

try to switch ASAP without breaking video playback: in order to ensure smooth but quick level switching, we need to find the next flushable buffer range we should take into account new segment fetch time

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

triggerEnded()

protected

unregisterListeners()

protected