mobile: attempt to prevent sleep (issue #79)
This commit is contained in:
parent
8f9a0ea24f
commit
c2bae64593
2 changed files with 12 additions and 0 deletions
|
|
@ -16,6 +16,7 @@
|
|||
"mathjs": "3.16.3",
|
||||
"node-sass": "^4.5.3",
|
||||
"nodemon": "^1.12.0",
|
||||
"nosleep.js": "^0.7.0",
|
||||
"screenfull": "^3.3.1",
|
||||
"shortid": "2.2.8",
|
||||
"socket.io-client": "2.0.3",
|
||||
|
|
|
|||
|
|
@ -66,6 +66,17 @@ var callbacks = require('./app/callbacks'),
|
|||
|
||||
osc.init()
|
||||
|
||||
///////////////////////
|
||||
|
||||
var NoSleep = require('nosleep.js'),
|
||||
noSleep = new NoSleep();
|
||||
|
||||
function enableNoSleep() {
|
||||
noSleep.enable();
|
||||
document.removeEventListener('touchstart', enableNoSleep, false);
|
||||
}
|
||||
|
||||
document.addEventListener('touchstart', enableNoSleep, false);
|
||||
|
||||
///////////////////////
|
||||
$(document).ready(function(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue