Skip to content

Commit 2aaed39

Browse files
Hernqvisthoch
andauthored
Apply suggestions from code review
From @hoch Co-authored-by: Hongchan Choi <hongchan.choi@gmail.com>
1 parent 66fa3b7 commit 2aaed39

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

index.bs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11565,7 +11565,7 @@ Audio underruns (also commonly called glitches) are gaps in the audio
1156511565
playout which occur when the audio pipeline cannot deliver audio on time.
1156611566
Underruns (often manifesting as audible "clicks" in the playout) are bad
1156711567
for the user experience, so if any of these occur it
11568-
can be useful for the application to be able to detect this and possibly
11568+
can be useful for the application to be able to detect them and possibly
1156911569
take some action to improve the playout.
1157011570

1157111571
{{AudioPlayoutStats}} is a dedicated object for audio stats reporting;
@@ -11580,9 +11580,9 @@ Underruns are defined in terms of [=underrun frames=] and [=underrun events=]:
1158011580
This happens when the playout path fails to provide audio frames
1158111581
to the output device on time, in which case underrun frames will be played (underrun frames are typically silence).
1158211582
This typically only happens if the pipeline is underperforming.
11583-
This includes underrun situations that happen for reasons unrelated to WebAudio/{{AudioWorklet}}s.</li>
11583+
This includes underrun situations that happen for reasons unrelated to WebAudio/{{AudioWorklet}}s.
1158411584
- When an [=underrun frame=] is played after a non-underrun frame, we consider this an <dfn>underrun event</dfn>.
11585-
That is, multiple consecutive [=underrun frames=] will count as a single [=underrun event=].</li>
11585+
That is, multiple consecutive [=underrun frames=] will count as a single [=underrun event=].
1158611586

1158711587
<pre class="idl">
1158811588
[Exposed=Window, SecureContext]
@@ -11754,21 +11754,21 @@ One site could transmit information by intentionally causing audio glitches
1175411754
(by causing very high CPU usage, for example) while the other site
1175511755
could detect these glitches.
1175611756
<h5 id="AudioPlayoutStats-mitigations">Mitigations</h5>
11757-
To inihibit the usage of such a covert channel, the API implements these mitigations.
11757+
To inhibit the usage of such a covert channel, the API implements these mitigations.
1175811758
- The values returned by the API should not be updated more than once per second.
1175911759
- The api should be restricted to sites fulfill at least one of the following criteria:
1176011760
1. The site has obtained <a href="https://w3c.github.io/mediacapture-main/#dom-mediadevices-getusermedia">getUserMedia</a> permission.
1176111761

1176211762
Note: The reasoning is that if a site has obtained <a href="https://w3c.github.io/mediacapture-main/#dom-mediadevices-getusermedia">getUserMedia</a> permission, it can receive glitch information or communicate efficiently through use of the microphone, making access to the information provided by {{AudioPlayoutStats}} redundant. These options include detecting glitches through gaps in the microphone signal, or communicating using human-inaudible sine waves. If microphone access is ever made safer in this regard, this condition should be reconsidered.
1176311763
1. The document is [=Document/fully active=] and its [=Document/visibility state=] is `"visible"`.
1176411764

11765-
Note: Assuming that neither cooperating site has microphone permission, this criteria ensures that the site that receives the covert signal must be visible, restricting the conditions under which the covert channel can be used. It makes it impossible for sites to communicate with each other using the covert channel while not visible.
11765+
Note: Assuming that neither cooperating site has microphone permission, this criterion ensures that the site that receives the covert signal must be visible, restricting the conditions under which the covert channel can be used. It makes it impossible for sites to communicate with each other using the covert channel while not visible.
1176611766

1176711767
<h4>Usage example</h4>
1176811768
This example shows how the {{AudioPlayoutStats}} can be used to calculate audio underrun and latency statistics,
1176911769
and what the statistics might be used for.
1177011770
<pre line-numbers class="example" highlight="js">
11771-
var oldTotalDuration = audioContext.playoutStats.totalDuration;
11771+
let oldTotalDuration = audioContext.playoutStats.totalDuration;
1177211772
var oldUnderrunDuration = audioContext.playoutStats.underrunDuration;
1177311773
var oldUnderrunEvents = audioContext.playoutStats.underrunEvents;
1177411774
audioContext.playoutStats.resetLatency();

0 commit comments

Comments
 (0)