Constructor
new TsParser()
Members
Methods
probe(data) → {boolean}
Check if the passed data corresponds to an MPEG2-TS
Parameters:
Name | Type | Description |
---|---|---|
data |
Uint8Array |
- Source:
Returns:
- Type
- boolean
syncOffset(data) → {number}
Returns the synchronization offset
Parameters:
Name | Type | Description |
---|---|---|
data |
Uint8Array |
- Source:
Returns:
- Type
- number
getCodecs() → {{audio: ?string, video: ?string}}
Return the audio and video codecs
- Source:
Returns:
- Type
- {audio: ?string, video: ?string}
getMetadata() → {Array.<shaka.extern.ID3Metadata>}
Return the ID3 metadata
- Source:
Returns:
- Type
- Array.<shaka.extern.ID3Metadata>
getPmtId_(data, offset) → {number}
Get the PMT ID from the PAT
Parameters:
Name | Type | Description |
---|---|---|
data |
Uint8Array | |
offset |
number |
- Source:
Returns:
- Type
- number
getStartTime() → {{audio: ?number, video: ?number}}
Return the start time for the audio and video
- Source:
Returns:
- Type
- {audio: ?number, video: ?number}
parse(data) → {shaka.util.TsParser}
Parse the given data
Parameters:
Name | Type | Description |
---|---|---|
data |
Uint8Array |
- Source:
Returns:
- Type
- shaka.util.TsParser
parsePES(data) → {shaka.util.TsParser.PES}
Parse PES
Parameters:
Name | Type | Description |
---|---|---|
data |
Uint8Array |
- Source:
Returns:
parsePMT(data, offset) → {shaka.util.TsParser.PMT}
Parse PMT
Parameters:
Name | Type | Description |
---|---|---|
data |
Uint8Array | |
offset |
number |
- Source:
Returns:
Type Definitions
PES
PES.
Type:
- {data: Uint8Array, packetLength: number, pts: ?number, dts: ?number}
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
data |
Uint8Array | ||
packetLength |
number | ||
pts |
number |
<nullable> |
|
dts |
number |
<nullable> |
- Source:
PMT
PMT.
Type:
- {audio: number, video: number, id3: number, audioCodec: string, videoCodec: string}
Properties:
Name | Type | Description |
---|---|---|
audio |
number | Audio PID |
video |
number | Video PID |
id3 |
number | ID3 PID |
audioCodec |
string | Audio codec |
videoCodec |
string | Video codec |
- Source: