我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译
您也可以阅读此文章的English (US)版。

The RTCPeerConnection method getSenders() returns an array of RTCRtpSender objects, each of which represents the RTP sender responsible for transmitting one track's data. A sender object provides methods and properties for examining and controlling the encoding and transmission of the track's data.


var senders = RTCPeerConnection.getSenders();

Return value

An array of RTCRtpSender objects, one for each track on the connection. The array is empty if there are no RTP senders on the connection.

The order of the returned RTCRtpSenders is not defined by the specification, and may change from one call to getSenders() to the next.




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

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
getSendersChrome Full support 64Edge Full support YesFirefox Full support 22IE No support NoOpera Full support 51Safari Full support 11WebView Android Full support 64Chrome Android Full support 64Firefox Android Full support 44Opera Android Full support 47Safari iOS Full support YesSamsung Internet Android Full support 6.0


Full support  
Full support
No support  
No support

See also


此页面的贡献者: mdnwebdocs-bot, Sheppy, fscholz, jlaine, jpmedley
最后编辑者: mdnwebdocs-bot,