RTCPeerConnection.getTransceivers()

Estás leyendo la versión en inglés del artículo porque aún no existe una traducción para este idioma. ¡Ayúdanos a traducir este artículo!

The RTCPeerConnection interface's getTransceivers() method returns a list of the RTCRtpTransceiver objects being used to send and receive data on the connection.

Syntax

transceiverList = rtcPeerConnection.getTransceivers();

Parameters

None.

Return value

An array of the RTCRtpTransceiver objects representing the transceivers handling sending and receiving all media on the RTCPeerConnection. The list is in the order in which the transceivers were added to the connection.

Example

The following snippet of code stops all transceivers associated with an RTCPeerConnection.

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

Specifications

Specification Status Comment
WebRTC 1.0: Real-time Communication Between Browsers
The definition of 'RTCPeerConnection.getTransceivers()' in that specification.
Candidate Recommendation

Browser compatibility

No compatibility data found. Please contribute data for "api.RTCPeerConnection.getTransceivers" (depth: 1) to the MDN compatibility data repository.

See also