@@ -207,7 +207,7 @@ To mitigate these threats specific to Ambient Light Sensor, user agents must:
207
207
- [=Reduce accuracy=] of sensor readings. See [[#reduce-sensor-accuracy]] .
208
208
- Obtain user consent before providing sensor readings. This is done by
209
209
integrating with the [[MEDIACAPTURE-STREAMS]] specification. See
210
- [[#local-video -source-requirement]] .
210
+ [[#local-camera -source-requirement]] .
211
211
212
212
User agents may also <a>limit maximum sampling frequency</a> .
213
213
@@ -253,7 +253,7 @@ experience. <a href="https://crbug.com/1332536">Chromium bug 1332536</a> and <a
253
253
href="https://crrev.com/c/3666917"> Chromium review 3666917</a> contain more
254
254
information about this.
255
255
256
- Active local video source requirement {#local-video -source-requirement}
256
+ Active local camera source requirement {#local-camera -source-requirement}
257
257
-----
258
258
259
259
Many of the attacks on Ambient Light sensors referenced above rely on being
@@ -268,16 +268,16 @@ grant or deny access to it.
268
268
269
269
What this specification does instead is consider an Ambient Light Sensor to be
270
270
a 1x1 grayscale camera, integrate with the [[MEDIACAPTURE-STREAMS]]
271
- specification and require there to be at least one local video [=source=] that
271
+ specification and require there to be at least one local camera [=source=] that
272
272
is not [=muted=] or [=stopped=] in order for illuminance readouts to be
273
273
provided. In other words, an Ambient Light Sensor only provides readings if a
274
- local video source (such as a camera) is currently active and being used in the
275
- same window as the {{AmbientLightSensor}} instance.
274
+ local video camera is currently active and being used in the same window as the
275
+ {{AmbientLightSensor}} instance.
276
276
277
277
Per the [[MEDIACAPTURE-STREAMS]] specification, this is only possible if script
278
278
has called {{MediaDevices/getUserMedia()}} and granted the <a
279
279
permission> "camera"</a> permission. This also means the User Agent has at least
280
- indicated to the user that a local video source has started being used as per
280
+ indicated to the user that a local camera source has started being used as per
281
281
[[MEDIACAPTURE-STREAMS#privacy-indicator-requirements]] .
282
282
283
283
The goal of this model is to treat an Ambient Light Sensor as potentially as
@@ -298,7 +298,7 @@ which is the device's main light detector.
298
298
The <a>Ambient Light Sensor</a> 's [=sensor permission names=] is an
299
299
[=set/empty=] [=ordered set|set=] .
300
300
301
- Note: See [[#local-video -source-requirement]] . This specification relies on the
301
+ Note: See [[#local-camera -source-requirement]] . This specification relies on the
302
302
permission model specified in the [[MEDIACAPTURE-STREAMS]] specification
303
303
instead.
304
304
@@ -350,9 +350,9 @@ The {{AmbientLightSensor/illuminance}} getter steps are:
350
350
351
351
### Media Capture and Streams integration ### {#media-capture-and-streams-integration}
352
352
353
- As discussed in [[#local-video -source-requirement]] , illuminance readouts are
353
+ As discussed in [[#local-camera -source-requirement]] , illuminance readouts are
354
354
provided only if the same {{Window}} with an {{AmbientLightSensor}} object has
355
- at least one local video [=source=] that is not [=muted=] or [=stopped=] .
355
+ at least one local camera [=source=] that is not [=muted=] or [=stopped=] .
356
356
357
357
The [=ambient light pre-activation checks algorithm=] is invoked by
358
358
{{Sensor/start()}} as specified in [[GENERIC-SENSOR]] .
@@ -364,7 +364,7 @@ run the following steps:
364
364
<div algorithm="deactivate sensors if necessary">
365
365
1. Let |global| be the {{Window}} object of the affected \[[devicesLiveMap]]
366
366
internal slot.
367
- 1. Let |result| be the result of invoking [=check for active local video sources=] with |global|.
367
+ 1. Let |result| be the result of invoking [=check for active local camera sources=] with |global|.
368
368
1. If |result| is true, return.
369
369
1. For each {{AmbientLightSensor}} object |sensor| whose [=relevant global
370
370
object=] is |global|:
@@ -455,23 +455,23 @@ quantization algorithm=]:
455
455
The [=Ambient Light Sensor=] [=sensor type=] defines the following
456
456
[=pre-activation checks algorithm=] :
457
457
458
- <div algorithm="check active local video source">
458
+ <div algorithm="check active local camera source">
459
459
: input
460
460
:: |sensor|, an {{AmbientLightSensor}} object
461
461
: output
462
462
:: A [=boolean=] indicating whether the checks have passed and sensor activation may proceed.
463
463
464
464
1. Let |global| be |sensor|'s [=relevant global object=] .
465
- 1. Return the result of invoking [=check for active local video sources=] with |global|.
465
+ 1. Return the result of invoking [=check for active local camera sources=] with |global|.
466
466
</div>
467
467
468
- <h3 dfn>Check for active local video source</h3>
468
+ <h3 dfn>Check for active local camera source</h3>
469
469
470
- <div algorithm="check for active local video sources">
470
+ <div algorithm="check for active local camera sources">
471
471
: input
472
472
:: |global|, an {{Window}} object
473
473
: output
474
- :: A [=boolean=] indicating whether there are active local video sources.
474
+ :: A [=boolean=] indicating whether there are active local camera sources.
475
475
476
476
1. If |global| does not have a \[[mediaStreamTrackSources]] internal slot, return false.
477
477
1. For each |source| in |global|'s \[[mediaStreamTrackSources]] internal slot:
0 commit comments