Constructor
new MuxjsTransmuxer(mimeType)
Parameters:
Name | Type | Description |
---|---|---|
mimeType |
string |
- Implements:
- Source:
Members
muxTransmuxer_ :muxjs.mp4.Transmuxer
Type:
- muxjs.mp4.Transmuxer
transmuxedData_ :Array.<!Uint8Array>
Type:
- Array.<!Uint8Array>
transmuxPromise_ :shaka.util.PublicPromise
Type:
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
convertTsCodecs_(contentType, tsMimeType) → {string}
For transport stream, convert its codecs to MP4 codecs.
Parameters:
Name | Type | Description |
---|---|---|
contentType |
string | |
tsMimeType |
string |
Returns:
- Type
- string
destroy()
Destroy
- Implements:
- Source:
getOrginalMimeType() → {string}
Returns the original mimetype of the transmuxer.
- Implements:
- Source:
Returns:
- Type
- string
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
isTsContainer_(mimeType) → {boolean}
Check if the mimetype contains 'mp2t'.
Parameters:
Name | Type | Description |
---|---|---|
mimeType |
string |
Returns:
- Type
- boolean
onTransmuxDone_()
Handles the 'done' event of the transmuxer.
Resolves the transmux Promise, and returns the transmuxed data.
onTransmuxed_(segment)
Handles the 'data' event of the transmuxer.
Extracts the cues from the transmuxed segment, and adds them to an array.
Stores the transmuxed data in another array, to pass it back to
MediaSourceEngine, and append to the source buffer.
Parameters:
Name | Type | Description |
---|---|---|
segment |
muxjs.mp4.Transmuxer.Segment |
transmux(data, stream, referencenullable, duration) → {Promise.<!Uint8Array>}
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 |
- Implements:
- Source:
Returns:
- Type
- Promise.<!Uint8Array>