MediaPlaybackAudioTrackList MediaPlaybackAudioTrackList MediaPlaybackAudioTrackList MediaPlaybackAudioTrackList MediaPlaybackAudioTrackList Class

Definition

Represents a read-only list of AudioTrack objects, of which a single track can be selected at one time.

public : sealed class MediaPlaybackAudioTrackList : ISingleSelectMediaTrackList
struct winrt::Windows::Media::Playback::MediaPlaybackAudioTrackList : ISingleSelectMediaTrackList
public sealed class MediaPlaybackAudioTrackList : ISingleSelectMediaTrackList
Public NotInheritable Class MediaPlaybackAudioTrackList Implements ISingleSelectMediaTrackList
// This class does not provide a public constructor.
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 accessing the AudioTracks property of a MediaPlaybackItem. To be notified when the list of tracks changes, handle the AudioTracksChanged event.

This class provides access to the list of AudioTrack objects that are associated with a MediaPlaybackItem. When the media item is opened by a component and the ItemOpened event is raised, you can select one of the audio tracks in the track list for playback.

Note that this class does not represent a playlist of audio tracks that are played sequentially. To play a sequential list of tracks, use MediaPlaybackList.

For how-to guidance for working with the audio tracks of a media item, see Media items, playlists, and tracks.

Properties

SelectedIndex SelectedIndex SelectedIndex SelectedIndex SelectedIndex

Gets or sets the index of the currently selected audio track in the list.

Size Size Size Size Size

Gets the number of audio tracks in the list.

Methods

First() First() First() First() First()

Returns an iterator that iterates over the items in the collection.

GetAt(UInt32) GetAt(UInt32) GetAt(UInt32) GetAt(UInt32) GetAt(UInt32)

Returns the audio track at the specified index.

GetMany(UInt32, AudioTrack[]) GetMany(UInt32, AudioTrack[]) GetMany(UInt32, AudioTrack[]) GetMany(UInt32, AudioTrack[]) GetMany(UInt32, AudioTrack[])

Retrieves the audio tracks that start at the specified index in the list.

IndexOf(AudioTrack, UInt32) IndexOf(AudioTrack, UInt32) IndexOf(AudioTrack, UInt32) IndexOf(AudioTrack, UInt32) IndexOf(AudioTrack, UInt32)

Retrieves the index of a specified audio track in the list.

Events

SelectedIndexChanged SelectedIndexChanged SelectedIndexChanged SelectedIndexChanged SelectedIndexChanged

Occurs when the index of the currently selected audio track changes.

See also