From 296f90becc47b07ea4eea5df57e419c3a54194a4 Mon Sep 17 00:00:00 2001 From: Hongchan Choi Date: Mon, 22 Dec 2025 12:41:33 -0800 Subject: [PATCH 01/14] initial commit --- .github/workflows/auto-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-publish.yml b/.github/workflows/auto-publish.yml index 13594f567..7562816c8 100644 --- a/.github/workflows/auto-publish.yml +++ b/.github/workflows/auto-publish.yml @@ -13,10 +13,10 @@ jobs: steps: - name: Checking out the repository uses: actions/checkout@v4 - - name: Setting up Python 3.9 + - name: Setting up Python 3.12 uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.12' - name: Installing and updating Bikeshed run: pip3 install bikeshed && bikeshed update shell: bash From 14e3a65016080c0cbaac0861ff471932bc920e92 Mon Sep 17 00:00:00 2001 From: Hongchan Choi Date: Mon, 22 Dec 2025 13:43:44 -0800 Subject: [PATCH 02/14] fixed the build errors --- index.bs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/index.bs b/index.bs index 35eb26d27..42e81cb28 100644 --- a/index.bs +++ b/index.bs @@ -9186,7 +9186,10 @@ enum DistanceModelType { - + + + +
{{DistanceModelType}} enumeration description
Enum valueDescription
Enum valueDescription
"linear" @@ -10077,7 +10080,10 @@ enum OverSampleType { - + + + +
{{OverSampleType}} enumeration description
Enum valueDescription
Enum valueDescription
"none" Don't oversample @@ -11677,32 +11683,37 @@ for details. NOTE: This metric can be used together with {{totalDuration}} to calculate the percentage of played out media that was not provided by the {{AudioContext}}. - +
: underrunEvents :: Returns the value of the {{[[underrun events]]}} internal slot. +
: totalDuration :: Returns the value of the {{[[total duration]]}} internal slot. +
: averageLatency :: Returns the value of the {{[[average latency]]}} internal slot. +
: minimumLatency :: Returns the value of the {{[[minimum latency]]}} internal slot. +
: maximumLatency :: Returns the value of the {{[[maximum latency]]}} internal slot. +

Methods

From feb187847ebd85e555ac8dfabc8f480ea8512e44 Mon Sep 17 00:00:00 2001 From: Hongchan Choi Date: Mon, 22 Dec 2025 13:50:47 -0800 Subject: [PATCH 03/14] more indentation fixes --- index.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index 42e81cb28..28c84e724 100644 --- a/index.bs +++ b/index.bs @@ -11740,12 +11740,12 @@ Once per second, execute the update audio stats algorithm: 1. Let canUpdate be false. 1. Let document be the current [=this=]'s [=relevant global object=]'s [=associated Document=]. -If document is [=Document/fully active=] and document's + If document is [=Document/fully active=] and document's [=Document/visibility state=] is `"visible"`, set canUpdate to true. 1. Let permission be the [=permission state=] for the permission associated with [="microphone"=] access. -If permission is "granted", set canUpdate to true. + If permission is "granted", set canUpdate to true. 1. If canUpdate is false, abort these steps. 1. Set {{[[underrun duration]]}} to the total duration of all [=underrun events=] (in seconds) From 48e2309d940f9e64cbb3abac5a800f2236f1d1c6 Mon Sep 17 00:00:00 2001 From: Hongchan Choi Date: Mon, 22 Dec 2025 13:52:18 -0800 Subject: [PATCH 04/14] dfn fixes --- index.bs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/index.bs b/index.bs index 28c84e724..5b5264747 100644 --- a/index.bs +++ b/index.bs @@ -11866,10 +11866,9 @@ thread is done using control message passing. Communication in the other direction is done using regular event loop tasks. -Each {{AudioContext}} has a single control message -queue that is a list of control -messages that are operations running on the rendering -thread. +Each {{AudioContext}} has a single control message queue +that is a list of control messages that are +operations running on the rendering thread. Queuing a control message means adding the message to the end of the control message queue of an From af6b62daf0428fa339d1fb347aaacc54c5f68935 Mon Sep 17 00:00:00 2001 From: Hongchan Choi Date: Mon, 22 Dec 2025 14:00:34 -0800 Subject: [PATCH 05/14] more bikeshed fixes --- index.bs | 55 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/index.bs b/index.bs index 5b5264747..06b2e605e 100644 --- a/index.bs +++ b/index.bs @@ -8861,7 +8861,7 @@ enum OscillatorType { - +
{{OscillatorType}} enumeration description
Enum valueDescription
Enum valueDescription
"sine" A sine wave
"square" A square wave of duty period 0.5 @@ -9134,7 +9134,7 @@ enum PanningModelType { - +
{{PanningModelType}} enumeration description
Enum valueDescription
Enum valueDescription
"equalpower" @@ -11732,35 +11732,36 @@ Methods 1. Set {{[[average latency]]}} to currentLatency. 1. Set {{[[minimum latency]]}} to currentLatency. 1. Set {{[[maximum latency]]}} to currentLatency. +

Updating the stats

Once per second, execute the update audio stats algorithm: -1. If {{[[audio context]]}} is not running, abort these steps. -1. Let canUpdate be false. -1. Let document be the current [=this=]'s - [=relevant global object=]'s [=associated Document=]. - If document is [=Document/fully active=] and document's - [=Document/visibility state=] is `"visible"`, set canUpdate to - true. -1. Let permission be the [=permission state=] for the permission - associated with [="microphone"=] access. - If permission is "granted", set canUpdate to true. -1. If canUpdate is false, abort these steps. -1. Set {{[[underrun duration]]}} to the total duration of all [=underrun events=] - (in seconds) - that have occurred in {{[[audio context]]}} playback since its construction. -1. Set {{[[underrun events]]}} to the total number of [=underrun events=] - that have occurred in {{[[audio context]]}} playback since its - construction. -1. Set {{[[total duration]]}} to {{[[underrun duration]]}} + - {{[[audio context]]}}.{{BaseAudioContext/currentTime}}. -1. Set {{[[average latency]]}} to the average playback latency (in seconds) of - {{[[audio context]]}} playback over the {{currently tracked interval}}. -1. Set {{[[minimum latency]]}} to the minimum playback latency (in seconds) of - {{[[audio context]]}} playback over the {{currently tracked interval}}. -1. Set {{[[maximum latency]]}} to the maximum playback latency (in seconds) of - {{[[audio context]]}} playback over the {{currently tracked interval}}. + 1. If {{[[audio context]]}} is not running, abort these steps. + 1. Let canUpdate be false. + 1. Let document be the current [=this=]'s + [=relevant global object=]'s [=associated Document=]. + If document is [=Document/fully active=] and document's + [=Document/visibility state=] is `"visible"`, set canUpdate to + true. + 1. Let permission be the [=permission state=] for the permission + associated with [="microphone"=] access. + If permission is "granted", set canUpdate to true. + 1. If canUpdate is false, abort these steps. + 1. Set {{[[underrun duration]]}} to the total duration of all [=underrun events=] + (in seconds) + that have occurred in {{[[audio context]]}} playback since its construction. + 1. Set {{[[underrun events]]}} to the total number of [=underrun events=] + that have occurred in {{[[audio context]]}} playback since its + construction. + 1. Set {{[[total duration]]}} to {{[[underrun duration]]}} + + {{[[audio context]]}}.{{BaseAudioContext/currentTime}}. + 1. Set {{[[average latency]]}} to the average playback latency (in seconds) of + {{[[audio context]]}} playback over the {{currently tracked interval}}. + 1. Set {{[[minimum latency]]}} to the minimum playback latency (in seconds) of + {{[[audio context]]}} playback over the {{currently tracked interval}}. + 1. Set {{[[maximum latency]]}} to the maximum playback latency (in seconds) of + {{[[audio context]]}} playback over the {{currently tracked interval}}.

Privacy considerations for {{AudioPlaybackStats}}

From aa4932835c4b3ecc875fd3c2be61848fda2248c9 Mon Sep 17 00:00:00 2001 From: Hongchan Choi Date: Mon, 22 Dec 2025 14:10:15 -0800 Subject: [PATCH 06/14] more bikshed fixes --- index.bs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/index.bs b/index.bs index 06b2e605e..47f08c10d 100644 --- a/index.bs +++ b/index.bs @@ -4202,7 +4202,7 @@ Methods
-            cancelTime: The time after which any previously scheduled parameter changes will be cancelled. It is a time in the same time coordinate system as the {{AudioContext}}'s {{BaseAudioContext/currentTime}} attribute.  A {{RangeError}} exception MUST be thrown if cancelTime is negative. If {{AudioParam/cancelAndHoldAtTime()/cancelTime}} is less than {{BaseAudioContext/currentTime}}, it is clamped to {{BaseAudioContext/currentTime}}.
+            cancelTime: The time after which any previously scheduled parameter changes will be cancelled. It is a time in the same time coordinate system as the {{AudioContext}}'s {{BaseAudioContext/currentTime}} attribute.  A {{RangeError}} exception MUST be thrown if cancelTime is negative. If {{AudioParam/cancelAndHoldAtTime()/cancelTime}} is less than {{BaseAudioContext/currentTime}}, it is clamped to {{BaseAudioContext/currentTime}}.
         
@@ -11745,7 +11745,7 @@ Once per second, execute the update audio stats algorithm: [=Document/visibility state=] is `"visible"`, set canUpdate to true. 1. Let permission be the [=permission state=] for the permission - associated with [="microphone"=] access. + associated with [=microphone=] access. If permission is "granted", set canUpdate to true. 1. If canUpdate is false, abort these steps. 1. Set {{[[underrun duration]]}} to the total duration of all [=underrun events=] @@ -11764,9 +11764,10 @@ Once per second, execute the update audio stats algorithm: {{[[audio context]]}} playback over the {{currently tracked interval}}.
-

Privacy considerations for {{AudioPlaybackStats}}

+

+Privacy considerations for {{AudioPlaybackStats}}

-
Risk
+
Risk
Audio underrun information could be used to form a cross-site covert channel between two cooperating sites. One site could transmit information by intentionally causing audio glitches @@ -11777,7 +11778,8 @@ Note: This covert channel depends on specific system characteristics. It typically requires a shared linearization point (such as an OS or browser audio mixer) and callbacks that are effectively synchronous from that point, without intermediate buffering that would flatten load spikes. -
Mitigations
+ +
Mitigations
To inhibit the usage of such a covert channel, the API implements these mitigations. - The values returned by the API MUST not be updated more than once per From 3880a241dfcef511f8f7403d7a7780a9361b0a2d Mon Sep 17 00:00:00 2001 From: Hongchan Choi Date: Mon, 22 Dec 2025 14:33:14 -0800 Subject: [PATCH 07/14] external ref fixes --- index.bs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.bs b/index.bs index 47f08c10d..e6761bc32 100644 --- a/index.bs +++ b/index.bs @@ -11672,8 +11672,8 @@ Each {{AudioContext}} possesses exactly one {{AudioPlaybackStats}}. Attributes Note: These attributes update only once per second and under specific -conditions. See [[#update-audio-stats]] and [[#AudioPlaybackStats-mitigations]] -for details. +conditions. See [[#update-audio-stats]] and +[[#AudioPlaybackStats-privacy-mitigations]] for details.
: underrunDuration @@ -11745,7 +11745,7 @@ Once per second, execute the update audio stats algorithm: [=Document/visibility state=] is `"visible"`, set canUpdate to true. 1. Let permission be the [=permission state=] for the permission - associated with [=microphone=] access. + associated with [=microphone (in mediacapture-streams)=] access. If permission is "granted", set canUpdate to true. 1. If canUpdate is false, abort these steps. 1. Set {{[[underrun duration]]}} to the total duration of all [=underrun events=] From f89182d4e5257e102aa15e0b9246c4b84efcf359 Mon Sep 17 00:00:00 2001 From: Hongchan Choi Date: Mon, 22 Dec 2025 14:36:29 -0800 Subject: [PATCH 08/14] external ref fixes --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index e6761bc32..a81bc72a4 100644 --- a/index.bs +++ b/index.bs @@ -11745,7 +11745,7 @@ Once per second, execute the update audio stats algorithm: [=Document/visibility state=] is `"visible"`, set canUpdate to true. 1. Let permission be the [=permission state=] for the permission - associated with [=microphone (in mediacapture-streams)=] access. + associated with [="microphone" (in mediacapture-streams)=] access. If permission is "granted", set canUpdate to true. 1. If canUpdate is false, abort these steps. 1. Set {{[[underrun duration]]}} to the total duration of all [=underrun events=] From 64e4ae4d40bf0932f450fb9f4d07dfe9cf21eace Mon Sep 17 00:00:00 2001 From: Hongchan Choi Date: Mon, 22 Dec 2025 14:42:59 -0800 Subject: [PATCH 09/14] external ref fixes --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index a81bc72a4..786add575 100644 --- a/index.bs +++ b/index.bs @@ -11745,7 +11745,7 @@ Once per second, execute the update audio stats algorithm: [=Document/visibility state=] is `"visible"`, set canUpdate to true. 1. Let permission be the [=permission state=] for the permission - associated with [="microphone" (in mediacapture-streams)=] access. + associated with [=PermissionName/"microphone"=] access. If permission is "granted", set canUpdate to true. 1. If canUpdate is false, abort these steps. 1. Set {{[[underrun duration]]}} to the total duration of all [=underrun events=] From a9fd147ae150d9bea6b4ea9dc203b98b2a6e2394 Mon Sep 17 00:00:00 2001 From: Hongchan Choi Date: Mon, 22 Dec 2025 14:45:51 -0800 Subject: [PATCH 10/14] external ref fixes --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 786add575..97d244bf2 100644 --- a/index.bs +++ b/index.bs @@ -11745,7 +11745,7 @@ Once per second, execute the update audio stats algorithm: [=Document/visibility state=] is `"visible"`, set canUpdate to true. 1. Let permission be the [=permission state=] for the permission - associated with [=PermissionName/"microphone"=] access. + associated with [=PermissionName/microphone | "microphone"=] access. If permission is "granted", set canUpdate to true. 1. If canUpdate is false, abort these steps. 1. Set {{[[underrun duration]]}} to the total duration of all [=underrun events=] From 7d0727311be6a21c6e77d4b2498f3f49088c4d12 Mon Sep 17 00:00:00 2001 From: Hongchan Choi Date: Mon, 22 Dec 2025 14:58:50 -0800 Subject: [PATCH 11/14] external ref fixes --- index.bs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 97d244bf2..d448cb20a 100644 --- a/index.bs +++ b/index.bs @@ -43,6 +43,8 @@ Abstract: This specification describes a high-level Web
@@ -11745,7 +11747,7 @@ Once per second, execute the update audio stats algorithm:
         [=Document/visibility state=] is `"visible"`, set canUpdate to
         true.
     1. Let permission be the [=permission state=] for the permission
-        associated with [=PermissionName/microphone | "microphone"=] access.
+        associated with [="microphone"=] access.
         If permission is "granted", set canUpdate to true.
     1. If canUpdate is false, abort these steps.
     1. Set {{[[underrun duration]]}} to the total duration of all [=underrun events=]

From 95df93e74ae10cfd117e9b31a7ecad61a70fc7bd Mon Sep 17 00:00:00 2001
From: Hongchan Choi 
Date: Mon, 22 Dec 2025 15:00:01 -0800
Subject: [PATCH 12/14] external ref fixes

---
 index.bs | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/index.bs b/index.bs
index d448cb20a..67f9b866d 100644
--- a/index.bs
+++ b/index.bs
@@ -43,8 +43,6 @@ Abstract: This specification describes a high-level Web 
 
 
@@ -11747,7 +11745,7 @@ Once per second, execute the update audio stats algorithm:
         [=Document/visibility state=] is `"visible"`, set canUpdate to
         true.
     1. Let permission be the [=permission state=] for the permission
-        associated with [="microphone"=] access.
+        associated with "microphone" access.
         If permission is "granted", set canUpdate to true.
     1. If canUpdate is false, abort these steps.
     1. Set {{[[underrun duration]]}} to the total duration of all [=underrun events=]

From 59eb514b2672afc58b5f5908792e12bff4571b18 Mon Sep 17 00:00:00 2001
From: Hongchan Choi 
Date: Wed, 7 Jan 2026 21:20:51 +0000
Subject: [PATCH 13/14] Fix bikeshed error parsing in compile.sh to handle
 included file context

---
 compile.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/compile.sh b/compile.sh
index 4d3cf60bc..00d62c37b 100755
--- a/compile.sh
+++ b/compile.sh
@@ -41,6 +41,7 @@ bikeshed --print=plain -f spec 2>&1 | tee $BSLOG
 # Also remove any lines that start "cannot identify image file" because the path
 # is based the machine doing the build so we don't want that in the results.
 sed 's;^LINE [0-9]*:[0-9]*:;LINE:;' $BSLOG |
+  sed 's;^LINE [0-9]*:[0-9]* of file .*(included by a block on [0-9]*:[0-9]*):;LINE:;' |
   sed '/^cannot identify image file/d' |
   sed -e '$a\' > $ERRLOG
 

From 07a3d868de6f9992089b99329960bb40534ec0f7 Mon Sep 17 00:00:00 2001
From: Hongchan Choi 
Date: Wed, 7 Jan 2026 22:51:49 +0000
Subject: [PATCH 14/14] Update expected-errs.txt and compile.sh for newer
 Bikeshed version

---
 expected-errs.txt | 76 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 76 insertions(+)

diff --git a/expected-errs.txt b/expected-errs.txt
index d97559c93..cc68ccf54 100644
--- a/expected-errs.txt
+++ b/expected-errs.txt
@@ -47,11 +47,87 @@ LINE: No 'idl' refs found for '[CC-MODE]'.
 {{ChannelCountMode/[CC-MODE]}}
 LINE: No 'idl' refs found for '[CC-INTERP]'.
 {{ChannelInterpretation/[CC-INTERP]}}
+LINE: No 'idl' refs found for '[CC-MODE]'.
+{{ChannelCountMode/[CC-MODE]}}
+LINE: No 'idl' refs found for '[CC-INTERP]'.
+{{ChannelInterpretation/[CC-INTERP]}}
+LINE: No 'idl' refs found for '[CC-MODE]'.
+{{ChannelCountMode/[CC-MODE]}}
+LINE: No 'idl' refs found for '[CC-INTERP]'.
+{{ChannelInterpretation/[CC-INTERP]}}
+LINE: No 'idl' refs found for '[CC-MODE]'.
+{{ChannelCountMode/[CC-MODE]}}
+LINE: No 'idl' refs found for '[CC-INTERP]'.
+{{ChannelInterpretation/[CC-INTERP]}}
+LINE: No 'idl' refs found for '[CC-MODE]'.
+{{ChannelCountMode/[CC-MODE]}}
+LINE: No 'idl' refs found for '[CC-INTERP]'.
+{{ChannelInterpretation/[CC-INTERP]}}
+LINE: No 'idl' refs found for '[CC-MODE]'.
+{{ChannelCountMode/[CC-MODE]}}
+LINE: No 'idl' refs found for '[CC-INTERP]'.
+{{ChannelInterpretation/[CC-INTERP]}}
+LINE: No 'idl' refs found for '[CC-MODE]'.
+{{ChannelCountMode/[CC-MODE]}}
+LINE: No 'idl' refs found for '[CC-INTERP]'.
+{{ChannelInterpretation/[CC-INTERP]}}
+LINE: No 'idl' refs found for '[CC-MODE]'.
+{{ChannelCountMode/[CC-MODE]}}
+LINE: No 'idl' refs found for '[CC-INTERP]'.
+{{ChannelInterpretation/[CC-INTERP]}}
+LINE: No 'idl' refs found for '[CC-MODE]'.
+{{ChannelCountMode/[CC-MODE]}}
+LINE: No 'idl' refs found for '[CC-INTERP]'.
+{{ChannelInterpretation/[CC-INTERP]}}
+LINE: No 'idl' refs found for '[CC-MODE]'.
+{{ChannelCountMode/[CC-MODE]}}
+LINE: No 'idl' refs found for '[CC-INTERP]'.
+{{ChannelInterpretation/[CC-INTERP]}}
+LINE: No 'idl' refs found for '[CC-MODE]'.
+{{ChannelCountMode/[CC-MODE]}}
+LINE: No 'idl' refs found for '[CC-INTERP]'.
+{{ChannelInterpretation/[CC-INTERP]}}
+LINE: No 'idl' refs found for '[CC-MODE]'.
+{{ChannelCountMode/[CC-MODE]}}
+LINE: No 'idl' refs found for '[CC-INTERP]'.
+{{ChannelInterpretation/[CC-INTERP]}}
+LINE: No 'idl' refs found for '[CC-MODE]'.
+{{ChannelCountMode/[CC-MODE]}}
+LINE: No 'idl' refs found for '[CC-INTERP]'.
+{{ChannelInterpretation/[CC-INTERP]}}
 LINE: Multiple possible 'audio' element refs.
 Arbitrarily chose https://html.spec.whatwg.org/multipage/media.html#audio
 To auto-select one of the following refs, insert one of these lines into a