vovastradamus2016-03-29 08:52:47
vovastradamus, 2016-03-29 08:52:47

After 300 seconds of an inactive tab, the work of js is turned off. How to get around?

Good day gentlemen.
I wrote a web player and ran into an unpleasant thing. When I turned off the phone (turned off the screen), for some reason it did not switch to the next track. After a long fuss, it turned out that after 300 seconds, chrome (mobile) stops any script execution, even console.log. I asked friends to test it, they confirmed that they do not switch songs at the end.
There are no such problems in firefox, everything works there.
How can you get around? Maybe somehow wake up the phone (naturally without unlocking it)? Or specify something in the manifest file.
In the mobile version of VK and on SoundCloud, the same problem.
Android 5.1 Chrome 49

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Alexander Litvinenko, 2016-03-29

wrap it in nw.js or phoneGap as an application and everything will be ok.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question