Class: shaka.media.Transmuxer

Constructor

new Transmuxer()

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

Members

(private, static, constant) TS_TIMESCALE_ :number

Type:
  • number
Source:

(private) baseDecodeTimeSet_ :boolean

Type:
  • boolean
Source:

(private) isTransmuxing_ :boolean

Type:
  • boolean
Source:

(private) muxTransmuxer_ :muxjs.mp4.Transmuxer

Type:
  • muxjs.mp4.Transmuxer
Source:

(private, non-null) transmuxedData_ :Array

Type:
  • Array
Source:

(private) transmuxPromise_ :shaka.util.PublicPromise

Type:
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(contentType, mimeType) → {boolean}

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

(static) isTsContainer(mimeType) → {boolean}

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

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, startTimenullable) → (non-null) {Promise.<!Uint8Array>}

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