/** @packageDocumentation RIFF INFO tag implementation. Reads and writes metadata stored in a LIST/INFO chunk. */ import { ByteVector } from "../byteVector.js"; import { Tag } from "../tag.js"; import { PropertyMap } from "../toolkit/propertyMap.js"; /** * 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. */ export declare class RiffInfoTag extends Tag { /** Internal map from uppercase INFO chunk IDs to their string values. */ private _fields; /** * Track title (`INAM`). * @returns The title string, or `""` if not set. */ get title(): string; /** * Sets the track title (`INAM`). * @param v - New title value; pass `""` to remove. */ set title(v: string); /** * Track artist (`IART`). * @returns The artist string, or `""` if not set. */ get artist(): string; /** * Sets the track artist (`IART`). * @param v - New artist value; pass `""` to remove. */ set artist(v: string); /** * Album name (`IPRD`). * @returns The album string, or `""` if not set. */ get album(): string; /** * Sets the album name (`IPRD`). * @param v - New album value; pass `""` to remove. */ set album(v: string); /** * Comment text (`ICMT`). * @returns The comment string, or `""` if not set. */ get comment(): string; /** * Sets the comment text (`ICMT`). * @param v - New comment value; pass `""` to remove. */ set comment(v: string); /** * Genre string (`IGNR`). * @returns The genre string, or `""` if not set. */ get genre(): string; /** * Sets the genre string (`IGNR`). * @param v - New genre value; pass `""` to remove. */ set genre(v: string); /** * Release year (`ICRD`), parsed as an integer. * @returns The year, or `0` if absent or unparseable. */ get year(): number; /** * Sets the release year (`ICRD`). * @param v - New year value; pass `0` to remove. */ set year(v: number); /** * Track number (`IPRT` preferred, falls back to `ITRK`). * @returns The track number, or `0` if absent or unparseable. */ get track(): number; /** * Sets the track number (`IPRT`); also removes any `ITRK` value. * @param v - New track number; pass `0` to remove. */ set track(v: number); /** * Parse INFO sub-chunks from raw data (the contents inside a LIST/INFO chunk, * after the `"INFO"` fourCC). * @param data - Raw bytes of the INFO chunk body. * @returns A new {@link RiffInfoTag} populated with the parsed fields. */ static readFrom(data: ByteVector): RiffInfoTag; /** * Returns the string value stored for the given INFO chunk ID. * @param id - Four-character INFO chunk ID (case-insensitive). * @returns The stored string, or `""` if not present. */ fieldText(id: string): string; /** * Sets (or removes) the string value for the given INFO chunk ID. * @param id - Four-character INFO chunk ID (case-insensitive). * @param value - New value; pass `""` to delete the field. */ setFieldText(id: string, value: string): void; /** * Removes the field with the given INFO chunk ID from the tag. * @param id - Four-character INFO chunk ID (case-insensitive). */ removeField(id: string): void; /** * Returns a {@link PropertyMap} built from the INFO fields currently set. * @returns A map of canonical property names to their values. */ properties(): PropertyMap; /** * Applies the given {@link PropertyMap} to this tag, updating INFO fields accordingly. * @param props - Property map containing new values to apply. * @returns A {@link PropertyMap} of properties that could not be mapped to INFO fields. */ setProperties(props: PropertyMap): PropertyMap; /** * 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 A {@link ByteVector} containing the serialised INFO sub-chunks. */ render(): ByteVector; } //# sourceMappingURL=infoTag.d.ts.map