diff --git a/index.bs b/index.bs index 2e5930f46..d171a1232 100644 --- a/index.bs +++ b/index.bs @@ -1638,6 +1638,20 @@ Constructors Note: If resampling is required, the latency of |context| may be affected, possibly by a large amount. + 1. Set the {{BaseAudioContext/[[render quantum size]]}} of |context| + based on the value of the contextOptions.{{AudioContextOptions/renderSizeHint}}: + + 1. If it has the default value of "default", set the + {{BaseAudioContext/[[render quantum size]]}} private slot to 128. + + 1. Else, if it has the value of "hardware", set the + {{BaseAudioContext/[[render quantum size]]}} private slot to 0. + + 1. Else, if an integer has been passed, a {{NotSupportedError}} MUST be + thrown if the value is outside the range specified in + [[#render-quantum-sizes]], otherwise set the {{BaseAudioContext/[[render quantum size]]}} + private slot to the passed value. + 1. If |context| is allowed to start, send a control message to start processing. @@ -1681,6 +1695,9 @@ Constructors 1. [=Queue a media element task=] to execute the following steps: + 1. If the {{BaseAudioContext/[[render quantum size]]}} of the {{AudioContext}} is 0, + set it to the actual hardware render quantum size chosen during resource acquisition. + 1. Set the {{BaseAudioContext/state}} attribute of the {{AudioContext}} to "{{AudioContextState/running}}". @@ -2067,13 +2084,16 @@ Methods 5. queue a media element task to execute the following steps: + 1. If the {{BaseAudioContext/[[render quantum size]]}} of the {{AudioContext}} is 0, + set it to the actual hardware render quantum size chosen during resource acquisition. + 1. Resolve all promises from {{AudioContext/[[pending resume promises]]}} in order. 1. Clear {{AudioContext/[[pending resume promises]]}}. Additionally, remove those promises from {{BaseAudioContext/[[pending promises]]}}. - 2. Resolve promise. + 1. Resolve promise. - 3. If the {{BaseAudioContext/state}} attribute of the {{AudioContext}} is not already "{{AudioContextState/running}}": + 1. If the {{BaseAudioContext/state}} attribute of the {{AudioContext}} is not already "{{AudioContextState/running}}": 1. Set the {{BaseAudioContext/state}} attribute of the {{AudioContext}} to "{{AudioContextState/running}}". @@ -13476,6 +13496,18 @@ Per the [[security-privacy-questionnaire#questions]]: {{MediaDevices}} capabilities were read (with user intervention) and indicated a higher rate was supported. + Fingerprinting via the render quantum size of the {{AudioContext}} + is possible when the `"hardware"` hint is used, as it exposes + information about the user's default audio hardware buffer + size. To minimize this risk, + {{BaseAudioContext/renderQuantumSize}} returns 0 until the + {{AudioContext}} transitions to the `"running"` state. Once the + {{AudioContext}} has transitioned to the `"running"` state the + actual render quantum size is returned. A running AudioContext can + be used to infer the user's audio hardware buffer size via + {{AudioWorklet}} timing, so this does not expose any new + information. + Fingerprinting via the number of output channels for the {{AudioContext}} is possible as well. We recommend that {{AudioDestinationNode/maxChannelCount}} be set to two