Options
All
  • Public
  • Public/Protected
  • All
Menu

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(e => {
console.error(e);
});

Hierarchy

  • ID3v1

Index

Constructors

Methods

  • read(filename: string): Promise<undefined | IID3V1.Tag>
  • 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

  • readStream(stream: Readable): Promise<undefined | IID3V1.Tag>
  • 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>

Generated using TypeDoc