parse-audio-metadata
v1.3.1
Published
Audio file metadata parser for a browser
Downloads
44
Maintainers
Readme
parse-audio-metadata
Audio file metadata parser for the browser and Node.js.
Supported audio file types
mp3 with ID3v2.3 and ID3v2.4 headers, flac, opus, ogg, wav and m4a.
Installation
npm install parse-audio-metadata
Usage
The input
can be of type File/Blob, ArrayBuffer.
import parseAudioMetadata from "parse-audio-metadata";
const metadata = await parseAudioMetadata(input);
or
const { default: parseAudioMetadata } = await import("parse-audio-metadata");
const metadata = await parseAudioMetadata(input);
To run in node use code bellow to get the blob.
import { openAsBlob } from "node:fs";
const blob = await openAsBlob(filePath);