Class: shaka.media.ManifestParser

An interface to register manifest parsers.

Constructor

new ManifestParser()

An interface to register manifest parsers.

Source:

Members

AccessibilityPurpose :string

Type:
  • string
Properties:
Name Value Type Description
VISUALLY_IMPAIRED visually impaired string
HARD_OF_HEARING hard of hearing string
Source:

DASH :string

Type:
  • string
Source:

HLS :string

Type:
  • string
Source:

MSS :string

Type:
  • string
Source:

parsersByExtension :Object.<string, shaka.extern.ManifestParser.Factory>

Contains the parser factory functions indexed by file extension.
Type:
Source:

parsersByMime :Object.<string, shaka.extern.ManifestParser.Factory>

Contains the parser factory functions indexed by MIME type.
Type:
Source:

UNKNOWN :string

Type:
  • string
Source:

Methods

getExtension(uri) → {string}

Parameters:
Name Type Description
uri string
Source:
Returns:
Type
string

getFactory(uri, netEnginenon-null, retryParams, mimeTypenullable) → {Promise.<shaka.extern.ManifestParser.Factory>}

Get a factory that can create a manifest parser that should be able to parse the manifest at |uri|.
Parameters:
Name Type Attributes Description
uri string
netEngine shaka.net.NetworkingEngine
retryParams shaka.extern.RetryParameters
mimeType string <nullable>
Source:
Returns:
Type
Promise.<shaka.extern.ManifestParser.Factory>

getMimeType(uri, netEnginenon-null, retryParams) → {Promise.<string>}

Parameters:
Name Type Description
uri string
netEngine shaka.net.NetworkingEngine
retryParams shaka.extern.RetryParameters
Source:
Returns:
Type
Promise.<string>

isSupported(uri, mimeType) → {boolean}

Determines whether or not this URI and MIME type are supported by our own manifest parsers on this platform. This takes into account whether or not MediaSource is available, as well as which parsers are registered to the system.
Parameters:
Name Type Description
uri string
mimeType string
Source:
Returns:
Type
boolean

probeSupport() → {Object.<string, boolean>}

Returns a map of manifest support for well-known types.
Source:
Returns:
Type
Object.<string, boolean>

registerParserByExtension(extension, parserFactory)

Registers a manifest parser by file extension.
Parameters:
Name Type Description
extension string The file extension of the manifest.
parserFactory shaka.extern.ManifestParser.Factory The factory used to create parser instances.
Source:

registerParserByMime(mimeType, parserFactory)

Registers a manifest parser by MIME type.
Parameters:
Name Type Description
mimeType string The MIME type of the manifest.
parserFactory shaka.extern.ManifestParser.Factory The factory used to create parser instances.
Source:

unregisterParserByMime(mimeType)

Unregisters a manifest parser by MIME type.
Parameters:
Name Type Description
mimeType string The MIME type of the manifest.
Source: