Class: AsfHeaderExtensionObject

March 10, 2023 · View on GitHub

node-taglib-sharp / Exports / AsfHeaderExtensionObject

Class: AsfHeaderExtensionObject

This class extends BaseObject to provide a representation of an ASF header extension object which can be read from and written to disk.

Hierarchy

Table of contents

Accessors

Methods

Accessors

children

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.

Returns

AsfBaseObject[]


guid

get guid(): UuidWrapper

Gets the GUID that identifies the current instance.

Returns

UuidWrapper

Inherited from

BaseObject.guid


objectType

get objectType(): AsfObjectType

Gets the type of the object for easy comparison.

Returns

AsfObjectType

Overrides

BaseObject.objectType


originalSize

get originalSize(): number

Gets the original size of the current instance.

Returns

number

Inherited from

BaseObject.originalSize

Methods

addUniqueObject

addUniqueObject(obj): void

Adds a unique child object to the current instance, replacing an existing child if present.

Parameters

NameTypeDescription
objAsfBaseObjectObject to add to the current instance

Returns

void


initializeFromFile

Protected initializeFromFile(file, position): void

Initializes a new instance by reading the contents from a specified position in a specified file.

Parameters

NameTypeDescription
fileFileFile which contains the details of the new instance to create
positionnumberPosition in file where the object begins

Returns

void

Inherited from

AsfBaseObject.initializeFromFile


initializeFromGuid

Protected initializeFromGuid(guid): void

Initializes a new instance with a specified GUID.

Parameters

NameTypeDescription
guidUuidWrapperGUID to use for the new instance.

Returns

void

Inherited from

AsfBaseObject.initializeFromGuid


render

render(): ByteVector

Renders the current instance as a raw ASF object.

Returns

ByteVector

Overrides

AsfBaseObject.render


renderInternal

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.

Parameters

NameTypeDescription
dataByteVectorData to store in the rendered version of the current instance.

Returns

ByteVector

Inherited from

AsfBaseObject.renderInternal


fromFile

Static fromFile(file, position): AsfHeaderExtensionObject

Constructs and initialized a new instance by reading the contents from a specified position in the provided file.

Parameters

NameTypeDescription
fileFileFile containing contents that will be read into the new instance
positionnumberPosition in the file where the instance begins

Returns

AsfHeaderExtensionObject