This feature is not Baseline because it does not work in some of the most widely-used browsers.
The frames property of the RTCVideoSourceStats dictionary indicates the total number of frames originating from this video source over its lifetime.
A number indicating the total number of frames originating from this source.
This example shows how you might iterate the stats object returned from RTCRtpSender.getStats() to get the video source stats, and then extract the frames.
// where sender is an RTCRtpSender
const stats = await sender.getStats();
let videoSourceStats = null;
stats.forEach((report) => {
if (report.type === "media-source" && report.kind==="video") {
videoSourceStats = report;
break;
}
});
const frames = videoSourceStats?.frames;
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
frames |
90 | 90 | 116 | 76 | No | 90 | 116 | 64 | No | 15.0 | 90 | No |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/RTCVideoSourceStats/frames