Provided one can access sensor data fast enough, cross device tracking[0]. Display an ad that lights up the room in such a way that you can read it with the sensor. Communication across an airgap. If you have two devices with screens and said sensors in a dark room, they might be able to communicate by turning screens on and off.
Most speculatively, imaging the environment with compressive imaging[1]. One might be able to flash some patterns on the screen and look at light sensor output to take a picture.
Giving web browsers access to sensors on our devices is sort of scary.
Oh god. No no no. I cannot hate this idea hard enough to overcome my fear that someday this kind of thing might actually happen! This would be the browser's job, under user control, not ever the site's job. My computer, my choice, no you don't get to decide that for me just because you are a web page designer.
It's difficult to pull this off with every website and keep it readable, without any hint from the site. This is why we have CSS for different screen sizes, rather than relying on mobile browsers to make all the decisions, along with an option to view the site in "desktop mode". I do agree that it would be annoying if sites made this decision for users.
But I think the more promising use for this could be enabling aesthetically pleasing color palettes that are power consumption optimized. Picture a HN that switches to darker tones of the current colors when you're on a mobile device.
I'm already constantly using "readability mode" to strip away as much of the custom styling as I can, because letting designers run riot - and building browsers that obey their wishes - has turned the web into such a mess. Tighter limits and more end-user control would be better. Different people have different preferences about their browsing experience and should be able to control that without having to rely on every last web designer to make helpful choices, because they really just don't.
Just last night I was happy to find that Safari Books Online had a 'night' feature, automatically switching would have saved me thirty minutes of burned retinas.
Before we add any new APIs we need a permissions interface for the web. Many new APIs add creepy data points that the user be aware that they are providing.
Most speculatively, imaging the environment with compressive imaging[1]. One might be able to flash some patterns on the screen and look at light sensor output to take a picture.
Giving web browsers access to sensors on our devices is sort of scary.
[0] http://arstechnica.com/tech-policy/2015/11/beware-of-ads-tha... [1] http://arxiv.org/pdf/1305.7181.pdf