w3c / system-wake-lock

System Wake Lock API
Other
3 stars 2 forks source link

Use case: develop websites with real-time updates on mobile devices wirelessly #8

Open marcofugaro opened 3 years ago

marcofugaro commented 3 years ago

Let's say you're a website developer and you are developing a website both for desktop and mobile, and you're previewing the website live on both your laptop and your phone.

Your setup looks like this:

Your phone is not attached with a cord to the laptop, rather you access the local website link through a local network URL. (This is very common, tools like create-react-app print this to the console: )

You leave your phone on your stand while you write code, the auto-refresh feature will take care of updating it.

However, after a bit, the screen turns off, and you're forced to go into the settings of the phone to remove the screen turn-off time. This is annoying since after you're done, you probably will forget to change the setting back and your phone will not go to sleep by itself.

This would be a really useful job for this API.


Figma users can already do this thanks to the figma app, which is native and can of course access the WakeLock API.