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 |
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
| |||
|
|
Fragment | undefined |
Get backtrack fragment. Returns null in base class. Override in stream-controller to return actual backtrack fragment. | |
|
|
boolean | ||
|
|
boolean | ||
|
|
boolean | ||
|
| |||
|
|
boolean |
Get could backtrack flag. Returns false in base class. Override in stream-controller to return actual value. | |
|
| |||
|
|
Fragment | null | ||
|
| |||
|
| |||
|
|
Fragment | null | ||
|
|
MediaFragment | null | ||
|
| |||
|
| |||
|
| |||
|
| |||
|
|
number | ||
|
|
Level | null | ||
|
|
Array<Level> | null | ||
|
|
boolean | ||
|
|
HTMLMediaElement | null | ||
|
|
Bufferable | null | ||
|
|
number | ||
|
|
() => void | ||
|
|
() => void | ||
|
| |||
|
|
boolean | ||
|
|
number | ||
|
|
boolean | ||
|
|
number | ||
|
|
number | ||
|
|
number | null | ||
|
|
number | ||
|
|
TransmuxerInterface | null |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
_doFragLoad(frag, level, targetBufferTime, progressCallback) |
| |
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
|
Aborts the current fragment loading and resets state Can be overridden by subclasses for specific behavior | |
|
| ||
|
| ||
|
bufferFragmentData(data, frag, part, chunkMeta, noBacktracking) |
| |
|
|
Calculate optimal switch point by considering fetch delays and buffer info to avoid causing playback interruption | |
|
| ||
|
| ||
|
| ||
|
|
Handle back-buffer cleanup during track switching | |
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
|
Gets the next buffered fragment following the given fragment | |
|
| ||
|
| ||
|
| ||
|
|
Gets buffered fragment at the specified position | |
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
getNextFragmentLoopLoading(frag, levelDetails, bufferInfo, playlistType, maxBufLen) |
| |
|
| ||
|
| ||
|
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 | ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
scheduleTrackSwitch(bufferInfo, fetchdelay, okToFlushForwardBuffer) |
|
Generic track switching scheduler that prevents buffering interruptions by finding optimal flush points in the buffer This method can be overridden by subclasses with specific implementation details |
|
| ||
|
| ||
|
| ||
|
| ||
|
|