taglib-ts
    Preparing search index...

    Matroska tag implementation. Reads SimpleTag elements from Tags/Tag elements.

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    • set segmentTitle(value: string): void

      Parameters

      • value: string

        Segment title from the Info element.

      Returns void

    • get title(): string

      Track title, falling back to the segment title if no TITLE tag is set.

      Returns string

    • set title(value: string): void

      Parameters

      • value: string

        Track title.

      Returns void

    • get track(): number

      Track number, parsed from the TRACKNUMBER tag. Returns 0 if not set.

      Returns number

    • set track(value: number): void

      Parameters

      • value: number

        Track number; set to 0 to clear.

      Returns void

    • get year(): number

      Release year, parsed from the DATE tag. Returns 0 if not set.

      Returns number

    • set year(value: number): void

      Parameters

      • value: number

        Release year; set to 0 to clear.

      Returns void

    Methods

    • Returns complex property values for the given key. Only handles complex simple tags (binary, trackUid, etc.). PICTURE and other attachment-keyed properties are handled at the file level.

      Parameters

      • key: string

        The complex property key.

      Returns VariantMap[]

      An array of variant maps, one per value.

    • Inserts a SimpleTag at the given index.

      Parameters

      • index: number

        Position to insert at.

      • tag: SimpleTag

        The SimpleTag to insert.

      Returns void

    • Removes a SimpleTag by index or by name and optional target type value.

      Parameters

      • indexOrName: string | number

        Index (number) or tag name (string) to remove.

      • OptionaltargetTypeValue: TargetTypeValue

        If removing by name, optionally match this target type.

      Returns void

    • Set or replace complex property values for the given key. Handles non-PICTURE complex simple tags (e.g. DURATION with trackUid, binary tags, tags with non-standard targetTypeValue). Returns false for "PICTURE" — handled at the file level.

      Parameters

      • key: string

        The property key.

      • value: VariantMap[]

        Array of variant maps to set.

      Returns boolean

      true if the key was handled here, false otherwise.

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