Class

ExtensionManager

ExtensionManager()

Constructor

# new ExtensionManager()

Extension Manager is responsible to the lifecycle of all device extension implementation.

Methods

# async getExtension(type)

Return the extension specified.

Parameters:
Name Type Description
type String

Type of the extension to be retrieved.

# isExtensionSupported(type) → {Boolean}

Check and see if the specified extension is supported or not.

Parameters:
Name Type Description
type String

True if supported, false otherwise.

Boolean

ExtensionManager()

Constructor

# new ExtensionManager()

This is a reimplementation of ExtensionManager with the support of dynamic import. The business logic will remain largely the same except the RequireJS module definition, and the associated loading logic will be replaced with ES6 Promise, async and await to aid reading.

Methods

# async getExtension(type)

Return the extension specified.

Parameters:
Name Type Description
type String

Type of the extension to be retrieved.

# isExtensionSupported(type) → {Boolean}

Check and see if the specified extension is supported or not.

Parameters:
Name Type Description
type String

True if supported, false otherwise.

Boolean

ExtensionManager(extensionConfigs)

Constructor

# new ExtensionManager(extensionConfigs)

Construct an extension manager that knows about the extensions provided as the arguments during the construction of the manager. This manager will be stored by a Media instance. The player will call the manager's public functions, for example, prepare, getExtension and others, when needed during the lifecycle of the Media instance.

Parameters:
Name Type Description
extensionConfigs Array.<ExtensionConfig>

An array of extension configurations that the ExtensionManager should know about.

Methods

# async getExtension(type)

Return the extension specified.

Parameters:
Name Type Description
type String

Type of the extension to be retrieved.

# isExtensionSupported(type) → {Boolean}

Check and see if the specified extension is supported or not.

Parameters:
Name Type Description
type String

True if supported, false otherwise.

Boolean