Class: AssetTypes

@bldr/core-browser.AssetTypes

Categories some asset file formats in three asset types: audio, image, video.

new module:@bldr/core-browser.AssetTypes ()

Members

allowedExtensions_ object private

config_ object private

Methods

extensionToType (extension)String

Get the media type from the extension.

Name Type Description
extension String
Returns:
Type Description
String

isAsset (filename)Boolean

Check if file is an supported asset format.

Name Type Description
filename String
Returns:
Type Description
Boolean

spreadExtensions_ () private

typeToColor (type)String

Get the color of the media type.

Name Type Description
type String

The asset type: for example audio, image, video.

Returns:
Type Description
String

typeToTargetExtension (type)String

Determine the target extension (for a conversion job) by a given asset type.

Name Type Description
type String

The asset type: for example audio, image, video.

Returns:
Type Description
String