node-taglib-sharp / Exports / Id3v2TagHeader
This class provides a representation of an ID3v2 tag header which can be read from and written to disk.
• new Id3v2TagHeader()
▪ Static Readonly FILE_IDENTIFIER: ByteVector
The identifier used to recognize an ID3v2 header.
• get completeTagSize(): number
Gets the complete size of the tag described by the current instance including the header and footer.
number
• get flags(): Id3v2TagHeaderFlags
Gets the flags applied to the current instance.
• set flags(value): void
Sets the flags applied to the current instance.
| Name | Type | Description |
|---|---|---|
value |
Id3v2TagHeaderFlags |
Bitwise combined Id3v2TagHeaderFlags value containing the flags to apply to the current instance. |
void
• get majorVersion(): number
Gets the major version of the tag described by the current instance.
number
• set majorVersion(value): void
Sets the major version of the tag described by the current instance. When the version is set, unsupported header flags will automatically be removed from the tag.
| Name | Type | Description |
|---|---|---|
value |
number |
ID3v2 version of tag. Must be a positive 8-bit integer betweenInclusive 2 and 4. |
void
• get revisionNumber(): number
Gets the version revision number of the tag represented by the current instance.
number
• set revisionNumber(value): void
Sets the version revision number of the tag represented by the current instance. This value should always be zero. Non-zero values indicate an experimental or new version of the format which may not be completely understood by the current version of node-taglib-sharp. Some software may refuse to read tags with a non-zero value.
| Name | Type | Description |
|---|---|---|
value |
number |
Version revision number of the tag represented by the current instance. Must be an 8-bit unsigned integer. |
void
• get tagSize(): number
Gets the complete size of the tag described by the current instance, minus the header and footer.
number
• set tagSize(value): void
Sets the complete size of the tag described by the current instance, minus the header footer. NOTE THIS MUST BE A 28-BIT UNSIGNED INTEGER.
| Name | Type | Description |
|---|---|---|
value |
number |
Size of the tag in bytes. Must be an unsigned 28-bit integer |
void
▸ render(): ByteVector
Renders the current instance as a raw ID3v2 header
▸ Static fromData(data): Id3v2TagHeader
Constructs and initializes a new instance by reading it from the raw header data.
| Name | Type | Description |
|---|---|---|
data |
ByteVector |
Object containing the raw data to build the new instance from. |