Options
All
  • Public
  • Public/Protected
  • All
Menu

Encapsulates a file asset, e.g. an audio recording, artwork image, etc; maps to asset_type

Hierarchy

  • Asset

Index

Constructors

constructor

  • Constructor for Asset objects. Takes all of the attributes as an object.

    Parameters

    • asset: Partial<Asset>

      An object containing all fields for the Asset.

    Returns Asset

Properties

Optional attr

attr: Attr[]

Any custom attributes for the asset. Use the Attr class.

fileName

fileName: string = ''

The real filename with extension (if applicable) and without disk folder structure; maps to file_name

Optional format

format: string

The format of the file, generally the same as the file extension; maps to format

md5Checksum

md5Checksum: string = ''

A 128-bit MD5 hash for the file, to ensure its contents; maps to md5_checksum

Optional mimeType

mimeType: string

The file's mime-type, e.g. video/wav or image/jpg. We recommend using a mime-types library (like mime-types and/or @types/mime-types) to ensure that the input provided here is actually valid; maps to mime_type

Optional name

name: string

An optional descriptive name for the asset; maps to name

Optional notes

notes: string

Any textual notes to accompany the asset; maps to notes

Optional subtype

subtype: string

The AudioSalad media type, e.g. wav or Front (or for arbitrary files, e.g. Document); maps to sub_type

type

type: string = ''

The asset type. Generally this will be either audio, image, or asset (for all other types of assets), but any string can be provided; maps to type

Methods

xml

  • xml(): string
  • Generates AudioSalad XML for the asset.

    Returns string

    AudioSalad XML <asset> element

Generated using TypeDoc