Contact emails
hong...@google.com,
fhern...@google.com,
ol...@google.com
Explainer
https://github.com/WICG/web_audio_playout
Specification
https://webaudio.github.io/web-audio-api/#AudioPlaybackStats
Summary
This feature adds an AudioContext.playbackStats attribute which returns an AudioPlaybackStats object. This object provides audio playback statistics such as average latency, minimum/maximum latency, underrun duration, and underrun count. This API allows web applications to monitor audio playout quality and detect glitches.
Note: This feature was previously tracked as AudioContext.playoutStats. It has been renamed to AudioContext.playbackStats to align with the final Web Audio API specification. The old name is supported as a deprecated alias for backward compatibility.
Blink component
Blink>WebAudio
Web Feature ID
web-audio
Motivation
There is currently no way to detect whether WebAudio playout has glitches (gaps in the played audio, which typically happens due to underperformance in the audio pipeline). There is an existing way to measure the instantaneous playout latency using AudioContext.outputLatency, but no simple way to measure average/minimum/maximum latency over time. With this API, we want to propose a way to be able to measure the delay of that audio and the glitchiness of the audio.
Initial public proposal
https://github.com/WICG/proposals/issues/142
TAG review
Early TAG review request:
https://github.com/w3ctag/design-reviews/issues/939
TAG review status
Issues addressed
Origin Trial Name
Playout Statistics API for WebAudio
Chromium Trial Name
AudioContextPlayoutStats
Origin Trial documentation link
https://github.com/WICG/web_audio_playout
WebFeature UseCounter name
kAudioContextPlayoutStats
Risks
Debuggability
Can be tested by creating an AudioContext and evaluating context.playoutStats in the console.
Will this feature be supported on all six Blink platforms
(Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
Yes
Yes
https://wpt.fyi/results/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-playoutstats.html?label=experimental&label=master&aligned
These will be updated if the API shape changes.
Flag name on about://flags
No information provided
Finch feature name
AudioContextPlayoutStats
Rollout plan
Will ship enabled for all users
Requires code in //chrome?
False
Tracking bug
https://g-issues.chromium.org/issues/475838360
Launch bug
https://launch.corp.google.com/launch/4308993
Availability expectation
Feature is available only in Chromium browsers for the foreseeable future.
Adoption expectation
Feature is used by specific partner(s) to provide functionality within 12 months of launch in Chrome.
Adoption plan
Nothing specific planned.
Non-OSS dependencies
Does the feature depend on any code or APIs outside the Chromium
open source repository and its open-source dependencies to
function?
None.
Estimated milestones
| Shipping on desktop | 146 |
| Origin trial desktop first | 131 |
| Origin trial desktop last | 136 |
| Origin trial extension 1 end milestone | 145 |
| Origin trial extension 2 end milestone | 142 |
| Origin trial extension 3 end milestone | 139 |
| DevTrial on desktop | 129 |
| Shipping on Android | 146 |
| Shipping on WebView | 146 |
Anticipated spec changes
Open questions about a feature may be a source of future web compat or
interop issues. Please list open issues (e.g. links to known github
issues in the project for the feature specification) whose resolution
may introduce web compat/interop risk (e.g., changing to naming or
structure of the API in a non-backward-compatible way).
None.
Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5172818344148992?gate=5078819495215104
Links to previous Intent discussions
Intent to Prototype:
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACazmWW4MYVa_iGjN%3DK4O9B1DE3rt4_2Vkqnq6sKswHFjn6BzQ%40mail.gmail.comIntent to Experiment:
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACazmWWV6S6Ba%3Dd%3DgvjhERm1OnPyBMRJx5fbkP%3Df9zb3k%3DrNDA%40mail.gmail.comIntent to Extend Experiment 1:
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/691455eb.2b0a0220.e30ce.7e1f.GAE%40google.comIntent to Extend Experiment 2:
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/686d135c.2b0a0220.3a1521.0081.GAE%40google.comIntent to Extend Experiment 3:
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACazmWVkWb8DJM_aCRGOFpskBs-7h%3DO_yggKc3YBUkiieEO-UA%40mail.gmail.com