RTCRtpReceiver

RTCRtpReceiver interface of the WebRTC API manages the reception and decoding of data for a MediaStreamTrack on an RTCPeerConnection .

特性

RTCRtpReceiver.track 只读
返回 MediaStreamTrack associated with the current RTCRtpReceiver 实例。
RTCRtpReceiver.transport 只读
返回 RTCDtlsTransport instance over which the media for the receiver's track is received.

过时特性

rtcpTransport
This property has been removed; the RTP and RTCP transports have been combined into a single transport. Use the transport property instead.

方法

RTCRtpReceiver.getContributingSources()
Returns an array of RTCRtpContributingSource instances for each unique CSRC (contributing source) identifier received by the current RTCRtpReceiver in the last ten seconds.
RTCRtpReceiver.getParameters()
Returns an RTCRtpParameters object which contains information about how the RTC data is to be decoded.
RTCRtpReceiver.getStats()
返回 Promise whose fulfillment handler receives a RTCStatsReport which contains statistics about the incoming streams and their dependencies.
RTCRtpReceiver.getSynchronizationSources()
Returns an array including one RTCRtpSynchronizationSource instance for each unique SSRC (synchronization source) identifier received by the current RTCRtpReceiver in the last ten seconds.

静态方法

RTCRtpReceiver.getCapabilities()
Returns the most optimistic view of the capabilities of the system for receiving media of the given kind.

规范

规范 状态 Comment
WebRTC 1.0: Real-time Communication Between Browsers
The definition of 'RTCRtpReceiver' in that specification.
候选推荐 初始定义。

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
RTCRtpReceiver Chrome 59 Edge ≤18 Firefox Yes IE No Opera 46 Safari Yes WebView Android 59 Chrome Android 59 Firefox Android Yes Opera Android 43 Safari iOS Yes Samsung Internet Android 7.0
getCapabilities Chrome 59 Edge 12 Firefox Yes IE No Opera 46 Safari ? WebView Android 59 Chrome Android 59 Firefox Android Yes Opera Android 43 Safari iOS ? Samsung Internet Android 7.0
getContributingSources Chrome 59 Edge 12 Firefox 59 IE No Opera 46 Safari ? WebView Android 59 Chrome Android 59 Firefox Android 59
Disabled
59
Disabled
Disabled From version 59: this feature is behind the media.peerconnection.rtpsourcesapi.enable preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android 43 Safari iOS ? Samsung Internet Android 7.0
getParameters Chrome 59 Edge ≤79 Firefox Yes IE No Opera 46 Safari Yes WebView Android 59 Chrome Android 59 Firefox Android Yes Opera Android 43 Safari iOS Yes Samsung Internet Android 7.0
getStats Chrome 67 Edge ≤18 Firefox 55 IE No Opera 54 Safari ? WebView Android 67 Chrome Android 67 Firefox Android 55 Opera Android 48 Safari iOS ? Samsung Internet Android 7.0
getSynchronizationSources Chrome 73 Edge ≤79 Firefox 59 IE No Opera 60 Safari ? WebView Android 73 Chrome Android 73 Firefox Android 59
Disabled
59
Disabled
Disabled From version 59: this feature is behind the media.peerconnection.rtpsourcesapi.enable preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android 52 Safari iOS ? Samsung Internet Android 11.0
rtcpTransport Chrome 59 Edge 12 Firefox Yes IE No Opera 46 Safari ? WebView Android 59 Chrome Android 59 Firefox Android Yes Opera Android 43 Safari iOS ? Samsung Internet Android 7.0
track Chrome 59 Edge 12 Firefox Yes IE No Opera 46 Safari Yes WebView Android 59 Chrome Android 59 Firefox Android Yes Opera Android 43 Safari iOS Yes Samsung Internet Android 7.0
transport Chrome 59 Edge 12 Firefox Yes IE No Opera 46 Safari ? WebView Android 59 Chrome Android 59 Firefox Android Yes Opera Android 43 Safari iOS ? Samsung Internet Android 7.0

图例

完整支持
完整支持
不支持
不支持
兼容性未知
兼容性未知
用户必须明确启用此特征。
用户必须明确启用此特征。

另请参阅