VideoTrackList Class

https://html.spec.whatwg.org/multipage/media.html#videotracklist

Inheritance
EventTarget VideoTrackList
Implements

Properties

NameDescription
CountGets the number of tracks in the list.
LengthGets the number of tracks in the list.
OnAddTrackGets or sets the event handler of the addtrack event.
OnChangeGets or sets the event handler of the change event.
OnRemoveTrackGets or sets the event handler of the removetrack event.
SelectedIndexGets the index of the selected track, or -1 when no track is selected.

Gets the number of tracks in the list.

public int Count { get; }

Property value

int

Gets the number of tracks in the list.

public uint Length { get; }

OnAddTrack

MediaTracks.cs

Gets or sets the event handler of the addtrack event.

public Action<Event>? OnAddTrack { get; set; }

Gets or sets the event handler of the change event.

public Action<Event>? OnChange { get; set; }

OnRemoveTrack

MediaTracks.cs

Gets or sets the event handler of the removetrack event.

public Action<Event>? OnRemoveTrack { get; set; }

SelectedIndex

MediaTracks.cs

Gets the index of the selected track, or -1 when no track is selected.

public int SelectedIndex { get; }

Indexers

NameDescription
this[int]Gets the track at the given index.
this[uint]Gets the track at the given index, or null when the index is out of range.

ItemAt overloads

Gets the track at the given index.

public VideoTrack this[int index] { get; }
Parameters
index int
Property value

VideoTrack

this[uint]

MediaTracks.cs

Gets the track at the given index, or null when the index is out of range.

public VideoTrack? this[uint index] { get; }

Methods

NameDescription
GetEnumerator()Returns an enumerator that iterates through the collection.
GetTrackById(string)Returns the first track of the list with the given identifier, or null.
System.Collections.Generic.IReadOnlyList<Meziantou.Framework.WebPlatform.Dom.VideoTrack>.get_Item(int)
System.Collections.IEnumerable.GetEnumerator()

GetEnumerator()

MediaTracks.cs

Returns an enumerator that iterates through the collection.

public IEnumerator<VideoTrack> GetEnumerator()

Returns

IEnumerator<VideoTrack> An enumerator that can be used to iterate through the collection.

GetTrackById(string)

MediaTracks.cs

Returns the first track of the list with the given identifier, or null.

public VideoTrack? GetTrackById(string id)

System.Collections.Generic.IReadOnlyList<Meziantou.Framework.WebPlatform.Dom.VideoTrack>.get_Item(int)

Parameters

index int

Returns

VideoTrack

No documentation is available.

System.Collections.IEnumerable.GetEnumerator()

MediaTracks.cs
IEnumerator IEnumerable.GetEnumerator()

No documentation is available.