Class: Properties
March 10, 2023 · View on GitHub
node-taglib-sharp / Exports / Properties
Class: Properties
This interface provides information specific to lossless audio codecs. When dealing with an ICodec, if mediaTypes contains LosslessAudio, it is safe to assume that the object also inherits ILosslessAudioCodec and can be recast without issue.
Implements
Table of contents
Constructors
Accessors
- audioBitrate
- audioChannels
- audioSampleRate
- bitsPerSample
- codecs
- description
- durationMilliseconds
- mediaTypes
- photoHeight
- photoQuality
- photoWidth
- videoHeight
- videoWidth
Constructors
constructor
• new Properties(durationMilli?, codecs?)
Constructs and initializes a new instance of Properties with the specified codecs and duration.
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
durationMilli | number | 0 | Duration of the media in milliseconds or 0 if the duration is to be read from the codecs. |
codecs | ICodec[] | [] | Array of codecs to be used in the new instance. |
Accessors
audioBitrate
• get audioBitrate(): number
Gets the bitrate of the audio represented by the current instance. This value is equal to the first non-zero audio bitrate, or zero if no codecs with audio information were found.
Returns
number
Implementation of
ILosslessAudioCodec.audioBitrate
audioChannels
• get audioChannels(): number
Gets the number of channels in the audio represented by the current instance.
Returns
number
Implementation of
ILosslessAudioCodec.audioChannels
audioSampleRate
• get audioSampleRate(): number
Gets the sample rate of the audio represented by the current instance. This value is equal to the first non-zero audio bitrate, or zero if no audio codecs were found.
Returns
number
Implementation of
ILosslessAudioCodec.audioSampleRate
bitsPerSample
• get bitsPerSample(): number
Gets the number of bits per sample in the audio represented by the current instance. This value is equal to the first non-zero quantization, or zero if no lossless audio codecs were found in the current instance.
Returns
number
Implementation of
ILosslessAudioCodec.bitsPerSample
codecs
• get codecs(): ICodec[]
Gets the codecs contained in the current instance.
Remarks
The list of codecs should not be modified. As such, the returned codec list is a copy of codec list stored in this instance.
Returns
ICodec[]
description
• get description(): string
Gets a string description of the media represented by the current instance. Values are joined by semicolons.
Returns
string
Implementation of
durationMilliseconds
• get durationMilliseconds(): number
Gets the duration of the media represented by the current instance. If the value was set in the constructor, that value is returned, otherwise the longest codec duration is used.
Returns
number
Implementation of
IPhotoCodec.durationMilliseconds
mediaTypes
• get mediaTypes(): MediaTypes
Gets the types of media represented by the current instance.
Returns
Implementation of
photoHeight
• get photoHeight(): number
Gets the height of the photo in pixels represented by the current instance.
Returns
number
Implementation of
photoQuality
• get photoQuality(): number
Gets the format-specific quality identifier of the photo represented by the current
instance. A value of 0 means that there was no quality indicator for the format or file.
Returns
number
Implementation of
photoWidth
• get photoWidth(): number
Gets the width of the photo in pixels represented by the current instance.
Returns
number
Implementation of
videoHeight
• get videoHeight(): number
Gets the height of the video represented by the current instance. This value is equal to the first non-zero video height;
Returns
number
Implementation of
videoWidth
• get videoWidth(): number
Gets the width of the video represented by the current instance. This value is equal to the first non-zero video height.
Returns
number