Skip to content

Files

Latest commit

e5e2803 · Oct 29, 2023

History

History
147 lines (82 loc) · 3.21 KB

IOggCodec.md

File metadata and controls

147 lines (82 loc) · 3.21 KB

node-taglib-sharp / Exports / IOggCodec

Interface: IOggCodec

Interface for an OGG codec.

Hierarchy

Implemented by

Table of contents

Properties

Accessors

Methods

Properties

description

description: string

Gets a text description of the media represented by the current instance.

Inherited from

ICodec.description


durationMilliseconds

durationMilliseconds: number

Duration of the media in milliseconds represented by the current instance.

TODO

Ensure milliseconds is the right way to interpret this field

Inherited from

ICodec.durationMilliseconds


mediaTypes

mediaTypes: MediaTypes

Types of media represented by the current instance, bitwise combined.

Inherited from

ICodec.mediaTypes

Accessors

commentData

get commentData(): ByteVector

Gets the raw Xiph comment data contained in the codec.

Returns

ByteVector

Methods

readPacket

readPacket(packet): boolean

Reads an Ogg packet that has been encountered in the stream, looking for the comment data.

Parameters

Name Type Description
packet ByteVector Packet to read

Returns

boolean

true if the codec has read all the necessary packets for the stream and does not need to be called again,


setDuration

setDuration(firstGranularPosition, lastGranularPosition): void

Sets the file offset information necessary for calculating the duration of the stream. Once called, the duration can be accessed by calling durationMilliseconds.

Parameters

Name Type Description
firstGranularPosition ByteVector First granular position of the stream
lastGranularPosition ByteVector Last granular position of the stream

Returns

void


writeCommentPacket

writeCommentPacket(packets, comment): void

Renders and write the provided comment into the provided list of packets.

Parameters

Name Type Description
packets ByteVector[] List of packets the comment packet should be written into.
comment XiphComment Xiph comment to write into the list of packets.

Returns

void