Class: shaka.media.Transmuxer

Constructor

new Transmuxer()

Transmuxer provides all operations for transmuxing from Transport Stream to MP4.
Implements:
Source:

Members

(private) isTransmuxing_ :boolean

Type:
  • boolean
Source:

(private) muxTransmuxer_ :muxjs.mp4.Transmuxer

Type:
  • muxjs.mp4.Transmuxer
Source:

(private, non-null) transmuxedData_ :Array

Type:
  • Array
Source:

Methods

(static) 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

(static) isSupported(mimeType, contentTypeopt) → {boolean}

Check if the content type is Transport Stream, and if muxjs is loaded.
Parameters:
Name Type Attributes Description
mimeType string
contentType string <optional>
Source:
Returns:
Type
boolean

(static) isTsContainer(mimeType) → {boolean}

Check if the mimetype contains 'mp2t'.
Parameters:
Name Type Description
mimeType string
Source:
Returns:
Type
boolean

(export) destroy() → (non-null) {Promise}

Destroys the object, 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

(private) onTransmuxDone_()

Handling the 'done' event of transmuxer. Resolving the transmux promises, and returning the transmuxed data.
Source:

(private) onTransmuxed_(segment)

Handling the 'data' event of transmuxer. Store the transmuxed data in an array, to pass it back to MediaSourceEngine, and append to source buffer.
Parameters:
Name Type Description
segment muxjs.mp4.Transmuxer.Segment
Source:

transmux(datanon-null) → (non-null) {Promise.<!Uint8Array>}

Transmux from Transport stream to MP4, using mux.js library.
Parameters:
Name Type Description
data ArrayBuffer
Source:
Returns:
Type
Promise.<!Uint8Array>