taglib-ts
    Preparing search index...

    Class RiffInfoTag

    RIFF INFO tag: a series of sub-chunks inside a LIST/INFO RIFF chunk.

    Each sub-chunk consists of a 4-character ASCII ID, a 4-byte little-endian size, and a null-terminated UTF-8 string padded to an even byte boundary.

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    • get album(): string

      Album name (IPRD).

      Returns string

      The album string, or "" if not set.

    • set album(v: string): void

      Sets the album name (IPRD).

      Parameters

      • v: string

        New album value; pass "" to remove.

      Returns void

    • get artist(): string

      Track artist (IART).

      Returns string

      The artist string, or "" if not set.

    • set artist(v: string): void

      Sets the track artist (IART).

      Parameters

      • v: string

        New artist value; pass "" to remove.

      Returns void

    • get comment(): string

      Comment text (ICMT).

      Returns string

      The comment string, or "" if not set.

    • set comment(v: string): void

      Sets the comment text (ICMT).

      Parameters

      • v: string

        New comment value; pass "" to remove.

      Returns void

    • get genre(): string

      Genre string (IGNR).

      Returns string

      The genre string, or "" if not set.

    • set genre(v: string): void

      Sets the genre string (IGNR).

      Parameters

      • v: string

        New genre value; pass "" to remove.

      Returns void

    • get isEmpty(): boolean

      True when every field is empty / zero.

      Returns boolean

    • get title(): string

      Track title (INAM).

      Returns string

      The title string, or "" if not set.

    • set title(v: string): void

      Sets the track title (INAM).

      Parameters

      • v: string

        New title value; pass "" to remove.

      Returns void

    • get track(): number

      Track number (IPRT preferred, falls back to ITRK).

      Returns number

      The track number, or 0 if absent or unparseable.

    • set track(v: number): void

      Sets the track number (IPRT); also removes any ITRK value.

      Parameters

      • v: number

        New track number; pass 0 to remove.

      Returns void

    • get year(): number

      Release year (ICRD), parsed as an integer.

      Returns number

      The year, or 0 if absent or unparseable.

    • set year(v: number): void

      Sets the release year (ICRD).

      Parameters

      • v: number

        New year value; pass 0 to remove.

      Returns void

    Methods

    • Return all complex property values for the given key.

      Parameters

      • _key: string

        The property key (e.g. "PICTURE").

      Returns VariantMap[]

      An array of VariantMap objects, or an empty array if the key is not present.

    • 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.

    • Returns the string value stored for the given INFO chunk ID.

      Parameters

      • id: string

        Four-character INFO chunk ID (case-insensitive).

      Returns string

      The stored string, or "" if not present.

    • Removes the field with the given INFO chunk ID from the tag.

      Parameters

      • id: string

        Four-character INFO chunk ID (case-insensitive).

      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[]

        Keys of the properties to remove.

      Returns void

    • Renders all INFO fields as a byte sequence suitable for inclusion inside a LIST/INFO chunk (sub-chunks only, without the outer LIST header or "INFO" fourCC).

      Returns ByteVector

      A ByteVector containing the serialised INFO sub-chunks.

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

      Parameters

      • _key: string

        The property key (e.g. "PICTURE").

      • _value: VariantMap[]

        The new values to store.

      Returns boolean

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

    • Sets (or removes) the string value for the given INFO chunk ID.

      Parameters

      • id: string

        Four-character INFO chunk ID (case-insensitive).

      • value: string

        New value; pass "" to delete the field.

      Returns void

    • 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 " / ".