RTCTrackEvent
The corresponding JS API docs is here RTCTrackEvent.
RTCTrackEvent
is an interface in the WebRTC API that represents track events. When a new MediaStreamTrack (such as an audio or video track) is added to the RTCRtpReceiver (the object responsible for receiving media data) of RTCPeerConnection
, this event is triggered.
#
Propertiestrack
:This property returns theMediaStreamTrack
object that has been added. This represents the actual media track (audio or video) that is now available for use.receiver
:This property returns theRTCRtpReceiver
object associated with the event. TheRTCRtpReceiver
is responsible for receiving the media track.streams
:This property returns an array ofMediaStream
objects associated with the track. A single track can be part of multiple streams.transceiver
:This property returns theRTCRtpTransceiver
object associated with the event. The transceiver manages the sending and receiving of media for a specific track.