Udostępnij za pośrednictwem


MediaPlaybackVideoTrackList Class

Definition

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

public ref class MediaPlaybackVideoTrackList sealed : IIterable<VideoTrack ^>, IVectorView<VideoTrack ^>, ISingleSelectMediaTrackList
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class MediaPlaybackVideoTrackList final : IIterable<VideoTrack>, IVectorView<VideoTrack>, ISingleSelectMediaTrackList
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class MediaPlaybackVideoTrackList : IEnumerable<VideoTrack>, IReadOnlyList<VideoTrack>, ISingleSelectMediaTrackList
Public NotInheritable Class MediaPlaybackVideoTrackList
Implements IEnumerable(Of VideoTrack), IReadOnlyList(Of VideoTrack), ISingleSelectMediaTrackList
Inheritance
Object Platform::Object IInspectable MediaPlaybackVideoTrackList
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

Get an instance of this class by accessing the VideoTracks property of a MediaPlaybackItem. To be notified when the list of tracks changes, handle the VideoTracksChanged event.

This class provides access to the list of VideoTrack 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 video tracks in the track list for playback.

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

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

Properties

SelectedIndex

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

Size

Gets the number of video tracks in the list.

Methods

First()

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

GetAt(UInt32)

Returns the video track at the specified index.

GetMany(UInt32, VideoTrack[])

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

IndexOf(VideoTrack, UInt32)

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

Events

SelectedIndexChanged

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

Applies to

See also