Windows Dev Center

AudioEncodingProperties.Type | type property

Gets the format type.

Syntax


var type = audioEncodingProperties.type;

Property value

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

The format type. For audio streams, the format type is "Audio".

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 (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

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:
© 2015 Microsoft