Home Reference Source
import TSDemuxer from 'hls.js/src/demux/tsdemuxer.ts'
public class | source

TSDemuxer

Static Method Summary

Static Public Methods
public static

createTrack(type: undefined, duration: number): DemuxedTrack

Creates a track model internal to demuxer used to drive remuxing input

public static
public static

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public
public
public

config: *

public
public
public
public
public
public
Private Members
private
private
private
private
private
private
private
private

Method Summary

Public Methods
public

decrypt(demuxResult: DemuxerResult, sampleAes: SampleAesDecrypter): Promise

public

demux(data: Uint8Array, timeOffset: number, isSampleAes: undefined, flush: undefined): DemuxerResult

public

demuxSampleAes(data: Uint8Array, keyData: KeyData, timeOffset: number): Promise

public
public

extractRemainingSamples(demuxResult: DemuxerResult)

public

flush(): *

public
public

parseAACPES(pes: PES)

public
public

parseAVCPES(pes: PES, last: boolean)

public

parseID3PES(pes: PES)

public

parseMPEGPES(pes: PES)

public
public

resetInitSegment(audioCodec: string, videoCodec: string, duration: number)

Initializes a new init segment on the demuxer/remuxer interface.

public

Static Public Methods

public static createTrack(type: undefined, duration: number): DemuxedTrack source

Creates a track model internal to demuxer used to drive remuxing input

Params:

NameTypeAttributeDescription
type undefined
duration number

Return:

DemuxedTrack

public static probe(data: Uint8Array): boolean source

Params:

NameTypeAttributeDescription
data Uint8Array

Return:

boolean

public static syncOffset(data: Uint8Array): * source

Params:

NameTypeAttributeDescription
data Uint8Array

Return:

*

Public Constructors

public constructor() source

Public Members

public aacLastPTS: * source

public aacOverFlow: * source

public audioCodec: * source

public avcSample: * source

public config: * source

public observer: * source

public pmtParsed: boolean source

public remainderData: * source

public sampleAes: * source

public typeSupported: * source

public videoCodec: * source

Private Members

private _audioTrack: * source

private _avcTrack: * source

private _duration: number source

private _id3Track: * source

private _initDTS: * source

private _initPTS: * source

private _pmtId: number source

private _txtTrack: * source

Public Methods

public decrypt(demuxResult: DemuxerResult, sampleAes: SampleAesDecrypter): Promise source

Params:

NameTypeAttributeDescription
demuxResult DemuxerResult
sampleAes SampleAesDecrypter

Return:

Promise

public demux(data: Uint8Array, timeOffset: number, isSampleAes: undefined, flush: undefined): DemuxerResult source

Params:

NameTypeAttributeDescription
data Uint8Array
timeOffset number
isSampleAes undefined
flush undefined

Return:

DemuxerResult

public demuxSampleAes(data: Uint8Array, keyData: KeyData, timeOffset: number): Promise source

Params:

NameTypeAttributeDescription
data Uint8Array
keyData KeyData
timeOffset number

Return:

Promise

public destroy() source

public extractRemainingSamples(demuxResult: DemuxerResult) source

Params:

NameTypeAttributeDescription
demuxResult DemuxerResult

public flush(): * source

Return:

*

public getLastNalUnit(): * source

Return:

*

public parseAACPES(pes: PES) source

Params:

NameTypeAttributeDescription
pes PES

public parseAVCNALu(array: Uint8Array): Array source

Params:

NameTypeAttributeDescription
array Uint8Array

Return:

Array

public parseAVCPES(pes: PES, last: boolean) source

Params:

NameTypeAttributeDescription
pes PES
last boolean

public parseID3PES(pes: PES) source

Params:

NameTypeAttributeDescription
pes PES

public parseMPEGPES(pes: PES) source

Params:

NameTypeAttributeDescription
pes PES

public resetContiguity() source

public resetInitSegment(audioCodec: string, videoCodec: string, duration: number) source

Initializes a new init segment on the demuxer/remuxer interface. Needed for discontinuities/track-switches (or at stream start) Resets all internal track instances of the demuxer.

Params:

NameTypeAttributeDescription
audioCodec string
videoCodec string
duration number

public resetTimeStamp() source