A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://Tarektouati.github.io/vue-use-web/functions/device-light.html below:

Website Navigation


Device Light | useWeb

# Device Light

The DeviceLightEvent provides web developers with information from photo sensors or similar detectors about ambient light levels near the device. For example this may be useful to adjust the screen's brightness based on the current ambient light level in order to save energy or provide better readability.

# State

The useDeviceLight function exposes the following reactive state:

State Type Description value Number The level of the ambient light in lux . # Use-cases

Detecting the ambient light around user devices can have some applications:

# Example

You can test the following example on Firefox browser with an Andriod device with a light sensor. You should enable ambient light sensor in firefox's settings' about:config.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4