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

BufferController

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public
public

hls: *

public

listeners: {"audio": *, "video": *, "audiovideo": *}

public

media: *

public
public
public

pendingTracks: TrackSet

public
public

tracks: TrackSet

Private Members
private
private
private
private
private
private
private

Method Summary

Public Methods
public

addBufferListener(type: SourceBufferName, event: string, fn: Function)

public

appendExecutor(data: Uint8Array, type: SourceBufferName)

public

blockBuffers(onUnblocked: Function, buffers: Array)

public
public

createSourceBuffers(tracks: TrackSet)

public
public
public
public

onBufferAppending(event: undefined, eventData: BufferAppendingData)

public

onBufferCodecs(event: undefined, data: BufferCodecsData)

public

onBufferEos(event: undefined, data: BufferEOSData)

public

onBufferFlushing(event: undefined, data: BufferFlushingData)

public
public

onFragParsed(event: undefined, data: FragParsedData)

public

onLevelPtsUpdated(event: undefined, data: LevelPTSUpdatedData)

public

onLevelUpdated(event: undefined, undefined: LevelUpdatedData)

public

onManifestParsed(event: undefined, data: ManifestParsedData)

public

onMediaAttaching(event: undefined, data: MediaAttachingData)

public
public
public

removeBufferListeners(type: SourceBufferName)

public

removeExecutor(type: SourceBufferName, startOffset: number, endOffset: number)

public
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
Private Methods
private
private

_onSBUpdateEnd(type: SourceBufferName)

private

_onSBUpdateError(type: SourceBufferName, event: Event)

private

_onSBUpdateStart(type: SourceBufferName)

Public Constructors

public constructor() source

Public Members

public appendError: number source

public bufferCodecEventsExpected: number source

public duration: * source

public hls: * source

public listeners: {"audio": *, "video": *, "audiovideo": *} source

public media: * source

public mediaSource: * source

public operationQueue: * source

public pendingTracks: TrackSet source

public sourceBuffer: {} source

public tracks: TrackSet source

Private Members

private _bufferCodecEventsTotal: number source

private _levelTargetDuration: * source

private _live: boolean source

private _objectUrl: * source

private _onMediaSourceClose: * source

private _onMediaSourceEnded: * source

private _onMediaSourceOpen: * source

Public Methods

public addBufferListener(type: SourceBufferName, event: string, fn: Function) source

Params:

NameTypeAttributeDescription
type SourceBufferName
event string
fn Function

public appendExecutor(data: Uint8Array, type: SourceBufferName) source

Params:

NameTypeAttributeDescription
data Uint8Array
type SourceBufferName

public blockBuffers(onUnblocked: Function, buffers: Array) source

Params:

NameTypeAttributeDescription
onUnblocked Function
buffers Array

public checkPendingTracks() source

public createSourceBuffers(tracks: TrackSet) source

Params:

NameTypeAttributeDescription
tracks TrackSet

public destroy() source

public flushLiveBackBuffer() source

public getSourceBufferTypes(): Array source

Return:

Array

public onBufferAppending(event: undefined, eventData: BufferAppendingData) source

Params:

NameTypeAttributeDescription
event undefined
eventData BufferAppendingData

public onBufferCodecs(event: undefined, data: BufferCodecsData) source

Params:

NameTypeAttributeDescription
event undefined
data BufferCodecsData

public onBufferEos(event: undefined, data: BufferEOSData) source

Params:

NameTypeAttributeDescription
event undefined
data BufferEOSData

public onBufferFlushing(event: undefined, data: BufferFlushingData) source

Params:

NameTypeAttributeDescription
event undefined
data BufferFlushingData

public onBufferReset() source

public onFragParsed(event: undefined, data: FragParsedData) source

Params:

NameTypeAttributeDescription
event undefined
data FragParsedData

public onLevelPtsUpdated(event: undefined, data: LevelPTSUpdatedData) source

Params:

NameTypeAttributeDescription
event undefined
data LevelPTSUpdatedData

public onLevelUpdated(event: undefined, undefined: LevelUpdatedData) source

Params:

NameTypeAttributeDescription
event undefined
undefined LevelUpdatedData

public onManifestParsed(event: undefined, data: ManifestParsedData) source

Params:

NameTypeAttributeDescription
event undefined
data ManifestParsedData

public onMediaAttaching(event: undefined, data: MediaAttachingData) source

Params:

NameTypeAttributeDescription
event undefined
data MediaAttachingData

public onMediaDetaching() source

public registerListeners() source

public removeBufferListeners(type: SourceBufferName) source

Params:

NameTypeAttributeDescription
type SourceBufferName

public removeExecutor(type: SourceBufferName, startOffset: number, endOffset: number) source

Params:

NameTypeAttributeDescription
type SourceBufferName
startOffset number
endOffset number

public unregisterListeners() source

public updateMediaElementDuration(levelDuration: number) 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

Params:

NameTypeAttributeDescription
levelDuration number

public updateSeekableRange(levelDetails: undefined) source

Params:

NameTypeAttributeDescription
levelDetails undefined

Private Methods

private _initSourceBuffer() source

private _onSBUpdateEnd(type: SourceBufferName) source

Params:

NameTypeAttributeDescription
type SourceBufferName

private _onSBUpdateError(type: SourceBufferName, event: Event) source

Params:

NameTypeAttributeDescription
type SourceBufferName
event Event

private _onSBUpdateStart(type: SourceBufferName) source

Params:

NameTypeAttributeDescription
type SourceBufferName