RTCPeerConnection.getReceivers()

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.

Experimental: 이 기능은 실험적인 기능입니다.
프로덕션 환경에서 사용하기 전에 브라우저 호환성 표를 주의 깊게 확인하세요.

RTCPeerConnection.getReceivers() 메소드는 RTCRtpReceiver 객체의 배열을 반환합니다. 이 배열의 각 요소들은 RTP 리시버를 나타냅니다. 각각의 RTP 리시버는 RTCPeerConnection에 대한 MediaStreamTrack의 데이터를 수신하고 디코딩 합니다.

Syntax

js
var receivers[] = RTCPeerConnection.getReceivers();

반환 값

연결에 대한 각 트랙마다 한 개씩 RTCRtpReceiver 객체의 배열을 반환합니다. R연결에 대한 RTP 리시버가 없으면, 배열은 빈 상태입니다.

RTCReceiver 인스턴스에서 반환되는 순서는 명세서에 정의되어있지 않고, getSenders()호출을 사용해서 다음 배열의 요소로 바꿀 수 있습니다.

예시

tbd

명세

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

브라우저 호환성

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
getReceivers
Receivers for stopped transceivers not returned

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support

참조