Skip to content

Latest commit

 

History

History
283 lines (158 loc) · 5.91 KB

AsfHeaderObject.md

File metadata and controls

283 lines (158 loc) · 5.91 KB

node-taglib-sharp / Exports / AsfHeaderObject

Class: AsfHeaderObject

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

Hierarchy

Table of contents

Accessors

Methods

Accessors

children

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.

Returns

AsfBaseObject[]


extension

get extension(): AsfHeaderExtensionObject

Gets the header extension object contained in the current instance.

Returns

AsfHeaderExtensionObject

Header extension contained in this instance, if it exists. undefined is returned if it doesn't exist


guid

get guid(): UuidWrapper

Gets the GUID that identifies the current instance.

Returns

UuidWrapper

Inherited from

BaseObject.guid


hasContentDescriptors

get hasContentDescriptors(): boolean

Gets whether the current instance contains either type of content descriptors.

Returns

boolean

true if a content description object or extended content description object exists in this instance. 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


properties

get properties(): Properties

Get the media properties contained within the current instance.

Returns

Properties

Methods

addUniqueObject

addUniqueObject(obj): void

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

Parameters

Name Type Description
obj AsfBaseObject Object 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

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


removeContentDescriptor

removeContentDescriptor(): void

Removes the content description objects from the current instance.

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


fromFile

Static fromFile(file, position): AsfHeaderObject

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

Parameters

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

Returns

AsfHeaderObject