Home Reference Source
import BufferController from 'hls.js/src/controller/buffer-controller.ts'
public class | source

BufferController

Extends:

src/event-handler.js~EventHandler → BufferController

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public
public
public
public

config: *

public
public

flushRange: *[]

public

media: *

public
public

parent: *

public

pendingTracks: TrackSet

public

segments: *[]

public

sourceBuffer: SourceBuffers

public

tracks: TrackSet

Private Members
private
private
private
private

_live: *

private
private
private
private
private
private
private
private
private

Method Summary

Public Methods
public
public
public

createSourceBuffers(tracks: TrackSet)

public
public
public
public

flushBuffer(startOffset: number, endOffset: number, sbType: SourceBufferName): boolean

public
public

onBufferAppending(data: Segment)

public

onBufferCodecs(tracks: TrackSet)

public
public
public
public
public
public
public
public
public

removeBufferRange(type: string, sb: ExtendedSourceBuffer, startOffset: number, endOffset: number): boolean

Removes first buffered range from provided source buffer that lies within given start and end offsets.

public

Update Media Source duration to current level duration or override to Infinity if configuration parameter 'liveDurationInfinityis set totrue` More details: https://github.com/video-dev/hls.js/issues/355

public

Public Constructors

public constructor() source

Public Members

public appendError: number source

public appended: number source

public appending: boolean source

public audioTimestampOffset: * source

public bufferCodecEventsExpected: number source

public config: * source

public flushBufferCounter: number source

public flushRange: *[] source

public media: * source

public mediaSource: * source

public parent: * source

public pendingTracks: TrackSet source

public segments: *[] source

public sourceBuffer: SourceBuffers source

public tracks: TrackSet source

Private Members

private _bufferCodecEventsTotal: number source

private _levelDuration: * source

private _levelTargetDuration: number source

private _live: * source

private _msDuration: * source

private _needsEos: boolean source

private _needsFlush: boolean source

private _objectUrl: * source

private _onMediaSourceClose: * source

private _onMediaSourceEnded: * source

private _onMediaSourceOpen: * source

private _onSBUpdateEnd: * source

private _onSBUpdateError: * source

Public Methods

public checkEos() source

public checkPendingTracks() source

public createSourceBuffers(tracks: TrackSet) source

Params:

NameTypeAttributeDescription
tracks TrackSet

public destroy() source

public doAppending() source

public doFlush() source

public flushBuffer(startOffset: number, endOffset: number, sbType: SourceBufferName): boolean source

Params:

NameTypeAttributeDescription
startOffset number
endOffset number
sbType SourceBufferName

Return:

boolean

public flushLiveBackBuffer() source

public onBufferAppending(data: Segment) source

Params:

NameTypeAttributeDescription
data Segment

public onBufferCodecs(tracks: TrackSet) source

Params:

NameTypeAttributeDescription
tracks TrackSet

public onBufferEos(data: undefined) source

Params:

NameTypeAttributeDescription
data undefined

public onBufferFlushing(data: undefined) source

Params:

NameTypeAttributeDescription
data undefined

public onBufferReset() source

public onLevelPtsUpdated(data: undefined) source

Params:

NameTypeAttributeDescription
data undefined

public onLevelUpdated(undefined: undefined) source

Params:

NameTypeAttributeDescription
undefined undefined

public onManifestParsed(data: undefined) source

Params:

NameTypeAttributeDescription
data undefined

public onMediaAttaching(data: undefined) source

Params:

NameTypeAttributeDescription
data undefined

public onMediaDetaching() source

public removeBufferRange(type: string, sb: ExtendedSourceBuffer, startOffset: number, endOffset: number): boolean source

Removes first buffered range from provided source buffer that lies within given start and end offsets.

Params:

NameTypeAttributeDescription
type string
sb ExtendedSourceBuffer
startOffset number
endOffset number

Return:

boolean

public updateMediaElementDuration() source

Update Media Source duration to current level duration or override to Infinity if configuration parameter 'liveDurationInfinityis set totrue` More details: https://github.com/video-dev/hls.js/issues/355

public updateSeekableRange(levelDetails: undefined) source

Params:

NameTypeAttributeDescription
levelDetails undefined