node-taglib-sharp / Exports / AsfHeaderExtensionObject
This class extends BaseObject to provide a representation of an ASF header extension object which can be read from and written to disk.
-
↳
AsfHeaderExtensionObject
• get children(): AsfBaseObject[]
Gets the child ASF objects contained in the current instance.
Remarks
The returned array is a copy of the array of children inside this object. Any changes to this array will not be reflected in the object.
Only certain objects are valid inside a header extension object. Any objects that are
not valid or not supported are read as UnknownObject.
• get guid(): UuidWrapper
Gets the GUID that identifies the current instance.
BaseObject.guid
• get objectType(): AsfObjectType
Gets the type of the object for easy comparison.
BaseObject.objectType
• get originalSize(): number
Gets the original size of the current instance.
number
BaseObject.originalSize
▸ addUniqueObject(obj): void
Adds a unique child object to the current instance, replacing an existing child if present.
| Name | Type | Description |
|---|---|---|
obj |
AsfBaseObject |
Object to add to the current instance |
void
▸ Protected initializeFromFile(file, position): void
Initializes a new instance by reading the contents from a specified position in a specified file.
| Name | Type | Description |
|---|---|---|
file |
File |
File which contains the details of the new instance to create |
position |
number |
Position in file where the object begins |
void
AsfBaseObject.initializeFromFile
▸ Protected initializeFromGuid(guid): void
Initializes a new instance with a specified GUID.
| Name | Type | Description |
|---|---|---|
guid |
UuidWrapper |
GUID to use for the new instance. |
void
AsfBaseObject.initializeFromGuid
▸ render(): ByteVector
Renders the current instance as a raw ASF object.
▸ Protected renderInternal(data): ByteVector
Renders the current instance as a raw ASF object containing the specified data.
Remarks
Child classes implementing () should render their contents and then send the data through this method to produce the final output.
| Name | Type | Description |
|---|---|---|
data |
ByteVector |
Data to store in the rendered version of the current instance. |
▸ Static fromFile(file, position): AsfHeaderExtensionObject
Constructs and initialized a new instance by reading the contents from a specified position in the provided file.
| Name | Type | Description |
|---|---|---|
file |
File |
File containing contents that will be read into the new instance |
position |
number |
Position in the file where the instance begins |