RTCPeerConnection.getStats caching behavior |
|
Issue descriptionRTCPeerConnection.getStats stats dictionaries are based on underlying WebRTC objects that can be added, modified or removed. The spec says some dictionaries should appear in the stats as soon as their object is added (e.g. "[RTCMediaStreamTrackStats] appears in the stats as soon as [MediaStreamTrack] is attached (via addTrack, via addTransceiver, via replaceTrack on an RTPSender object, or via being created on an RTPReceiver object).") For performance reasons, getStats uses caching. This can result in dictionaries not appearing in the stats for a "cache lifetime" amount of time if getStats is called just before and after a "significant event" (add/remove) occurs. When a "significant event" occurs, the next time getStats is called a new stats collection must occur for the affected objects. The easiest thing to do is "on significant event: clear entire cache".
,
Mar 13 2018
hbos@: Is this still valid?
,
Mar 14 2018
Still valid (and should not be archived) but nobody is complaining so this remains P-3. |
|
►
Sign in to add a comment |
|
Comment 1 by hbos@chromium.org
, Jan 26 2017