AudioTrack AudioTrack AudioTrack AudioTrack Class

Definition

Represents an audio track.

public : sealed class AudioTrack : IAudioTrack, IMediaTrackpublic sealed class AudioTrack : IAudioTrack, IMediaTrackPublic NotInheritable Class AudioTrack Implements IAudioTrack, IMediaTrack// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Get an instance of this class by calling MediaPlaybackAudioTrackList.GetAt.

Properties

Id Id Id Id

Gets or sets the identifier for the audio track.

public : PlatForm::String Id { get; }public string Id { get; }Public ReadOnly Property Id As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The identifier for the audio track.

Label Label Label Label

Gets or sets the label for the audio track.

public : PlatForm::String Label { get; set; }public string Label { get; set; }Public ReadWrite Property Label As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The label for the audio track.

Language Language Language Language

Gets or sets a string indicating the language of the audio track.

public : PlatForm::String Language { get; }public string Language { get; }Public ReadOnly Property Language As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

A string indicating the language of the audio track.

Name Name Name Name

Gets the name of the AudioTrack.

public : PlatForm::String Name { get; }public string Name { get; }Public ReadOnly Property Name As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The name of the AudioTrack.

Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

PlaybackItem PlaybackItem PlaybackItem PlaybackItem

Gets the MediaPlaybackItem containing the AudioTrack.

public : MediaPlaybackItem PlaybackItem { get; }public MediaPlaybackItem PlaybackItem { get; }Public ReadOnly Property PlaybackItem As MediaPlaybackItem// You can use this property in JavaScript.
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Remarks

An AudioTrack is contained by a MediaPlaybackItem when it is in the item's AudioTracks collection. Use the PlaybackItem property to get a reference to the MediaPlaybackItem that contains the AudioTrack.

SupportInfo SupportInfo SupportInfo SupportInfo

Gets support information for the AudioTrack. This information includes the status of the audio decoder, information about any audio degradation applied by the decoder, and the status of the MediaSource with which the audio track is associated.

public : AudioTrackSupportInfo SupportInfo { get; }public AudioTrackSupportInfo SupportInfo { get; }Public ReadOnly Property SupportInfo As AudioTrackSupportInfo// You can use this property in JavaScript.
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Remarks

If a failure occurs when an AudioTrack is opened, you can get detailed status and failure information by handling the OpenFailed event and checking the SupportInfo property of the AudioTrack passed into the event as the sender.

TrackKind TrackKind TrackKind TrackKind

Gets a value indicating the type of data the track contains. For AudioTrack objects, this value is always MediaTrackKind::Audio.

public : MediaTrackKind TrackKind { get; }public MediaTrackKind TrackKind { get; }Public ReadOnly Property TrackKind As MediaTrackKind// You can use this property in JavaScript.
Value
MediaTrackKind MediaTrackKind MediaTrackKind MediaTrackKind

A value indicating the type of data the track contains.

Methods

GetEncodingProperties() GetEncodingProperties() GetEncodingProperties() GetEncodingProperties()

Gets the audio encoding properties for an AudioTrack.

public : AudioEncodingProperties GetEncodingProperties()public AudioEncodingProperties GetEncodingProperties()Public Function GetEncodingProperties() As AudioEncodingProperties// You can use this method in JavaScript.
Returns
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Events

OpenFailed OpenFailed OpenFailed OpenFailed

Occurs when an AudioTrack fails to open.

public : event TypedEventHandler OpenFailed<AudioTrack,  AudioTrackOpenFailedEventArgs>public event TypedEventHandler OpenFailed<AudioTrack,  AudioTrackOpenFailedEventArgs>Public Event OpenFailed<AudioTrack,  AudioTrackOpenFailedEventArgs>// You can use this event in JavaScript.
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Remarks

Register for the OpenFailed event for an AudioTrack from within the AudioTracksChanged event handler for a MediaPlaybackItem, which is raised whenever an audio track is added to the item.