Closed henbos closed 8 months ago
History: Already covered in the April Virtual Interim and a PR like this "kind-of" already got approved in #97, but then that started the whole async vs sync debate so we never merged that
Thought: In order to be consistent with video stats, where we don't have droppedFrames - instead we have totalFrames, we should consider changing this PR to have totalFrames and totalFramesDuration instead of "dropped".
The app could simply calculate "droppedFramesDuration" as totalFramesDuration - deliveredFramesDuration.
So the glitch% would be (totalFramesDuration - deliveredFramesDuration) / totalFramesDuration
Based on the Virtual Interim, I should:
PR updated!
There's a section in the webrtc stats spec (here) that motivates total counters versus instantaneous values or pre-computed averages. Part of the API shape discussions that the WG has had was to do totals in track.stats
as well for the same reasons.
Spoke with Jan-Ivar, I think it makes sense to also have the latest latency sample for use cases like A/V sync, in addition to average latency over app defined interval
I also filed https://github.com/w3c/mediacapture-extensions/issues/119 to add latency of the latest audio frame for use of A/V sync. The avg latency is still useful for "what was the quality during interval X"
@padenot does #119 satisfy your concern about obtaining the most current value?
I added the current latency in follow up PR #120 but because I can't figure out how to create PR chains, this PR needs to land first so I can rebase the next PR. In the meantime its diff contains both PRs
Friendly ping
The editors can integrate
label is so @henbos can merge this after @padenot looks at it tomorrow.
Unless anyone objects, I will merge this on Monday.
Only partially fixes #96, but is missing latency
The RTCAudioSourceStats contains capture related metrics that are better suited for a MediaStreamTrack method than RTCPeerConnection.getStats() since you may be capturing for a non-WebRTC context. Moving the metrics was covered by the April 18, 2023 Virtual Interim and the Working Group input was supportive of the move.
Since then I've updated the language to talk about audio frames rather than audio samples and to use the same language about "delivered" vs "dropped" that we used in the video stats case.
This is the new interface (edited to match latest patch set):
Edit: From the October interim minutes, conclusion: "Overall approach makes sense, flesh out the details in the editors meeting"
Preview | Diff