node-taglib-sharp / Exports / Id3v2FrameHeader
This class provides a representation of an ID3v2 frame header which can be read from and written to disk.
• new Id3v2FrameHeader(id, flags?, frameSize?)
Constructs and initializes a new instance by processing the data for the frame header.
| Name | Type | Default value | Description |
|---|---|---|---|
id |
Id3v2FrameIdentifier |
undefined |
Identifier of the frame |
flags |
Id3v2FrameFlags |
Id3v2FrameFlags.None |
Flags to assign to the frame (if omitted, defaults to None) |
frameSize |
number |
0 |
Size of the frame in bytes, excluding the size of the header (if omitted, defaults to 0) |
• get flags(): Id3v2FrameFlags
Gets the flags applied to the current instance.
• set flags(value): void
Sets the flags applied to the current instance.
| Name | Type |
|---|---|
value |
Id3v2FrameFlags |
void
• get frameId(): Id3v2FrameIdentifier
Gets the identifier of the frame described by the current instance.
• set frameId(value): void
Sets the identifier of the frame described by the current instance.
| Name | Type |
|---|---|
value |
Id3v2FrameIdentifier |
void
• get frameSize(): number
Gets the size of the frame described by the current instance, minus the header.
number
• set frameSize(value): void
Sets the size of the frame described by the current instance, minus the header. Must be a positive, safe integer.
| Name | Type |
|---|---|
value |
number |
void
▸ render(version): ByteVector
Renders the current instance, encoded in a specified ID3v2 version.
| Name | Type | Description |
|---|---|---|
version |
number |
Version of ID3v2 to use when encoding the current instance. |
▸ Static fromData(data, version): Id3v2FrameHeader
Constructs and initializes a new instance of Id3v2FrameHeader by reading it from raw header data of a specified version.
| Name | Type | Description |
|---|---|---|
data |
ByteVector |
Raw data to build the new instance from. If the data size is smaller than the size of a full header, the data is just treated as a frame identifier and the remaining values are zeroed. |
version |
number |
ID3v2 version with which the data in data was encoded. |
▸ Static fromFrameIdentifier(id): Id3v2FrameHeader
Constructs and initializes a new, blank frame header of size 0, with the provided frame identifier.
| Name | Type | Description |
|---|---|---|
id |
Id3v2FrameIdentifier |
Identifier for the frame |
▸ Static getSize(version): number
Gets the size of a header for a specified ID3v2 version.
| Name | Type | Description |
|---|---|---|
version |
number |
Version of ID3v2 to get the size for. Must be a positive integer < 256 |
number