RTCPeerConnection.getTransceivers()
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.
RTCPeerConnection
인터페이스의 getTransceivers()
메소드는 연결에서 데이터 전송 및 수신에 사용되는 RTCRtpTransceiver
객체의 리스트를 반환합니다.
Syntax
js
transceiverList = RTCPeerConnection.getTransceivers();
매개변수
없음.
반환 값
RTCPeerConnection
에 대한 모든 미디어의 전송/수신을 관리하는 트랜시버를 나타내는 RTCRtpTransceiver
객체의 배열입니다. 리스트의 순서는 트랜시버가 연결에 추가된 순서대로 정렬되어있습니다.
예시
아래 코드는 RTCPeerConnection
와 연관된 모든 트랜시버를 중지시킵니다.
js
pc.getTransceivers.forEach((transceiver) => {
transceiver.stop();
});
명세서
Specification |
---|
WebRTC: Real-Time Communication in Browsers # dom-peerconnection-gettranseceivers |
브라우저 호환성
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
getTransceivers | ||||||||||||
Stopped transcievers not returned |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.