The RTCTrackEvent() constructor creates and returns a new RTCTrackEvent object, configured to describe the track which has been added to the RTCPeerConnection.
In general, you won't need to use this constructor, as RTCTrackEvent objects are created by WebRTC and delivered to your RTCPeerConnection's ontrack event handler as appropriate.
new RTCTrackEvent(type, options)typeA string with the name of the event. It is case-sensitive and browsers always set it to track.
optionsAn object that, in addition of the properties defined in Event(), can have the following properties:
receiverThe RTCRtpReceiver which is being used to receive the track's media.
streams OptionalAn array of MediaStream objects representing each of the streams that comprise the event's corresponding track. It defaults to an empty array.
trackThe MediaStreamTrack the event is associated with.
transceiverThe RTCRtpTransceiver associated with the event.
A new RTCTrackEvent describing a track which has been added to the RTCPeerConnection.