getSynchronizationSources()
方法在
RTCRtpReceiver
interface returns an array of
RTCRtpContributingSource
instances, each corresponding to one SSRC (synchronization source) identifier received by the current
RTCRtpReceiver
in the last ten seconds.
var rtcRtpContributingSources = rtcRtpReceiver.getContributingSources()
None.
An array of
RTCRtpSynchronizationSource
instances. Each instance describes one of the synchronization sources that provided data to the incoming stream in the past ten seconds.
As you'll see in the documentarion for
RTCRtpSynchronizationSource
, it inherits the properties of
RTCRtpContributingSource
,包括
timestamp
,
source
,和
audioLevel
.
The synchronization source objects add a
voiceActivityFlag
property, which indicates if the last RTP packet received contained voice activity.
| 规范 | 状态 | 注释 |
|---|---|---|
|
WebRTC 1.0: Real-time Communication Between Browsers
The definition of 'getSynchronizationSources()' in that specification. |
候选推荐 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
getSynchronizationSources
|
Chrome 73 | Edge ≤79 | Firefox 59 | IE 不支持 No | Opera 60 | Safari ? | WebView Android 73 | Chrome Android 73 | Firefox Android 59 | Opera Android 52 | Safari iOS ? | Samsung Internet Android 11.0 |
| Audio tracks supported | Chrome 73 | Edge 79 | Firefox 59 | IE 不支持 No | Opera 60 | Safari ? | WebView Android 73 | Chrome Android 73 | Firefox Android 59 | Opera Android 52 | Safari iOS ? | Samsung Internet Android 11.0 |
| Video tracks supported | Chrome 73 | Edge ≤79 | Firefox 68 | IE 不支持 No | Opera 60 | Safari ? | WebView Android 73 | Chrome Android 73 | Firefox Android 68 | Opera Android 52 | Safari iOS ? | Samsung Internet Android 11.0 |
完整支持
不支持
兼容性未知
用户必须明确启用此特征。
RTCRtpReceiver
getContributingSources()
getStats()
getSynchronizationSources()