WICG / nav-speculation

Proposal to enable privacy-enhanced preloading
https://wicg.github.io/nav-speculation/
Other
146 stars 33 forks source link

Spec patch for the Web Audio API restriction #275

Closed toyoshim closed 1 year ago

toyoshim commented 1 year ago

This is based on the discussion at #165

github-actions[bot] commented 1 year ago
Preview: - [prerendering.html](https://storage.googleapis.com/spec-previews/WICG/nav-speculation/pull/275/head/prerendering.html) ([diff](https://storage.googleapis.com/spec-previews/WICG/nav-speculation/pull/275/diff/prerendering.html) [base](https://storage.googleapis.com/spec-previews/WICG/nav-speculation/pull/275/base/prerendering.html))
toyoshim commented 1 year ago

allow to start needs to return false for all callers during prerendering, but the post-prerendering activation patch is probably needed only in the AudioContext constuctor case.

Users may or may not call other resume or start methods, but their promises would not be resolved until the post-prerendering activation steps run. When our step runs, the resume control message is processed, and it resolves all pending resume promises.

So, it seems to work without compatibility breakages. I will revise my PR in this direction.

hoch commented 1 year ago

As you already saw, the construction of AudioContext, Autoplay control, and the resume behavior is rather messy.

I believe the last comment from @toyoshim looks correct.

toyoshim commented 1 year ago

Thanks!