taglib-ts
    Preparing search index...

    Class AsfTag

    Represents the collection of metadata stored in an ASF file.

    Simple fields (title, artist, copyright, comment, rating) are stored directly. All other attributes are held in an attribute-list map keyed by the ASF attribute name.

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    • get album(): string

      Album title, read from the WM/AlbumTitle attribute. Returns "" when not present.

      Returns string

    • set album(value: string): void

      Parameters

      • value: string

        New album title; sets the WM/AlbumTitle attribute.

      Returns void

    • get artist(): string

      Lead artist (Content Description Object).

      Returns string

    • set artist(value: string): void

      Parameters

      • value: string

        New artist.

      Returns void

    • get comment(): string

      User comment (Content Description Object).

      Returns string

    • set comment(value: string): void

      Parameters

      • value: string

        New comment.

      Returns void

    • Copyright notice (Content Description Object).

      Returns string

    • Parameters

      • value: string

        New copyright string.

      Returns void

    • get genre(): string

      Genre, read from the WM/Genre attribute. Returns "" when not present.

      Returns string

    • set genre(value: string): void

      Parameters

      • value: string

        New genre; sets the WM/Genre attribute.

      Returns void

    • get isEmpty(): boolean

      True when every field is empty / zero.

      Returns boolean

    • get rating(): string

      Content rating (Content Description Object).

      Returns string

    • set rating(value: string): void

      Parameters

      • value: string

        New rating string.

      Returns void

    • get title(): string

      Track title (Content Description Object).

      Returns string

    • set title(value: string): void

      Parameters

      • value: string

        New title.

      Returns void

    • get track(): number

      Track number, read from WM/TrackNumber (falling back to WM/Track). Returns 0 when not present.

      Returns number

    • set track(value: number): void

      Parameters

      • value: number

        New track number; sets the WM/TrackNumber attribute.

      Returns void

    • get year(): number

      Release year, read from the WM/Year attribute. Returns 0 when not present.

      Returns number

    • set year(value: number): void

      Parameters

      • value: number

        New year; sets the WM/Year attribute.

      Returns void

    Methods

    • Append attribute to the list stored under name, creating the entry if it doesn't exist.

      Parameters

      • name: string

        ASF attribute name.

      • attribute: AsfAttribute

        The attribute to append.

      Returns void

    • Return the keys of all complex (non-string) properties stored in this tag. Complex properties include embedded pictures and similar structured data.

      Returns string[]

      An array of property key strings, or an empty array if none.

    • Return true if key has at least one attribute in the map.

      Parameters

      • key: string

        ASF attribute name.

      Returns boolean

    • Remove all attributes stored under key.

      Parameters

      • key: string

        ASF attribute name.

      Returns void

    • Remove properties that are not supported by this tag format. The default implementation is a no-op; subclasses may override.

      Parameters

      • properties: string[]

      Returns void

    • Replace all attributes for name with a single attribute.

      Parameters

      • name: string

        ASF attribute name.

      • attribute: AsfAttribute

        The attribute to store.

      Returns void

    • Replace all attributes for name with the given list.

      Parameters

      • name: string

        ASF attribute name.

      • values: AsfAttribute[]

        The attribute list to store.

      Returns void

    • Set complex property values for the given key, replacing any existing values.

      Parameters

      Returns boolean

      true if the property was stored, false if the format does not support complex properties.

    • Copy tag fields from source to target. When overwrite is false, only empty fields in the target are filled in.

      Parameters

      • source: Tag

        The tag to copy values from.

      • target: Tag

        The tag to copy values into.

      • overwrite: boolean

        When true, all fields in target are overwritten; when false, only unset fields are populated.

      Returns void

    • Join an array of tag values with " / ".

      Parameters

      • values: string[]

        The string values to join.

      Returns string

      A single string with values separated by " / ".