@@ -246,7 +246,7 @@ To mitigate these threats specific to Ambient Light Sensor, user agents must:
246
246
- [=Reduce accuracy=] of sensor readings. See [[#reduce-sensor-accuracy]] .
247
247
- Obtain user consent before providing sensor readings. This is done by
248
248
integrating with the [[MEDIACAPTURE-STREAMS]] specification. See
249
- [[#local-video -source-requirement]] .
249
+ [[#local-camera -source-requirement]] .
250
250
251
251
User agents may also <a>limit maximum sampling frequency</a> .
252
252
@@ -292,7 +292,7 @@ experience. <a href="https://crbug.com/1332536">Chromium bug 1332536</a> and <a
292
292
href="https://crrev.com/c/3666917"> Chromium review 3666917</a> contain more
293
293
information about this.
294
294
295
- Active local video source requirement {#local-video -source-requirement}
295
+ Active local camera source requirement {#local-camera -source-requirement}
296
296
-----
297
297
298
298
Many of the attacks on Ambient Light sensors referenced above rely on being
@@ -307,16 +307,16 @@ grant or deny access to it.
307
307
308
308
What this specification does instead is consider an Ambient Light Sensor to be
309
309
a 1x1 grayscale camera, integrate with the [[MEDIACAPTURE-STREAMS]]
310
- specification and require there to be at least one local video [=source=] that
310
+ specification and require there to be at least one local camera [=source=] that
311
311
is not [=muted=] or [=stopped=] in order for illuminance readouts to be
312
312
provided. In other words, an Ambient Light Sensor only provides readings if a
313
- local video source (such as a camera) is currently active and being used in the
314
- same window as the {{AmbientLightSensor}} instance.
313
+ local video camera is currently active and being used in the same window as the
314
+ {{AmbientLightSensor}} instance.
315
315
316
316
Per the [[MEDIACAPTURE-STREAMS]] specification, this is only possible if script
317
317
has called {{MediaDevices/getUserMedia()}} and granted the <a
318
318
permission> "camera"</a> permission. This also means the User Agent has at least
319
- indicated to the user that a local video source has started being used as per
319
+ indicated to the user that a local camera source has started being used as per
320
320
[[MEDIACAPTURE-STREAMS#privacy-indicator-requirements]] .
321
321
322
322
The goal of this model is to treat an Ambient Light Sensor as potentially as
@@ -337,7 +337,7 @@ which is the device's main light detector.
337
337
The <a>Ambient Light Sensor</a> 's [=sensor permission names=] is an
338
338
[=set/empty=] [=ordered set|set=] .
339
339
340
- Note: See [[#local-video -source-requirement]] . This specification relies on the
340
+ Note: See [[#local-camera -source-requirement]] . This specification relies on the
341
341
permission model specified in the [[MEDIACAPTURE-STREAMS]] specification
342
342
instead.
343
343
@@ -389,9 +389,9 @@ The {{AmbientLightSensor/illuminance}} getter steps are:
389
389
390
390
### Media Capture and Streams integration ### {#media-capture-and-streams-integration}
391
391
392
- As discussed in [[#local-video -source-requirement]] , illuminance readouts are
392
+ As discussed in [[#local-camera -source-requirement]] , illuminance readouts are
393
393
provided only if the same {{Window}} with an {{AmbientLightSensor}} object has
394
- at least one local video [=source=] that is not [=muted=] or [=stopped=] .
394
+ at least one local camera [=source=] that is not [=muted=] or [=stopped=] .
395
395
396
396
The [=ambient light pre-activation checks algorithm=] is invoked by
397
397
{{Sensor/start()}} as specified in [[GENERIC-SENSOR]] .
@@ -403,7 +403,7 @@ run the following steps:
403
403
<div algorithm="deactivate sensors if necessary">
404
404
1. Let |global| be the {{Window}} object of the affected \[[devicesLiveMap]]
405
405
internal slot.
406
- 1. Let |result| be the result of invoking [=check for active local video sources=] with |global|.
406
+ 1. Let |result| be the result of invoking [=check for active local camera sources=] with |global|.
407
407
1. If |result| is true, return.
408
408
1. For each {{AmbientLightSensor}} object |sensor| whose [=relevant global
409
409
object=] is |global|:
@@ -494,23 +494,23 @@ quantization algorithm=]:
494
494
The [=Ambient Light Sensor=] [=sensor type=] defines the following
495
495
[=pre-activation checks algorithm=] :
496
496
497
- <div algorithm="check active local video source">
497
+ <div algorithm="check active local camera source">
498
498
: input
499
499
:: |sensor|, an {{AmbientLightSensor}} object
500
500
: output
501
501
:: A [=boolean=] indicating whether the checks have passed and sensor activation may proceed.
502
502
503
503
1. Let |global| be |sensor|'s [=relevant global object=] .
504
- 1. Return the result of invoking [=check for active local video sources=] with |global|.
504
+ 1. Return the result of invoking [=check for active local camera sources=] with |global|.
505
505
</div>
506
506
507
- <h3 dfn>Check for active local video source</h3>
507
+ <h3 dfn>Check for active local camera source</h3>
508
508
509
- <div algorithm="check for active local video sources">
509
+ <div algorithm="check for active local camera sources">
510
510
: input
511
511
:: |global|, an {{Window}} object
512
512
: output
513
- :: A [=boolean=] indicating whether there are active local video sources.
513
+ :: A [=boolean=] indicating whether there are active local camera sources.
514
514
515
515
1. If |global| does not have a \[[mediaStreamTrackSources]] internal slot, return false.
516
516
1. For each |source| in |global|'s \[[mediaStreamTrackSources]] internal slot:
0 commit comments