Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. RTCPeerConnection
  4. getTransceivers()

RTCPeerConnection: getTransceivers() method

Baseline Widely available *

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨January 2020⁩.

* Some parts of this feature may have varying levels of support.

ThegetTransceivers() method of theRTCPeerConnection interface returns a list of theRTCRtpTransceiver objects being used to send and receive data on the connection.

Syntax

js
getTransceivers()

Parameters

None.

Return value

An array of theRTCRtpTransceiver objects representing the transceivers handling sending and receiving all media on theRTCPeerConnection.The array is in the order in which the transceivers were added to the connection.The array does not include transceivers that have already beenstopped (following offer/answer).

Examples

The following snippet of code stops all transceivers associated with anRTCPeerConnection.

js
pc.getTransceivers().forEach((transceiver) => {  transceiver.stop();});

Specifications

Specification
WebRTC: Real-Time Communication in Browsers
# dom-peerconnection-gettranseceivers

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp