AudioContext async state transitions [chromium/src : main]

0 views
Skip to first unread message

Hongchan Choi (Gerrit)

unread,
Jan 9, 2026, 7:05:15 PM (2 days ago) Jan 9
to Felipe Erias, Chromium Metrics Reviews, srirama chandra sekhar, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, blink-re...@chromium.org, feature-me...@chromium.org, eric.c...@apple.com, blink-revie...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org
Attention needed from Felipe Erias

Hongchan Choi added 6 comments

Patchset-level comments
File-level comment, Patchset 11 (Latest):
Hongchan Choi . resolved

Thanks for your contribution!

The code review on the autoplay part will take some time because the WebAudio owners will need to understand the actual implementation.

It generally looks good, but I am curious about your evaluation plan on the rollout other than using usage counters.

File third_party/blink/renderer/modules/webaudio/audio_context.cc
Line 953, Patchset 11 (Latest): "Cannot suspend a closed AudioContext."));
Hongchan Choi . unresolved

Perhaps we can expand this error message to be more descriptive?

File third_party/blink/web_tests/http/tests/media/autoplay/document-user-activation-navigation-nogesture-expected.txt
Line 1, Patchset 11 (Latest):CONSOLE WARNING: The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://developer.chrome.com/blog/autoplay/#web_audio
Hongchan Choi . unresolved

Can you explain why this CONSOLE WARNING is shown here?

File third_party/blink/web_tests/http/tests/media/autoplay/resources/autoplay-test.js
Line 72, Patchset 11 (Latest): const timeout = new Promise(resolve => setTimeout(resolve, 500));
Hongchan Choi . unresolved

I am not entirely sure what test is verifying. (The autoplay code is not implemented by the WebAudio team)

If the intention is to get the state reliably, I think we can use the `onstatechange` event listener within the promise.

File third_party/blink/web_tests/webaudio/internals/audiocontext-close.html
Line 161, Patchset 11 (Latest): await context3.resume();
Hongchan Choi . unresolved

Is this necessary to pass the test?

Line 187, Patchset 11 (Latest): await context.resume();
Hongchan Choi . unresolved

Ditto.

Open in Gerrit

Related details

Attention is currently required from:
  • Felipe Erias
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I79d1bb94f809b460a750b9c37aa2b0d9ab0289c1
Gerrit-Change-Number: 7266845
Gerrit-PatchSet: 11
Gerrit-Owner: Felipe Erias <felip...@igalia.com>
Gerrit-Reviewer: Felipe Erias <felip...@igalia.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Hongchan Choi <hong...@chromium.org>
Gerrit-CC: Michael Wilson <mjwi...@chromium.org>
Gerrit-CC: srirama chandra sekhar <srir...@samsung.com>
Gerrit-Attention: Felipe Erias <felip...@igalia.com>
Gerrit-Comment-Date: Sat, 10 Jan 2026 00:05:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages