// where sender is an RTCRtpSender
const stats = await sender.getStats();
let audioSourceStats = null;
for (const report of stats.values()) {
if (report.type === "media-source" && report.kind === "audio") {
audioSourceStats = report;
break;
}
}
const audioLevel = audioSourceStats?.audioLevel;RTCAudioSourceStats / notebook
RTCAudioSourceStats
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.