Movatterモバイル変換


[0]ホーム

URL:


MDN Web Docs

RTCTrackEvent: RTCTrackEvent() constructor

BaselineWidely available

TheRTCTrackEvent() constructor creates and returns a newRTCTrackEvent object,configured to describe the track which has been added to theRTCPeerConnection.

In general, you won't need to use this constructor, asRTCTrackEventobjects are created by WebRTC and delivered to yourRTCPeerConnection'sontrack event handler as appropriate.

Syntax

js
new RTCTrackEvent(type, options)

Parameters

type

A string with the name of the event.It is case-sensitive and browsers always set it totrack.

options

An object that,in addition of the properties defined inEvent(), can have the following properties:

receiver

TheRTCRtpReceiver which is being used to receive the track's media.

streamsOptional

An array ofMediaStream objects representing each of the streams that comprise the event's corresponding track.It defaults to an empty array.

track

TheMediaStreamTrack the event is associated with.

transceiver

TheRTCRtpTransceiver associated with the event.

Return value

A newRTCTrackEvent describing a track which has been added to theRTCPeerConnection.

Specifications

Specification
WebRTC: Real-Time Communication in Browsers
# dom-rtctrackevent-constructor

Browser compatibility

Help improve MDN

Learn how to contribute.

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp