Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MediaEncodingProfile.CreateMp3 | createMp3 method

Creates an encoding profile for MP3 (MPEG-1 layer 3) audio.

Syntax


var mediaEncodingProfile = Windows.Media.MediaProperties.MediaEncodingProfile.createMp3(quality);

Parameters

quality

Type: AudioEncodingQuality

Specifies whether to create a profile with a low bit rate, medium bit rate, or high bit rate.

Return value

Type: MediaEncodingProfile

Returns a media encoding profile.

Remarks

The encoding quality Auto is a special preset that fills in the proper settings based on the current camera settings. Settings that are manually modified are ignored. For example, if you create a preset profile using one the static create methods, such as CreateM4a, and specify Auto as the encoding quality, any changes you make to the properties will be overwritten with values based on the current camera settings.

Note  While it is technically possible to call CreateMp3, you cannot use this profile to transcode or encode audio into the MP3 format for Windows Phone Store apps. This is because an MP3 encoder is not shipped with Windows Phone. This API is included for completeness and allows you to use it with 3rd party MP3 encoders that you include with your app.

Examples

The following example creates a profile for Mp3 audio.


function Mp3Profile() {
    // Create Mp3 profile with medium audio encoding quality.
    var mediaProfile = Windows.Media.MediaProperties.MediaEncodingProfile.createMp3(Windows.Media.MediaProperties.AudioEncodingQuality.medium);
}


Requirements (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 (operating system)

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

MediaEncodingProfile

 

 

Show:
© 2015 Microsoft