Class: shaka.util.MimeUtils

A set of utility functions for dealing with MIME types.

Constructor

new MimeUtils()

A set of utility functions for dealing with MIME types.

Source:

Members

(static, constant) CLOSED_CAPTION_MIMETYPE :string

A mimetype created for CEA closed captions.
Type:
  • string
Source:

(private, static, constant, non-null) EXTENDED_MIME_PARAMETERS_ :Map.<string, string>

A map from Stream object keys to MIME type parameters. These should be ignored by platforms that do not recognize them. This initial set of parameters are all recognized by Chromecast.
Type:
  • Map.<string, string>
Source:

Methods

(static) getCodecBase(codecString) → {string}

Get the base codec from a codec string.
Parameters:
Name Type Description
codecString string
Source:
Returns:
Type
string

(private, static) getCodecParts_(codecString) → (non-null) {Array.<string>}

Get the base and profile of a codec string. Where [0] will be the codec base and [1] will be the profile.
Parameters:
Name Type Description
codecString string
Source:
Returns:
Type
Array.<string>

(static) getExtendedType(stream) → {string}

Takes a Stream object and produces an extended MIME type with information beyond the container and codec type, when available.
Parameters:
Name Type Description
stream shakaExtern.Stream
Source:
Returns:
Type
string

(static) getFullType(mimeType, codecsopt) → {string}

Takes a MIME type and optional codecs string and produces the full MIME type.
Parameters:
Name Type Attributes Description
mimeType string
codecs string <optional>
Source:
Returns:
Type
string

(static) splitCodecs(codecs) → (non-null) {Array.<string>}

Split a list of codecs encoded in a string into a list of codecs.
Parameters:
Name Type Description
codecs string
Source:
Returns:
Type
Array.<string>