VideoTrack VideoTrack VideoTrack VideoTrack Class

Definition

Represents a video track.

public : sealed class VideoTrack : IMediaTrack, IVideoTrackpublic sealed class VideoTrack : IMediaTrack, IVideoTrackPublic NotInheritable Class VideoTrack Implements IMediaTrack, IVideoTrack// 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 MediaPlaybackVideoTrackList.GetAt.

For how-to guidance for working with VideoTrack objects, see Media items, playlists, and tracks.

Properties

Id Id Id Id

Gets or sets the identifier for the video 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 video track.

Label Label Label Label

Gets or sets the label for the video 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 video track.

Language Language Language Language

Gets or sets a string indicating the language of the video 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 video track.

Name Name Name Name

Gets the name of the VideoTrack.

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 VideoTrack.

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 VideoTrack.

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

A VideoTrack is contained by a MediaPlaybackItem when it is in the item's VideoTracks collection. Use the PlaybackItem property to get a reference to the MediaPlaybackItem that contains the VideoTrack.

SupportInfo SupportInfo SupportInfo SupportInfo

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

public : VideoTrackSupportInfo SupportInfo { get; }public VideoTrackSupportInfo SupportInfo { get; }Public ReadOnly Property SupportInfo As VideoTrackSupportInfo// 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 a VideoTrack is opened, you can get detailed status and failure information by handling the OpenFailed event and checking the SupportInfo property of the VideoTrack passed into the event as the sender.

TrackKind TrackKind TrackKind TrackKind

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

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 encoding properties for the VideoTrack.

public : VideoEncodingProperties GetEncodingProperties()public VideoEncodingProperties GetEncodingProperties()Public Function GetEncodingProperties() As VideoEncodingProperties// 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 a VideoTrack fails to open.

public : event TypedEventHandler OpenFailed<VideoTrack,  VideoTrackOpenFailedEventArgs>public event TypedEventHandler OpenFailed<VideoTrack,  VideoTrackOpenFailedEventArgs>Public Event OpenFailed<VideoTrack,  VideoTrackOpenFailedEventArgs>// 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 a VideoTrack from within the VideoTracksChanged event handler for a MediaPlaybackItem, which is raised whenever a video track is added to the item.