开发者

How to run JavaScript event when the iPad's screen is locked?

开发者 https://www.devze.com 2023-04-06 02:35 出处:网络
I am developing an alarm in HTML5 for iPad, but I noticed that when the screen goes into standby (or is b开发者_开发问答locked by the user), Safari blocks all events. I tried setTimeout().

I am developing an alarm in HTML5 for iPad, but I noticed that when the screen goes into standby (or is b开发者_开发问答locked by the user), Safari blocks all events. I tried setTimeout().

How to solve?

I just need to refresh the page or run a .mp3 after a certain period of time.


That's not possible. Safari goes to sleep when the device is in sleep mode.

Running Timer in iPhone Sleep mode (with no javascript)?


You'd need a native app for this, AFAIK.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号