The TrackEvent()
constructor creates and returns a new TrackEvent
object describing an event which occurred on a list of tracks (AudioTrackList
, VideoTrackList
, or TextTrackList
).
trackEvent = new TrackEvent(type, eventInfo);
type
"addtrack"
or "removetrack"
.eventInfo
Optional
track
Optional
null
by default, but should be set to a VideoTrack
, AudioTrack
, or TextTrack
as appropriate given the type of track.bubbles
Optional
cancelable
Optional
composed
Optional
Event.composed
for more details.A newly-created TrackEvent
object, initialized as described by the inputs to the constructor.
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of 'TrackEvent()' in that specification. | Living Standard | Initial definition. |
HTML5 The definition of 'TrackEvent()' in that specification. | Recommendation | Initial definition. |
No compatibility data found. Please contribute data for "api.TrackEvent.TrackEvent" (depth: 1) to the MDN compatibility data repository.
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/TrackEvent/TrackEvent