Skip to content

Latest commit

 

History

History
312 lines (177 loc) · 7.14 KB

AsfExtendedContentDescriptionObject.md

File metadata and controls

312 lines (177 loc) · 7.14 KB

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

Name Type Description
descriptor AsfContentDescriptor Record 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

Name Type Description
...names string[] 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

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

Returns

void

Inherited from

AsfBaseObject.initializeFromFile


initializeFromGuid

Protected initializeFromGuid(guid): void

Initializes a new instance with a specified GUID.

Parameters

Name Type Description
guid UuidWrapper GUID 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

Name Type Description
name string Name 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

Name Type Description
data ByteVector Data 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

Name Type Description
name string Name of the descriptors to be added/removed
...descriptors AsfContentDescriptor[] 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

Name Type Description
file File File to read the instance from. Must not be falsey
position number Position in the file where the instance begins. Must be a positive, safe integer.

Returns

AsfExtendedContentDescriptionObject