Constructor
new TsTransmuxer(mimeType)
Parameters:
| Name | Type | Description | 
|---|---|---|
mimeType | 
            
            string | 
- Implements:
 - Source:
 
Members
SUPPORTED_AUDIO_CODECS_ :Array<string>
    Supported audio codecs.
    Type:
- Array<string>
 
- Source:
 
SUPPORTED_VIDEO_CODECS_ :Array<string>
    Supported audio codecs.
    Type:
- Array<string>
 
- Source:
 
initSegments :Map<string, !Uint8Array>
Type:
- Map<string, !Uint8Array>
 
- 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()
    Destroy
- Implements:
 - Source:
 
getAacStreamInfo_(tsParser, stream, duration, referencenullable) → {shaka.util.Mp4Generator.StreamInfo}
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
tsParser | 
            
            shaka.util.TsParser | ||
stream | 
            
            shaka.extern.Stream | ||
duration | 
            
            number | ||
reference | 
            
            shaka.media.SegmentReference | 
                
                
                    <nullable> | 
            
            
            
- Source:
 
Returns:
getAc3StreamInfo_(tsParser, stream, duration, referencenullable) → {shaka.util.Mp4Generator.StreamInfo}
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
tsParser | 
            
            shaka.util.TsParser | ||
stream | 
            
            shaka.extern.Stream | ||
duration | 
            
            number | ||
reference | 
            
            shaka.media.SegmentReference | 
                
                
                    <nullable> | 
            
            
            
- Source:
 
Returns:
getAvcStreamInfo_(tsParser, stream, duration, referencenullable) → {shaka.util.Mp4Generator.StreamInfo}
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
tsParser | 
            
            shaka.util.TsParser | ||
stream | 
            
            shaka.extern.Stream | ||
duration | 
            
            number | ||
reference | 
            
            shaka.media.SegmentReference | 
                
                
                    <nullable> | 
            
            
            
- Source:
 
Returns:
getEc3StreamInfo_(tsParser, stream, duration, referencenullable) → {shaka.util.Mp4Generator.StreamInfo}
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
tsParser | 
            
            shaka.util.TsParser | ||
stream | 
            
            shaka.extern.Stream | ||
duration | 
            
            number | ||
reference | 
            
            shaka.media.SegmentReference | 
                
                
                    <nullable> | 
            
            
            
- Source:
 
Returns:
getHvcStreamInfo_(tsParser, stream, duration, referencenullable) → {shaka.util.Mp4Generator.StreamInfo}
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
tsParser | 
            
            shaka.util.TsParser | ||
stream | 
            
            shaka.extern.Stream | ||
duration | 
            
            number | ||
reference | 
            
            shaka.media.SegmentReference | 
                
                
                    <nullable> | 
            
            
            
- Source:
 
Returns:
getMp3StreamInfo_(tsParser, stream, duration, referencenullable) → {shaka.util.Mp4Generator.StreamInfo}
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
tsParser | 
            
            shaka.util.TsParser | ||
stream | 
            
            shaka.extern.Stream | ||
duration | 
            
            number | ||
reference | 
            
            shaka.media.SegmentReference | 
                
                
                    <nullable> | 
            
            
            
- Source:
 
Returns:
getOpusStreamInfo_(tsParser, stream, duration, referencenullable) → {shaka.util.Mp4Generator.StreamInfo}
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
tsParser | 
            
            shaka.util.TsParser | ||
stream | 
            
            shaka.extern.Stream | ||
duration | 
            
            number | ||
reference | 
            
            shaka.media.SegmentReference | 
                
                
                    <nullable> | 
            
            
            
- Source:
 
Returns:
getOriginalMimeType() → {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 is 'video/mp2t'.
    Parameters:
| Name | Type | Description | 
|---|---|---|
mimeType | 
            
            string | 
- Source:
 
Returns:
- Type
 - boolean
 
transmux(data, stream, referencenullable, duration, contentType) → {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 | ||
contentType | 
            
            string | 
- Implements:
 - Source:
 
Returns:
- Type
 - Promise<!Uint8Array>