AudioEncodingProperties.Bitrate | bitrate property

Applies to Windows and Windows Phone

Gets or sets the audio bit rate.

Syntax


var bitrate = audioEncodingProperties.bitrate;
audioEncodingProperties.bitrate = bitrate;

Property value

Type: Number [JavaScript] | System.UInt32 [.NET] | uint32 [C++]

The average bit rate of the audio stream, in bits per second.

Examples

The following example shows how to get the properties for the AudioEncodingProperties class.


function getProperties() {
    var encodingProperties = new Windows.Media.MediaProperties.AudioEncodingProperties();
    var bit_rate = encodingProperties.bitrate;
    var sampleBits = encodingProperties.bitsPerSample;
    var count = encodingProperties.channelCount;
    var s_rate = encodingProperties.sampleRate;
    var audioSubType = encodingProperties.subtype;
    var audioType = encodingProperties.type;
    if (audioType === "Audio" && audioSubType === "MP3") {
        // The format is an MP3 audio stream.
    }
}


Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Media.MediaProperties
Windows::Media::MediaProperties [C++]

Metadata

Windows.winmd

See also

AudioEncodingProperties

 

 

Show:
© 2014 Microsoft