Share via


MediaPlaybackVideoTrackList 類別

定義

代表 VideoTrack 物件的唯讀清單,一次可以選取單一播放軌。

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
繼承
Object Platform::Object IInspectable MediaPlaybackVideoTrackList
屬性
實作

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

存取MediaPlaybackItemVideoTracks屬性,以取得這個類別的實例。 若要在追蹤清單變更時收到通知,請處理 VideoTracksChanged 事件。

這個類別可讓您存取與MediaPlaybackItem相關聯的VideoTrack物件清單。 當元件開啟媒體專案並引發 ItemOpened 事件時,您可以在播放播放的播放軌清單中選取其中一個視訊播放軌。

請注意,這個類別不代表循序播放的視訊播放軌播放清單。 若要播放循序的曲目清單,請使用 MediaPlaybackList

如需使用媒體專案影片播放軌的操作指南,請參閱 媒體專案、播放清單和曲目

屬性

SelectedIndex

取得或設定清單中目前選取之視訊播放軌的索引。

Size

取得清單中的視訊播放軌數目。

方法

First()

傳回反覆運算器,逐一查看集合中的專案。

GetAt(UInt32)

傳回位於指定索引處的視訊播放軌。

GetMany(UInt32, VideoTrack[])

擷取從清單中指定索引開始的視訊播放軌。

IndexOf(VideoTrack, UInt32)

擷取清單中指定影片播放軌的索引。

事件

SelectedIndexChanged

發生于目前選取視訊播放軌的索引變更時。

適用於

另請參閱