If an error was thrown from the last operation such as read
or save
, this returns the error message. It is recommended
to check this property every operation.
Reads the tags from the buffer. If the decoding was successful, this sets the
tags
with the decoded tags otherwise this sets the
error
property with error. This always returns the tags
.
// Default Options
{
id3v1: true, // include ID3v1
id3v2: true // include ID3v2
}
This function is the same as the read
except that this is a
static function. If the decoding was unsuccessful, this throws an error.
Writes the tags
to the buffer. If the encoding was successful,
this writes the tags to the buffer then returns it otherwise this sets the
error
property with error. This always returns the buffer
.
// Default Options
{
strict: false, // Use strict mode when validating
id3v1: { include: false }, // Add ID3v1 tags to buffer
id3v2: {
include: true, // Add ID3v2 tags to buffer
unsynch: false, // Use unsynchronisation scheme
version: defaultVersion, // ID3v2 major version
padding: 2048 // Number of null bytes added after ID3v2 tag
}
}
This function is the same as the save
except that this is a
static function. If the encoding was unsuccessful, this throws an error.
Removes all the tags from the buffer. This always return true.
This function is the same as the getAudio
except that this is
a static function.