MediaElement.AudioCategory Property

Definition

Gets or sets a value that describes the purpose of the audio information in an audio stream.

public:
 property AudioCategory AudioCategory { AudioCategory get(); void set(AudioCategory value); };
AudioCategory AudioCategory();

void AudioCategory(AudioCategory value);
public AudioCategory AudioCategory { get; set; }
var audioCategory = mediaElement.audioCategory;
mediaElement.audioCategory = audioCategory;
Public Property AudioCategory As AudioCategory
<MediaElement AudioCategory="audioCategoryMemberName" /.

Property Value

A value of the enumeration.

Remarks

For hardware audio offload to be automatically applied, the audio category must be set to ForegroundOnlyMedia or BackgroundCapableMedia. Hardware audio offload optimizes audio rendering which can improve functionality and battery life.

Applies to

See also