node-taglib-sharp / Exports / MpegAudioHeader
Provides information about an MPEG audio stream. For more information and definition of the header, see http://www.mpgedit.org/mpgedit/mpeg_format/mpeghdr.htm
- audioBitrate
- audioChannels
- audioFrameLength
- audioLayer
- audioSampleRate
- channelMode
- description
- durationMilliseconds
- isCopyrighted
- isOriginal
- isPadded
- isProtected
- mediaTypes
- vbriHeader
- version
- xingHeader
▪ Static Readonly UNKNOWN: MpegAudioHeader
Static instance of an audio header that has unknown information.
• get audioBitrate(): number
Bitrate of the audio in kilobits per second represented by the current instance.
number
• get audioChannels(): number
Number of channels in the audio represented by the current instance.
number
• get audioFrameLength(): number
Gets the length of the frames in the audio represented by the current instance.
number
• get audioLayer(): number
Gets the MPEG audio layer used to encode the audio represented by the current instance.
number
• get audioSampleRate(): number
Sample rate of the audio represented by the current instance.
number
• get channelMode(): MpegAudioChannelMode
Gets the MPEG audio channel mode of the audio represented by the current instance.
• get description(): string
Gets a text description of the media represented by the current instance.
string
• get durationMilliseconds(): number
Duration of the media in milliseconds represented by the current instance.
number
IAudioCodec.durationMilliseconds
• get isCopyrighted(): boolean
Whether or not the current audio is copyrighted.
boolean
• get isOriginal(): boolean
Whether or not the current audio is original.
boolean
• get isPadded(): boolean
Whether or not the audio represented by the current instance is padded.
boolean
• get isProtected(): boolean
Gets whether the audio represented by the current instance is protected by CRC.
boolean
• get mediaTypes(): MediaTypes
Types of media represented by the current instance, bitwise combined.
• get vbriHeader(): MpegVbriHeader
Gets the VBRI header found in the audio. VbriHeader.UNKNOWN is returned if no header was found.
• get version(): MpegVersion
Gets the MPEG version used to encode the audio represented by the current instance.
• get xingHeader(): MpegXingHeader
Gets the Xing header found in the audio. XingHeader.UNKNOWN is returned if no header was found.
▸ Static find(file, position, length?): MpegAudioHeader
Searches for an audio header in a file starting at a specified position and searching through a specified number of bytes.
| Name | Type | Description |
|---|---|---|
file |
File |
File to search |
position |
number |
Position in file at which to start searching |
length? |
number |
Maximum number of bytes to search before giving up. Defaults to -1 to have no maximum |
The header that was found or undefined if a header was not found
▸ Static fromData(data, file, position): MpegAudioHeader
Constructs and initializes a new instance by reading its contents from a data ByteVector and its Xing header from the appropriate location in the specified file.
| Name | Type | Description |
|---|---|---|
data |
ByteVector |
The header data to read |
file |
File |
File to read the Xing/VBRI header from |
position |
number |
Position into file where the header begins, must be a positive 8-bit integer. |
▸ Static fromInfo(flags, streamLength, xingHeader, vbriHeader): MpegAudioHeader
Constructs and initializes a new instance by populating it with specified values.
| Name | Type | Description |
|---|---|---|
flags |
number |
Flags for the new instance |
streamLength |
number |
Stream length of the new instance |
xingHeader |
MpegXingHeader |
Xing header associated with the new instance |
vbriHeader |
MpegVbriHeader |
VBRI header associated with the new instance |