taglib-wasm
Version:
TagLib-Wasm is the universal tagging library for TypeScript/JavaScript platforms: Browsers, Node.js, Deno, Bun, Cloudflare Workers, and Electron apps
56 lines (55 loc) • 1.23 kB
JavaScript
const COMPLEX_PROPERTIES = {
PICTURE: {
key: "PICTURE",
description: "Embedded album art or images",
type: "binary",
supportedFormats: ["ID3v2", "MP4", "Vorbis", "FLAC"],
mappings: {
id3v2: { frame: "APIC" },
mp4: "covr",
vorbis: "METADATA_BLOCK_PICTURE",
flac: "PICTURE"
}
},
RATING: {
key: "RATING",
description: "Track rating (normalized 0.0-1.0)",
type: "object",
supportedFormats: ["ID3v2", "Vorbis", "MP4"],
mappings: {
id3v2: { frame: "POPM" },
vorbis: "RATING",
mp4: "----:com.apple.iTunes:RATING"
}
},
LYRICS: {
key: "LYRICS",
description: "Unsynchronized lyrics text",
type: "object",
supportedFormats: ["ID3v2", "Vorbis", "MP4"],
mappings: {
id3v2: { frame: "USLT" },
vorbis: "LYRICS",
mp4: "\xA9lyr"
}
},
CHAPTER: {
key: "CHAPTER",
description: "Chapter markers with time ranges",
type: "object",
supportedFormats: ["ID3v2"],
mappings: {
id3v2: { frame: "CHAP" }
}
}
};
const COMPLEX_PROPERTY_KEY = {
PICTURE: "PICTURE",
RATING: "RATING",
LYRICS: "LYRICS",
CHAPTER: "CHAPTER"
};
export {
COMPLEX_PROPERTIES,
COMPLEX_PROPERTY_KEY
};