Home > hls.js > BaseStreamController > calculateOptimalSwitchPoint
BaseStreamController.calculateOptimalSwitchPoint() method
Calculate optimal switch point by considering fetch delays and buffer info to avoid causing playback interruption
Signature:
protected calculateOptimalSwitchPoint(nextLevel: Level, bufferInfo: BufferInfo): {
fetchdelay: number;
okToFlushForwardBuffer: boolean;
};Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
nextLevel | ||
|
bufferInfo |
Returns:
{ fetchdelay: number; okToFlushForwardBuffer: boolean; }