Class: shaka.msf.PackagingRegistry

An interface to register MSF packagings. Packagings register themselves, so this registry has no knowledge of which ones exist. Supporting a new packaging means adding an implementation that registers itself and requiring it from shaka-player.uncompiled.js, with no change here. Applications can register a packaging of their own the same way, or unregister one they do not want offered.

Constructor

new PackagingRegistry()

An interface to register MSF packagings. Packagings register themselves, so this registry has no knowledge of which ones exist. Supporting a new packaging means adding an implementation that registers itself and requiring it from shaka-player.uncompiled.js, with no change here. Applications can register a packaging of their own the same way, or unregister one they do not want offered.

Source:

Members

packagingsByName :Map<string, shaka.extern.MsfPackaging.Factory>

Contains the registered packaging factories, keyed by catalog name.
Type:
Source:

Methods

create(name) → {shaka.extern.MsfPackaging}

Creates a packaging instance for a catalog track's `packaging` value, or returns null when nothing is registered for it. An instance is created per track, because a packaging carries the state it derived from that track.
Parameters:
Name Type Description
name string | undefined
Source:
Returns:
Type
shaka.extern.MsfPackaging

getRegisteredPackagings() → {Array<string>}

Returns the names of all registered packagings.
Source:
Returns:
Type
Array<string>

registerPackaging(name, packagingFactory)

Registers an MSF packaging.
Parameters:
Name Type Description
name string The catalog `packaging` value this handles, e.g. 'm2ts'.
packagingFactory shaka.extern.MsfPackaging.Factory The factory used to create packaging instances.
Source:

unregisterPackaging(name)

Unregisters an MSF packaging.
Parameters:
Name Type Description
name string
Source: