Table of Contents

Class TrackEvent

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The TrackEvent interface of the HTML DOM API is used for events which represent changes to a set of available tracks on an HTML media element; these events are addtrack and removetrack.

[Value("TrackEvent")]
public class TrackEvent : Event
Inheritance
TrackEvent
Inherited Members

Remarks

It's important not to confuse TrackEvent with the RTCTrackEvent interface, which is used for tracks which are part of an RTCPeerConnection.

Events based on TrackEvent are always sent to one of the media track list types:

See also on MDN

Constructors

TrackEvent()

public TrackEvent()

TrackEvent(string, TrackEventInit)

The TrackEvent() constructor
creates and returns a new TrackEvent object describing an event which
occurred on a list of tracks (AudioTrackList,
VideoTrackList, or TextTrackList).

public TrackEvent(string type, TrackEventInit eventInitDict = null)

Parameters

type string
eventInitDict TrackEventInit

Remarks

Properties

Track

The read-only track property of
the TrackEvent interface specifies the media track object to which the
event applies.

[Value("track")]
public Union64? Track { get; }

Property Value

Union64?

An object which is one of the types AudioTrack,
VideoTrack, or TextTrack, depending on the type of media
represented by the track. This identifies the track to which the event applies.

Remarks

The media track will be an AudioTrack,
VideoTrack, or TextTrack object.

See also on MDN