Class: AsfExtendedContentDescriptionObject

November 25, 2024 · View on GitHub

node-taglib-sharp / Exports / AsfExtendedContentDescriptionObject

Class: AsfExtendedContentDescriptionObject

This class provides a representation of an ASF extended contend description object which can be read from and written to disk.

Hierarchy

Table of contents

Accessors

Methods

Accessors

descriptors

get descriptors(): AsfContentDescriptor[]

Gets all descriptors stored in the current instance.

Returns

AsfContentDescriptor[]


guid

get guid(): UuidWrapper

Gets the GUID that identifies the current instance.

Returns

UuidWrapper

Inherited from

BaseObject.guid


isEmpty

get isEmpty(): boolean

Gets whether the current instance contains any records.

Returns

boolean

true if the current instance does not contain any records, false otherwise.


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

addDescriptor

addDescriptor(descriptor): void

Adds a descriptor to the current instance.

Parameters

NameTypeDescription
descriptorAsfContentDescriptorRecord to add to the current instance

Returns

void


getDescriptors

getDescriptors(...names): AsfContentDescriptor[]

Gets all descriptors with a name matching one of the provided collection of names the current instance.

Parameters

NameTypeDescription
...namesstring[]List of names of the records to return

Returns

AsfContentDescriptor[]


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


removeDescriptors

removeDescriptors(name): void

Removes all descriptors with a given name from the current instance.

Parameters

NameTypeDescription
namestringName of the descriptor to be removed

Returns

void


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


setDescriptors

setDescriptors(name, ...descriptors): void

Sets a collection of descriptors for a given name, removing the existing matching records.

Remarks

All added descriptors should have their name set to name but this is not verified by the method. The descriptors will be added with their own names and not the one provided as an argument, which is only used for removing existing values and determining where to position the new descriptors.

Parameters

NameTypeDescription
namestringName of the descriptors to be added/removed
...descriptorsAsfContentDescriptor[]Descriptors to add to the new instance

Returns

void


fromEmpty

Static fromEmpty(): AsfExtendedContentDescriptionObject

Constructs and initializes a new, empty extended content description object.

Returns

AsfExtendedContentDescriptionObject


fromFile

Static fromFile(file, position): AsfExtendedContentDescriptionObject

Constructs and initializes a new instance that is read in from the provided file at the provided position.

Parameters

NameTypeDescription
fileFileFile to read the instance from. Must not be falsey
positionnumberPosition in the file where the instance begins. Must be a positive, safe integer.

Returns

AsfExtendedContentDescriptionObject