Please refer to: https://w3c.github.io/webrtc-provisional-stats/#dom-rtcvideoreceiverstats WebRTC can expose some video rendered statistics such as: 1- freezeCount: Count the total number of video freezes experienced by this receiver. It is a freeze if frame duration, which is time interval between two consecutively rendered frames, is equal or exceeds Max(3 * avg_frame_duration_ms, avg_frame_duration_ms + 150), where avg_frame_duration_ms is linear average of durations of last 30 rendered frames. 2- pauseCount: Count the total number of video pauses experienced by this receiver. Video is considered to be paused if time passed since last received packet exceeds 5 seconds. 3- totalFreezesDuration: Total duration of rendered frames which are considered as frozen (for definition of freeze see freezeCount), in seconds. This value is updated when a frame is rendered. 4- totalPausesDuration: Total duration of pauses (for definition of pause see pauseCount), in seconds. This value is updated when a frame is rendered. 5- totalFramesDuration: Total duration of all rendered video frames, in seconds. This value is updated when a frame is rendered. 6- sumOfSquaredFramesDuration: Sum of squared duration of all rendered frames. It can be used to calculate harmonic frame rate: totalFramesDuration / sumOfSquaredFrameDurations This value is updated when a frame is rendered. And ultimately it would be optimal to have a frameRate stat available as well.
<rdar://problem/64141493>
As a first step towards that approach, we can expose those as part of 'track' stats.
https://bugs.webkit.org/show_bug.cgi?id=213458 will track 'receiver' stats support, to align with the spec.
Created attachment 402466 [details] Patch
Committed r263351: <https://trac.webkit.org/changeset/263351> All reviewed patches have been landed. Closing bug and clearing flags on attachment 402466 [details].