Answer the question
In order to leave comments, you need to log in
How to catch on JS the moment the phone screen turns off?
Hello. How can I use javascript to catch the moment when the phone screen turns off (by pressing a button or by itself). The task is to mute the background music on the site in the mobile browser during this event
Answer the question
In order to leave comments, you need to log in
I don't know how it is in JS, but when the screen turns off in androyd, the onPause method is called in the life cycle of the browser screen.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question