jamp3
    Preparing search index...

    Class ID3v1

    Class for

    • reading ID3v1
    • writing ID3v1
    • removing ID3v1

    Basic usage example:

    import { ID3v1 } from 'jamp3';

    async function run(): Promise<void> {
    const id3v1 = new ID3v1();
    const filename = 'demo.mp3';
    const tag = await id3v1.read(filename);
    console.log('id3v1:', tag);
    }

    run().catch(console.error);
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Reads a filename & returns ID3v1 tag as Object

      Parameters

      • filename: string

        the file to read

      Returns Promise<undefined | IID3V1.Tag>

      a object returning i3v1 tag if found

    • Reads a stream & returns ID3v1 tag as Object

      Parameters

      • stream: Readable

        the stream to read (NodeJS.stream.Readable)

      Returns Promise<undefined | IID3V1.Tag>

      a object returning i3v1 tag if found

    • Removes ID3v1 Tag from a file with given options

      Parameters

      Returns Promise<boolean>

      true if tag has been found and removed

    • Writes ID3v1 Tag from an ID3v1 object with given options

      Parameters

      • filename: string

        the file to write

      • tag: ID3v1Tag

        the ID3v1 object to write

      • version: number

        the ID3v1.v version to write

      • options: IID3V1.WriteOptions

        write options

      Returns Promise<void>