Home Reference Source
import {BufferHelper} from 'hls.js/src/utils/buffer-helper.ts'
public class | source

BufferHelper

Static Method Summary

Static Public Methods
public static

bufferInfo(media: Bufferable, pos: number, maxHoleDuration: number): {"len": *, "start": *, "end": *, "nextStart": *}

public static

bufferedInfo(buffered: undefined, pos: number, maxHoleDuration: number): {"len": *, "start": *, "end": *, "nextStart": *}

public static

isBuffered(media: Bufferable, position: number): boolean

Return true if media's buffered include position

Static Public Methods

public static bufferInfo(media: Bufferable, pos: number, maxHoleDuration: number): {"len": *, "start": *, "end": *, "nextStart": *} source

Params:

NameTypeAttributeDescription
media Bufferable
pos number
maxHoleDuration number

Return:

{"len": *, "start": *, "end": *, "nextStart": *}

public static bufferedInfo(buffered: undefined, pos: number, maxHoleDuration: number): {"len": *, "start": *, "end": *, "nextStart": *} source

Params:

NameTypeAttributeDescription
buffered undefined
pos number
maxHoleDuration number

Return:

{"len": *, "start": *, "end": *, "nextStart": *}

public static isBuffered(media: Bufferable, position: number): boolean source

Return true if media's buffered include position

Params:

NameTypeAttributeDescription
media Bufferable
position number

Return:

boolean