Options
All
  • Public
  • Public/Protected
  • All
Menu

Class for

  • building an ID3v2.4.0 object

Basic usage example:

import {ID3v2, ID3V24TagBuilder, IID3V2} from 'jamp3';

async function run(): Promise<void> {
const id3v2 = new ID3v2();
const filename = 'demo.mp3';

const builder = new ID3V24TagBuilder(ID3V24TagBuilder.encodings.utf8);
builder
.album('An album')
.artist('An artist')
.artistSort('artist, An')
.title('A title');

const options: IID3V2.WriteOptions = {
keepBackup: true, // keep a filename.mp3.bak copy of the original file
paddingSize: 10 // add padding zeros between id3v2 and the audio (in bytes)
};
await id3v2.writeBuilder(filename, builder, options);
console.log('id3v2.4 written');
}

run().catch(e => {
console.error(e);
});

Hierarchy

  • ID3V24TagBuilder

Implements

Index

Constructors

Properties

rawBuilder: ID3V2RawBuilder
encodings: { iso88591: string; ucs2: string; utf16be: string; utf8: string } = ...

Type declaration

  • iso88591: string
  • ucs2: string
  • utf16be: string
  • utf8: string

Methods

  • audioEncryption(id: string, previewStart: number, previewLength: number, bin: Buffer): ID3V24TagBuilder
  • BPM: contains the number of beats per minute in the main part of the audio. The BPM is an integer and represented as a numerical string.

    Parameters

    • Optional value: string | number

    Returns ID3V24TagBuilder

  • chapterTOC(value: string, id: string, ordered: boolean, topLevel: boolean, children: string[]): ID3V24TagBuilder
  • TENC: The 'Encoded by' frame contains the name of the person or organisation that encoded the audio file. This field may contain a copyright message, if the audio file also is copyrighted by the encoder.

    Parameters

    • Optional value: string

    Returns ID3V24TagBuilder

  • eventTimingCodes(timeStampFormat: number, events: { timestamp: number; type: number }[]): ID3V24TagBuilder
  • TIPL: The 'Involved people list' is intended as a mapping between the function and a person

    Parameters

    • group: string

      function, e.g. producer

    • Optional value: string

      a name or comma seperated list of names

    Returns ID3V24TagBuilder

  • linkedInformation(id: string, url: string, additional: string[]): ID3V24TagBuilder
  • TMCL The 'Musician credits list' is intended as a mapping between instruments and the musician that played it.

    Parameters

    • group: string

      an instrument

    • Optional value: string

      an artist or a comma delimited list of artists

    Returns ID3V24TagBuilder

  • object(filename: string, mimeType: string, contentDescription: string, bin: Buffer): ID3V24TagBuilder
  • WOAS The 'Official audio source webpage' frame is a URL pointing at the official webpage for the source of the audio file, e.g. a movie.

    Parameters

    • Optional value: string

    Returns ID3V24TagBuilder

  • TOAL The 'Original album/movie/show title' frame is intended for the title of the original recording (or source of sound), if for example the music in the file should be a cover of a previously released song.

    Parameters

    • Optional value: string

    Returns ID3V24TagBuilder

  • TOPE: The 'Original artist/performer' frame is intended for the performer of the original recording, if for example the music in the file should be a cover of a previously released song.

    Parameters

    • Optional value: string

    Returns ID3V24TagBuilder

  • TDOR: The 'Original release time' frame contains a timestamp describing when the original recording of the audio was released.

    Parameters

    • Optional value: string

      timestamp in UTC yyyy, yyyy-MM, yyyy-MM-dd, yyyy-MM-ddTHH, yyyy-MM-ddTHH:mm, yyyy-MM-ddTHH:mm:ss

    Returns ID3V24TagBuilder

  • TOFN: The 'Original filename' frame contains the preferred filename for the file, since some media doesn't allow the desired length of the filename. The filename is case sensitive and includes its suffix.

    Parameters

    • Optional value: string

    Returns ID3V24TagBuilder

  • TOLY: The 'Original lyricist/text writer' frame is intended for the text writer of the original recording, if for example the music in the file should be a cover of a previously released song.

    Parameters

    • Optional value: string

    Returns ID3V24TagBuilder

  • picture(pictureType: number, description: string, mimeType: string, binary: Buffer): ID3V24TagBuilder
  • PCNT: This is simply a counter of the number of times a file has been played. The value is increased by one every time the file begins to play.

    Parameters

    • Optional value: number

    Returns ID3V24TagBuilder

  • TDLY: The 'Playlist delay' defines the numbers of milliseconds of silence that should be inserted before this audio. The value zero indicates that this is a part of a multifile audio track that should be played continuously.

    Parameters

    • Optional value: string

    Returns ID3V24TagBuilder

  • relativeVolumeAdjustment(key: string, right: number, left: number, peakRight?: number, peakLeft?: number, rightBack?: number, leftBack?: number, peakRightBack?: number, peakLeftBack?: number, center?: number, peakCenter?: number, bass?: number, peakBass?: number): ID3V24TagBuilder
  • Parameters

    • key: string
    • right: number
    • left: number
    • Optional peakRight: number
    • Optional peakLeft: number
    • Optional rightBack: number
    • Optional leftBack: number
    • Optional peakRightBack: number
    • Optional peakLeftBack: number
    • Optional center: number
    • Optional peakCenter: number
    • Optional bass: number
    • Optional peakBass: number

    Returns ID3V24TagBuilder

  • relativeVolumeAdjustment2(id: string, channels: { adjustment: number; peak?: number; type: number }[]): ID3V24TagBuilder
  • TPE4: The 'Interpreted, remixed, or otherwise modified by' frame contains more information about the people behind a remix and similar interpretations of another existing piece.

    Parameters

    • Optional value: string

    Returns ID3V24TagBuilder

  • replayGainAdjustment(peak: number, radioAdjustment: number, audiophileAdjustment: number): ID3V24TagBuilder
  • rev(): number
  • synchronisedLyrics(id: string, language: string, timestampFormat: number, contentType: number, events: { text: string; timestamp: number }[]): ID3V24TagBuilder
  • track(trackNr?: string | number, trackTotal?: string | number): ID3V24TagBuilder
  • UFID: Unique file identifier, purpose is to be able to identify the audio file in a database, that may provide more information relevant to the content.

    Parameters

    • id: string

      a URL containing an email address, or a link to a location where an email address can be found, that belongs to the organisation responsible for this specific database implementation.

    • Optional value: string

      actual identifier, which may be up to 64 bytes

    Returns ID3V24TagBuilder

  • version(): number
  • WOAR: The 'Official artist/performer webpage' frame is a URL pointing at the artists official webpage. There may be more than one "WOAR" frame in a tag if the audio contains more than one performer, but not with the same content.

    Parameters

    • Optional value: string

    Returns ID3V24TagBuilder

Generated using TypeDoc