Class: shaka.transmuxer.TransmuxerEngine
Manages transmuxer plugins.
Constructor
new TransmuxerEngine()
Manages transmuxer plugins.
- Implements:
- Source:
Members
PLUGIN_PRIORITY_ORDER :Array<number>
Priorities in descending order (highest first), used when searching for
a matching transmuxer plugin.
Type:
- Source:
PluginPriority :number
Priority level for transmuxer plugins.
If multiple plugins are provided for the same mime type, only the
highest-priority one is used.
Type:
Properties:
| Name |
Value |
Type |
Description |
FALLBACK |
1
|
number
|
|
PREFERRED_SECONDARY |
2
|
number
|
|
PREFERRED |
3
|
number
|
|
APPLICATION |
4
|
number
|
|
- Source:
Methods
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
Finds a plugin registered for |mimeType| without instantiating it or
calling isSupported(). Used by the worker where MediaSource may not be
available to validate support.
When |priority| is null (default), returns the highest-priority plugin.
When |priority| is specified, returns the plugin at that exact priority or
null if none is registered at that level.
Parameters:
| Name |
Type |
Attributes |
Default |
Description |
mimeType |
string
|
|
|
|
priority |
number
|
<optional>
<nullable>
|
null
|
|
- Source:
Returns:
-
Type
-
shaka.extern.TransmuxerPlugin
findTransmuxerPluginPriority(mimeType, plugin) → {number}
Returns the priority at which |plugin| is registered for |mimeType|, or
null if it is not registered for that type. A worker cannot share plugin
identity with the main thread, but it shares the registrations, so the
priority is what tells the worker which plugin the main thread chose.
If the same plugin is registered at several priorities, the highest is
returned, which is the one findTransmuxer probes first.
Parameters:
- Source:
Returns:
-
Type
-
number
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>
|
|
- Source:
Returns:
-
Type
-
boolean
normalizeMimeType_(mimeType) → {string}
Parameters:
| Name |
Type |
Description |
mimeType |
string
|
|
- Source:
Returns:
-
Type
-
string
registerTransmuxer(mimeType, pluginnon-null, priority)
Parameters:
- Source:
unregisterTransmuxer(mimeType, priority)
Parameters:
| Name |
Type |
Description |
mimeType |
string
|
|
priority |
number
|
|
- Source:
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
Type Definitions
PluginObject
Type:
Properties:
- Source: