- From: henbos via GitHub <sysbot+gh@w3.org>
- Date: Fri, 07 Apr 2017 08:15:17 +0000
- To: public-webrtc@w3.org
henbos has just created a new issue for https://github.com/w3c/webrtc-pc:
== RTCRtpContributingSource.getReceiver() ==
Because we can't have RTCRtpContributingSource attributes change randomly within a single frame of JS execution (#1111) it is necessary to update all contributing sources of a receiver if the values of any one of them are read and to cache the result until the next frame of JS execution. Example:
```
...
let sources = receiver.getContributingSources();
assert_that(sources.length, 2);
return Promise.resolve(sources);
}).then(function(sources) {
// This function is executed in the next frame of JS execution,
// sources might have been updated due to received RTP packets.
// Within this frame of JS execution, sources must not be updated
// again, i.e. this must always be true:
assert_that(sources[0].timestamp, sources[0].timestamp);
// Also:
// sources[0].timestamp needs to be comparable to
// sources[1].timestamp, if any one of them is updated all of
// them needs to be updated.
});
```
In order to implement this, a contributing source needs to know of its receiver so that it can perform a new receiver.getContributingSources() to update the cache.
Should we just expose the receiver referemce with RTCRtpContributingSource.getReceiver()?
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1117 using your GitHub account
Received on Friday, 7 April 2017 08:15:24 UTC