TimedMetadataTrack TimedMetadataTrack TimedMetadataTrack TimedMetadataTrack Class

Definition

Represents a timed metadata track. The track contains a list of IMediaCue objects and raises events at the beginning and end of the time window of each cue.

public : sealed class TimedMetadataTrack : IMediaTrack, ITimedMetadataTrack, ITimedMetadataTrack2public sealed class TimedMetadataTrack : IMediaTrack, ITimedMetadataTrack, ITimedMetadataTrack2Public NotInheritable Class TimedMetadataTrack Implements IMediaTrack, ITimedMetadataTrack, ITimedMetadataTrack2// 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

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

Constructors

TimedMetadataTrack(String, String, TimedMetadataKind) TimedMetadataTrack(String, String, TimedMetadataKind) TimedMetadataTrack(String, String, TimedMetadataKind) TimedMetadataTrack(String, String, TimedMetadataKind)

Initializes a new instance of the TimedMetadataTrack class.

public : TimedMetadataTrack(PlatForm::String id, PlatForm::String language, TimedMetadataKind kind)public TimedMetadataTrack(String id, String language, TimedMetadataKind kind)Public Sub New(id As String, language As String, kind As TimedMetadataKind)// You can use this method in JavaScript.
Parameters
id
PlatForm::String String String String

An identifier for the new timed metadata track.

language
PlatForm::String String String String

A string indicating the language of the new timed metadata track.

kind
TimedMetadataKind TimedMetadataKind TimedMetadataKind TimedMetadataKind

A value indicating the kind of metadata contained in the new track.

Properties

ActiveCues ActiveCues ActiveCues ActiveCues

Gets the list of media cues in the TimedMetadataTrack that are currently active. A cue is considered active after its StartTime has been reached until its Duration has been exceeded.

public : IVectorView<IMediaCue> ActiveCues { get; }public IReadOnlyList<IMediaCue> ActiveCues { get; }Public ReadOnly Property ActiveCues As IReadOnlyList<IMediaCue>// You can use this property in JavaScript.
Value
IVectorView<IMediaCue> IReadOnlyList<IMediaCue> IReadOnlyList<IMediaCue> IReadOnlyList<IMediaCue>

The list of media cues in the TimedMetadataTrack that are currently active.

Cues Cues Cues Cues

Gets a read-only list of the media cues in the TimedMetadataTrack.

public : IVectorView<IMediaCue> Cues { get; }public IReadOnlyList<IMediaCue> Cues { get; }Public ReadOnly Property Cues As IReadOnlyList<IMediaCue>// You can use this property in JavaScript.
Value
IVectorView<IMediaCue> IReadOnlyList<IMediaCue> IReadOnlyList<IMediaCue> IReadOnlyList<IMediaCue>

A read-only list of the media cues in the timed metadata track.

Remarks

Add cues to the list by calling AddCue.

The cues in the list are sorted in chronological order by the value of the StartTime property.

DispatchType DispatchType DispatchType DispatchType

Gets the custom string value containing routing information for cues.

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

The custom string value containing routing information for cues.

Id Id Id Id

Gets the identifier for the timed metadata 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 track.

Remarks

You can specify a value for the Id property in the TimedMetadataTrack constructor.

Label Label Label Label

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

Language Language Language Language

Gets a string indicating the language of the timed metadata 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 timed metadata track.

Remarks

You can specify a value for the Language property in the TimedMetadataTrack constructor.

Name Name Name Name

Gets the name of the TimedMetadataTrack.

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

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

Remarks

The Name property can be used in your UI to identify the metadata track to the user.

PlaybackItem PlaybackItem PlaybackItem PlaybackItem

Gets the MediaPlaybackItem containing the TimedMetadataTrack.

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 TimedMetadataTrack is contained by a MediaPlaybackItem when it is in the item's TimedMetadataTracks collection. Use the PlaybackItem property to get a reference to the MediaPlaybackItem that contains the TimedMetadataTrack.

TimedMetadataKind TimedMetadataKind TimedMetadataKind TimedMetadataKind

Gets a value indicating the kind of metadata contained in the track.

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

A value indicating the kind of metadata contained in the track.

Remarks

You can specify a value for the TimedMetadataKind property in the TimedMetadataTrack constructor.

TrackKind TrackKind TrackKind TrackKind

Gets a value specifying the type of the media track. For TimedMetadataTrack this value will always be MediaTrackKind::TimedMetadata.

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 specifying the type of the media track.

Methods

AddCue(IMediaCue) AddCue(IMediaCue) AddCue(IMediaCue) AddCue(IMediaCue)

Adds the specified media cue to the TimedMetadataTrack.

public : void AddCue(IMediaCue cue)public void AddCue(IMediaCue cue)Public Function AddCue(cue As IMediaCue) As void// You can use this method in JavaScript.
Parameters
cue
IMediaCue IMediaCue IMediaCue IMediaCue

The media cue to add.

RemoveCue(IMediaCue) RemoveCue(IMediaCue) RemoveCue(IMediaCue) RemoveCue(IMediaCue)

Removes the specified media cue from the TimedMetadataTrack.

public : void RemoveCue(IMediaCue cue)public void RemoveCue(IMediaCue cue)Public Function RemoveCue(cue As IMediaCue) As void// You can use this method in JavaScript.
Parameters
cue
IMediaCue IMediaCue IMediaCue IMediaCue

The media cue to remove.

Events

CueEntered CueEntered CueEntered CueEntered

Occurs when a media time window of a media cue is entered. The time window is defined by the StartTime and Duration of the cue.

public : event TypedEventHandler CueEntered<TimedMetadataTrack,  MediaCueEventArgs>public event TypedEventHandler CueEntered<TimedMetadataTrack,  MediaCueEventArgs>Public Event CueEntered<TimedMetadataTrack,  MediaCueEventArgs>// You can use this event in JavaScript.

CueExited CueExited CueExited CueExited

Occurs when a media time window of a media cue is exited. The time window is defined by the StartTime and Duration of the cue.

public : event TypedEventHandler CueExited<TimedMetadataTrack,  MediaCueEventArgs>public event TypedEventHandler CueExited<TimedMetadataTrack,  MediaCueEventArgs>Public Event CueExited<TimedMetadataTrack,  MediaCueEventArgs>// You can use this event in JavaScript.

TrackFailed TrackFailed TrackFailed TrackFailed

Raised when an error occurs with the TimedMetadataTrack.

public : event TypedEventHandler TrackFailed<TimedMetadataTrack,  TimedMetadataTrackFailedEventArgs>public event TypedEventHandler TrackFailed<TimedMetadataTrack,  TimedMetadataTrackFailedEventArgs>Public Event TrackFailed<TimedMetadataTrack,  TimedMetadataTrackFailedEventArgs>// You can use this event in JavaScript.

See Also