node-taglib-sharp / Exports / AsfHeaderObject
This class provides a representation of an ASF header object which can be read from and written to disk.
-
↳
AsfHeaderObject
- addUniqueObject
- initializeFromFile
- initializeFromGuid
- removeContentDescriptor
- render
- renderInternal
- fromFile
• get
children(): AsfBaseObject
[]
Gets that child objects of this 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 object. Any objects that are not valid or
not supported are read as UnknownObject.
• get
extension(): AsfHeaderExtensionObject
Gets the header extension object contained in the current instance.
Header extension contained in this instance, if it exists.
undefined
is returned if it doesn't exist
• get
guid(): UuidWrapper
Gets the GUID that identifies the current instance.
BaseObject.guid
• get
hasContentDescriptors(): boolean
Gets whether the current instance contains either type of content descriptors.
boolean
true
if a content description object or extended content description
object exists in this instance. false
otherwise
• 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
• get
properties(): Properties
Get the media properties contained within the current instance.
▸ 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
▸ removeContentDescriptor(): void
Removes the content description objects from the current instance.
void
▸ 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
): AsfHeaderObject
Constructs and initializes 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 |