W3cubDocs

/Web APIs

MediaStreamTrackEvent: track property

The track read-only property of the MediaStreamTrackEvent interface returns the MediaStreamTrack associated with this event

Value

Examples

js

const stream = new MediaStream();

stream.addEventListener("removetrack", (event) => {
  console.log(`${event.track.kind} track removed`);
});

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
track 26 12 50 No 15 11 4.4 26 50 14 11 1.5

See also

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrackEvent/track