Closed alvinjiooo closed 1 year ago
The user agent is free to choose for any reason not to place a document in b/f cache:
If there is something about a particular API (such as Web Locks) that should mean that no user-agent persist after unload a document using that API, then having the spec state that would be helpful.
I'm not aware of any reason why a choice to persist a document that has called enumerateDevices()
would be detrimental, but please let me know if there is such a reason.
If there is no such reason, then there is no need for the Web Audio API to repeat that persistence of a document is optional.
Thanks Karl for the input! From what I learned now is that it seems because the detail behavior for BF cache is not finalized for those device related API (USB/Bluetooth/Serial/MediaDevice/etc.) so they are temporary in the block list. Though we don't know the exact timeline they are taken from the list. I think it will be a good idea if we could have spec states the restriction until things changed in future.
This question is more about MediaDevice.enumerateDevices() and BFCache, not Web Audio API.
@alvinjiooo Please reopen if you still have a concern or a question.
I would like to start a discussion regarding BF cache and Web Audio setSinkId API. Different browsers might implement it differently. But on Chromium there are some APIs are marked as not supporting BF cache. MediaDevice.enumerateDevices() is one of them. Ref: https://source.chromium.org/chromium/chromium/src/+/main:content/browser/renderer_host/back_forward_cache_disable.h That means, when users try to fetch available sinkId by calling MediaDevice.enumerateDevices(), on Chromium, BF cache is disabled for this page. I wonder should we add the description in SPEC regarding this limitation (use setSinkId will block BF cache support)?