Class AmbientLightSensor
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalAmbientLightSensor interface of the Sensor APIs returns the current light level or illuminance of the ambient light around the hosting device.
[Value("AmbientLightSensor")]
public class AmbientLightSensor : Sensor
- Inheritance
-
AmbientLightSensor
- Inherited Members
Remarks
To use this sensor, the user must grant permission to the 'ambient-light-sensor' device sensor through the Permissions API.
This feature may be blocked by a Permissions Policy set on your server.
Constructors
AmbientLightSensor()
public AmbientLightSensor()
AmbientLightSensor(SensorOptions)
NOTE
ExperimentalAmbientLightSensor() constructor creates a new AmbientLightSensor object, which returns the current light level or illuminance of the ambient light around the hosting device.
public AmbientLightSensor(SensorOptions sensorOptions = null)
Parameters
sensorOptionsSensorOptions
Remarks
-'sensor.Reading' event
Properties
Illuminance
NOTE
Experimentalilluminance read-only property of the AmbientLightSensor interface returns the current light level in lux of the ambient light level around the hosting device.
[Value("illuminance")]
public Number? Illuminance { get; }
Property Value
- Number
A 'Number' indicating the current light level in lux.