taglib-wasm
Version:
TagLib for TypeScript platforms: Deno, Node.js, Bun, Electron, browsers, and Cloudflare Workers
201 lines • 6.65 kB
TypeScript
/**
* Standard tag property names used by TagLib.
* These constants provide type-safe access to tag properties with IDE autocomplete.
*
* @example
* ```typescript
* import { Tags } from 'taglib-wasm';
*
* // Read tags
* const title = file.tag.properties.get(Tags.Title);
* const artist = file.tag.properties.get(Tags.Artist);
*
* // Write tags
* file.tag.properties.set(Tags.Album, "Dark Side of the Moon");
* file.tag.properties.set(Tags.Year, "1973");
* ```
*/
export declare const Tags: {
/** Track/song title */
readonly Title: "TITLE";
/** Primary performer(s) */
readonly Artist: "ARTIST";
/** Album/collection name */
readonly Album: "ALBUM";
/** Date of recording (year) */
readonly Date: "DATE";
/** Track number on album */
readonly TrackNumber: "TRACKNUMBER";
/** Musical genre */
readonly Genre: "GENRE";
/** Comments/notes */
readonly Comment: "COMMENT";
/** Band/orchestra/ensemble */
readonly AlbumArtist: "ALBUMARTIST";
/** Original composer(s) */
readonly Composer: "COMPOSER";
/** Copyright information */
readonly Copyright: "COPYRIGHT";
/** Encoding software/person */
readonly EncodedBy: "ENCODEDBY";
/** Disc number for multi-disc sets */
readonly DiscNumber: "DISCNUMBER";
/** Beats per minute */
readonly Bpm: "BPM";
/** Lyrics/text writer(s) */
readonly Lyricist: "LYRICIST";
/** Conductor */
readonly Conductor: "CONDUCTOR";
/** Person who remixed */
readonly Remixer: "REMIXEDBY";
/** Language of vocals/lyrics */
readonly Language: "LANGUAGE";
/** Publisher */
readonly Publisher: "PUBLISHER";
/** Mood/atmosphere */
readonly Mood: "MOOD";
/** Media type (CD, vinyl, etc.) */
readonly Media: "MEDIA";
/** Radio station owner */
readonly RadioStationOwner: "RADIOSTATIONOWNER";
/** Producer */
readonly Producer: "PRODUCER";
/** Album subtitle */
readonly Subtitle: "SUBTITLE";
/** Release label */
readonly Label: "LABEL";
/** Sort name for title */
readonly TitleSort: "TITLESORT";
/** Sort name for artist */
readonly ArtistSort: "ARTISTSORT";
/** Sort name for album artist */
readonly AlbumArtistSort: "ALBUMARTISTSORT";
/** Sort name for album */
readonly AlbumSort: "ALBUMSORT";
/** Sort name for composer */
readonly ComposerSort: "COMPOSERSORT";
/** International Standard Recording Code */
readonly Isrc: "ISRC";
/** Amazon Standard Identification Number */
readonly Asin: "ASIN";
/** Catalog number */
readonly CatalogNumber: "CATALOGNUMBER";
/** Barcode (EAN/UPC) */
readonly Barcode: "BARCODE";
/** MusicBrainz Artist ID */
readonly MusicBrainzArtistId: "MUSICBRAINZ_ARTISTID";
/** MusicBrainz Release Artist ID */
readonly MusicBrainzReleaseArtistId: "MUSICBRAINZ_ALBUMARTISTID";
/** MusicBrainz Work ID */
readonly MusicBrainzWorkId: "MUSICBRAINZ_WORKID";
/** MusicBrainz Release ID */
readonly MusicBrainzReleaseId: "MUSICBRAINZ_ALBUMID";
/** MusicBrainz Recording ID */
readonly MusicBrainzRecordingId: "MUSICBRAINZ_TRACKID";
/** MusicBrainz Track ID (deprecated, use RecordingId) */
readonly MusicBrainzTrackId: "MUSICBRAINZ_TRACKID";
/** MusicBrainz Release Group ID */
readonly MusicBrainzReleaseGroupId: "MUSICBRAINZ_RELEASEGROUPID";
/** MusicBrainz Release Track ID */
readonly MusicBrainzReleaseTrackId: "MUSICBRAINZ_RELEASETRACKID";
/** Podcast identifier */
readonly PodcastId: "PODCASTID";
/** Podcast URL */
readonly PodcastUrl: "PODCASTURL";
/** Content group/work */
readonly Grouping: "GROUPING";
/** Work name */
readonly Work: "WORK";
/** Lyrics content */
readonly Lyrics: "LYRICS";
/** Album gain (ReplayGain) */
readonly AlbumGain: "REPLAYGAIN_ALBUM_GAIN";
/** Album peak (ReplayGain) */
readonly AlbumPeak: "REPLAYGAIN_ALBUM_PEAK";
/** Track gain (ReplayGain) */
readonly TrackGain: "REPLAYGAIN_TRACK_GAIN";
/** Track peak (ReplayGain) */
readonly TrackPeak: "REPLAYGAIN_TRACK_PEAK";
/** Original artist for covers */
readonly OriginalArtist: "ORIGINALARTIST";
/** Original album */
readonly OriginalAlbum: "ORIGINALALBUM";
/** Original release date */
readonly OriginalDate: "ORIGINALDATE";
/** Script/writing system */
readonly Script: "SCRIPT";
/** Involved people list */
readonly InvolvedPeopleList: "INVOLVEDPEOPLELIST";
/** Encoder settings/software */
readonly EncoderSettings: "ENCODERSETTINGS";
/** Source media */
readonly SourceMedia: "SOURCEMEDIA";
};
/**
* Type representing all valid tag property names
*/
export type TagName = typeof Tags[keyof typeof Tags];
/**
* Type guard to check if a string is a valid tag name
*/
export declare function isValidTagName(name: string): name is TagName;
/**
* Get all available tag names as an array
*/
export declare function getAllTagNames(): readonly TagName[];
/**
* Format-specific tag mappings (for reference only - TagLib handles these automatically)
* This shows how standard property names map to format-specific identifiers.
*/
export declare const FormatMappings: {
readonly Title: {
readonly id3v2: "TIT2";
readonly mp4: "©nam";
readonly vorbis: "TITLE";
readonly ape: "Title";
readonly riff: "INAM";
};
readonly Artist: {
readonly id3v2: "TPE1";
readonly mp4: "©ART";
readonly vorbis: "ARTIST";
readonly ape: "Artist";
readonly riff: "IART";
};
readonly Album: {
readonly id3v2: "TALB";
readonly mp4: "©alb";
readonly vorbis: "ALBUM";
readonly ape: "Album";
readonly riff: "IPRD";
};
readonly Date: {
readonly id3v2: "TDRC";
readonly mp4: "©day";
readonly vorbis: "DATE";
readonly ape: "Year";
readonly riff: "ICRD";
};
readonly Genre: {
readonly id3v2: "TCON";
readonly mp4: "©gen";
readonly vorbis: "GENRE";
readonly ape: "Genre";
readonly riff: "IGNR";
};
readonly Comment: {
readonly id3v2: "COMM";
readonly mp4: "©cmt";
readonly vorbis: "COMMENT";
readonly ape: "Comment";
readonly riff: "ICMT";
};
readonly TrackNumber: {
readonly id3v2: "TRCK";
readonly mp4: "trkn";
readonly vorbis: "TRACKNUMBER";
readonly ape: "Track";
readonly riff: "ITRK";
};
};
//# sourceMappingURL=constants.d.ts.map