Skip to content

Commit

Permalink
Implement AudioDeviceModule::GetStats API from WebRTC.
Browse files Browse the repository at this point in the history
Should only be landed once
https://webrtc-review.googlesource.com/c/src/+/291040
is landed.

Bug: webrtc:14653
Change-Id: I31471064e8b0f88ad0904a400641586bf2382822
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4154699
Reviewed-by: Henrik Boström <[email protected]>
Reviewed-by: Jeremy Roman <[email protected]>
Commit-Queue: Fredrik Hernqvist <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1096068}
  • Loading branch information
Fredrik Hernqvist authored and chromium-wpt-export-bot committed Jan 24, 2023
1 parent bac5bf2 commit f393fff
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions webrtc-stats/rtp-stats-creation.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,26 @@
await new Promise(r => test.step_timeout(r, 100));
}
}, "No RTCInboundRtpStreamStats exist until packets have been received");

promise_test(async (test) => {
const localPc = createPeerConnectionWithCleanup(test);
const remotePc = createPeerConnectionWithCleanup(test);

localPc.addTrack(...await createTrackAndStreamWithCleanup(test, "audio"));
exchangeIceCandidates(localPc, remotePc);
await exchangeOfferAnswer(localPc, remotePc);
const start = performance.now();
while (true) {
const report = await remotePc.getStats();
const audioPlayout =
[...report.values()].filter(({type}) => type == "audio-playout");
if (audioPlayout.length == 1) {
break;
}
if (performance.now() > start + 5000) {
assert_unreached("Audio playout stats should become available");
}
await new Promise(r => test.step_timeout(r, 100));
}
}, "RTCAudioPlayoutStats should be present");
</script>

0 comments on commit f393fff

Please sign in to comment.