Constructor
new Transmuxer(mimeType)
Parameters:
Name | Type | Description |
---|---|---|
mimeType |
string |
- Implements:
- Source:
Members
captions_ :Array.<muxjs.mp4.ClosedCaption>
Type:
- Array.<muxjs.mp4.ClosedCaption>
- Source:
muxTransmuxer_ :muxjs.mp4.Transmuxer
Type:
- muxjs.mp4.Transmuxer
- Source:
transmuxedData_ :Array.<!Uint8Array>
Type:
- Array.<!Uint8Array>
- Source:
Methods
convertAacCodecs_() → {string}
For aac stream, convert its codecs to MP4 codecs.
- Source:
Returns:
- Type
- string
convertCodecs(contentType, mimeType) → {string}
For any stream, convert its codecs to MP4 codecs.
Parameters:
Name | Type | Description |
---|---|---|
contentType |
string | |
mimeType |
string |
- 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 |
- Source:
Returns:
- Type
- string
isAacContainer_(mimeType) → {boolean}
Check if the mimetype is 'audio/aac'.
Parameters:
Name | Type | Description |
---|---|---|
mimeType |
string |
- Source:
Returns:
- Type
- boolean
isSupported(mimeType, contentTypeopt) → {boolean}
Check if the content type is Transport Stream or AAC, and if muxjs is
loaded.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
mimeType |
string | ||
contentType |
string |
<optional> |
- Source:
Returns:
- Type
- boolean
isTsContainer_(mimeType) → {boolean}
Check if the mimetype contains 'mp2t'.
Parameters:
Name | Type | Description |
---|---|---|
mimeType |
string |
- Source:
Returns:
- Type
- boolean
destroy() → {Promise}
Request that this object be destroyed, releasing all resources and shutting
down all operations. Returns a Promise which is resolved when destruction
is complete. This Promise should never be rejected.
- Implements:
- Source:
Returns:
- Type
- Promise
getOrginalMimeType() → {string}
Returns the original mimetype of the transmuxer.
- Source:
Returns:
- Type
- string
onTransmuxDone_()
Handles the 'done' event of the transmuxer.
Resolves the transmux Promise, and returns the transmuxed data.
- Source:
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 |
- Source:
resetCaptions()
Reset captions from Transport stream to MP4, using the mux.js library.
- Source:
transmux(data) → {Promise.<{data: !Uint8Array, captions: !Array.<!muxjs.mp4.ClosedCaption>}>}
Transmux from Transport stream to MP4, using the mux.js library.
Parameters:
Name | Type | Description |
---|---|---|
data |
BufferSource |
- Source:
Returns:
- Type
- Promise.<{data: !Uint8Array, captions: !Array.<!muxjs.mp4.ClosedCaption>}>