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

details: *

public

hls: Hls

public
public

listeners: SourceBufferListeners

public

media: *

public
public
public

pendingTracks: TrackSet

public

sourceBuffer: SourceBuffers

public

tracks: TrackSet

Private Members
private
private
private
private
private

Method Summary

Public Methods
public

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

public
public

appendExecutor(data: Uint8Array, type: SourceBufferName)

public

blockBuffers(onUnblocked: undefined, buffers: Array)

public
public

createSourceBuffers(tracks: TrackSet)

public
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

onFragChanged(event: undefined, data: FragChangedData)

public

onFragParsed(event: undefined, data: FragParsedData)

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 details: * source

public hls: Hls source

public lastMpegAudioChunk: * source

public listeners: SourceBufferListeners source

public media: * source

public mediaSource: * source

public operationQueue: BufferOperationQueue source

public pendingTracks: TrackSet source

public sourceBuffer: SourceBuffers source

public tracks: TrackSet source

Private Members

private _bufferCodecEventsTotal: number 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 appendChangeType(type: undefined, mimeType: undefined) source

Params:

NameTypeAttributeDescription
type undefined
mimeType undefined

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

Params:

NameTypeAttributeDescription
data Uint8Array
type SourceBufferName

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

Params:

NameTypeAttributeDescription
onUnblocked undefined
buffers Array

public checkPendingTracks() source

public createSourceBuffers(tracks: TrackSet) source

Params:

NameTypeAttributeDescription
tracks TrackSet

public destroy() source

public flushBackBuffer() source

public getSourceBufferTypes(): Array source

Return:

Array

public hasSourceTypes(): boolean source

Return:

boolean

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 onFragChanged(event: undefined, data: FragChangedData) source

Params:

NameTypeAttributeDescription
event undefined
data FragChangedData

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

Params:

NameTypeAttributeDescription
event undefined
data FragParsedData

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() 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

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