Constructor
new Ec3Transmuxer()
- Implements:
- Extends:
- Source:
Extends
Members
frameIndex :number
Type:
- number
- Inherited From:
- Source:
initSegments :Map<string, !Uint8Array>
Type:
- Map<string, !Uint8Array>
- Inherited From:
- Source:
lastInitSegment_ :Uint8Array
Type:
- Uint8Array
- Inherited From:
- Source:
originalMimeType_ :string
Type:
- string
- Inherited From:
- Source:
Methods
convertCodecs(contentType, mimeType) → {string}
For any stream, convert its codecs to MP4 codecs.
Parameters:
| Name | Type | Description |
|---|---|---|
contentType |
string | |
mimeType |
string |
- Implements:
- Source:
Returns:
- Type
- string
destroy()
- Inherited From:
- Implements:
- Source:
getId3Timestamp(id3Datanon-null, defaultTimestamp) → {number}
Reads the transport-stream timestamp carried in the given ID3 data (the
'com.apple.streaming.transportStreamTimestamp' frame), if present, falling
back to the provided default otherwise.
Parameters:
| Name | Type | Description |
|---|---|---|
id3Data |
Uint8Array | |
defaultTimestamp |
number |
- Inherited From:
- Source:
Returns:
- Type
- number
getOriginalMimeType() → {string}
- Inherited From:
- Implements:
- Source:
Returns:
- Type
- string
isEc3Container_(mimeType) → {boolean}
Check if the mimetype is 'audio/ec3'.
Parameters:
| Name | Type | Description |
|---|---|---|
mimeType |
string |
- Source:
Returns:
- Type
- boolean
isSupported(mimeType, contentTypeopt) → {boolean}
Check if the mime type and the content type is supported.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
mimeType |
string | ||
contentType |
string |
<optional> |
- Implements:
- Source:
Returns:
- Type
- boolean
packageSegment(mp4Generatornon-null, stream, referencenullable) → {shaka.extern.TransmuxerOutput}
Packages the init and media segments produced by the given Mp4Generator.
The init segment is cached per discontinuity and the running frame index is
advanced. The init segment is only (re)appended when it differs from the
last one used.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
mp4Generator |
shaka.util.Mp4Generator | ||
stream |
shaka.extern.Stream | ||
reference |
shaka.media.SegmentReference |
<nullable> |
- Inherited From:
- Source:
Returns:
transmux(data, stream, referencenullable, duration, contentType) → {Promise<(!Uint8Array|!shaka.extern.TransmuxerOutput)>}
Transmux a input data to MP4.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
data |
BufferSource | ||
stream |
shaka.extern.Stream | ||
reference |
shaka.media.SegmentReference |
<nullable> |
The segment reference, or null for init segments |
duration |
number | ||
contentType |
string |
- Implements:
- Source:
Returns:
If you
only want to return the result, use Uint8Array, if you want to separate
the initialization segment and the data segment, you have to use
shaka.extern.TransmuxerOutput
- Type
- Promise<(!Uint8Array|!shaka.extern.TransmuxerOutput)>