W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > April 2019

[webrtc-pc] Define time order of results from getContributingSources() et al (#2189)

From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
Date: Thu, 25 Apr 2019 19:51:03 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issues.opened-437369366-1556221862-sysbot+gh@w3.org>
jan-ivar has just created a new issue for https://github.com/w3c/webrtc-pc:

== Define time order of results from getContributingSources() et al ==
When returning a sequence, defining its order whenever possible, helps web compat.

For example: A naive implementation might use this for some purpose:
```js
const {audioLevel} = receiver.getSynchronizationSources()[0];
```

...which would work most of the time, when `receiver.getSynchronizationSources().length` is either `1` (good audioLevel) or `0` (`undefined`).

Except once in a blue moon when the SSRC changes for whatever reason, and `receiver.getSynchronizationSources().length == 2` for about 10 seconds.

A browser that returned oldest first would show outdated audio levels for 10 seconds.

I propose we sort the results from newest->oldest based on timestamp (playout time)

Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2189 using your GitHub account
Received on Thursday, 25 April 2019 19:51:05 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 4 June 2019 15:32:56 UTC