Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

MediaStreamTrackEvent()

The MediaStreamTrackEvent() constructor returns a newly created MediaStreamTrackEvent object, which represents an event announcing that a MediaStreamTrack has been added to or removed from a MediaStream.

Syntax

var trackEvent = new MediaStreamTrackEvent(type, {track: aMediaStreamTrack});

Parameters

The MediaStreamTrackEvent() constructor also inherits arguments from Event().

type
A DOMString representing the name of the type of the MediaStreamTrackEvent. It is case-sensitive and can be "addtrack" or "removetrack".
track
A MediaStreamTrack object representing the track which was added to or removed from the stream.

Return value

A new MediaStreamTrackEvent, initialized based on the provided options.

Specifications

Specification Status Comment
Media Capture and Streams
The definition of 'MediaStreamTrackEvent()' in that specification.
Editor's Draft  

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) 50 (50) No support (Yes) ?
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? (Yes) 50.0 (50) No support ? ?

See also

Document Tags and Contributors

 Contributors to this page: Sheppy
 Last updated by: Sheppy,