Members
(inner) programs :Array.<HlsTsProgramType>
Get the parsed program types
Type:
- Array.<HlsTsProgramType>
Methods
(inner) createAacParser(dataStream) → {AVCParser}
Create an AAC Parser that can parse an AAC data stream
Parameters:
Name | Type | Description |
---|---|---|
dataStream |
HlsDataStream |
Returns:
- Type
- AVCParser
(inner) createAvcParser(dataStream) → {AVCParser}
Create an AVC Parser that can parse an AVC data stream
Parameters:
Name | Type | Description |
---|---|---|
dataStream |
HlsDataStream |
Returns:
- Type
- AVCParser
(inner) getDataStreamByProgramType(type) → {HlsTsDataStream}
Get the data stream for a program type
Parameters:
Name | Type | Description |
---|---|---|
type |
string |
Returns:
- Type
- HlsTsDataStream
(inner) getPacketsByProgramType(type) → {Array.<HlsTsPacket>}
Get all packets for a specific program type
Parameters:
Name | Type | Description |
---|---|---|
type |
string |
Returns:
- Type
- Array.<HlsTsPacket>
(inner) parse(optsnullable) → {ParseStream}
Parse HLS TS when reading from a Stream
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
opts |
HlsTsOptions |
<nullable> |
Returns:
- Type
- ParseStream
Example
fs.createReadStream("./seg-10s.ts")
.pipe(hlsTs.parse({ debug: true }))
.on("finish", function() {
const avcPayload = hlsTs.getDataStreamByProgramType("avc");
});