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.
候选推荐 初始定义。

浏览器兼容性

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. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
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

图例

完整支持

完整支持

不支持

不支持

兼容性未知 ?

兼容性未知

用户必须明确启用此特征。

用户必须明确启用此特征。

元数据

  • 最后修改:
  1. RTCRtpReceiver
  2. 特性
    1. track
  3. 方法
    1. getContributingSources()
    2. getStats()
    3. getSynchronizationSources()