repo: janusweb
action: commit
revision: 
path_from: 
revision_from: fc57041d585192e3404c2813694c01b64d336d33:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit fc57041d585192e3404c2813694c01b64d336d33
Author: bioid 
Date:   Thu Mar 31 09:37:20 2016 +0000

    send a player update once per second to avoid getting timed out

diff --git a/scripts/janusweb.js b/scripts/janusweb.js
index 88daeed47823cb0c5ac52d9e5c95abd138874260..
index ..a058e43e236c835c0d4e24d04ae61178ce47bf46 100644
--- a/scripts/janusweb.js
+++ b/scripts/janusweb.js
@@ -50,6 +50,9 @@ elation.require(['engine.things.generic','engine.things.remoteplayer', 'janusweb
       this.jcc.addEventListener('connect', function() {
         this.sendPlayerUpdate({first: true});
         elation.events.add(this.engine.client.player, 'thing_change', elation.bind(this, this.sendPlayerUpdate));
+        setInterval(function() {
+          this.sendPlayerUpdate({first: false});
+        }.bind(this), 1000);
       }.bind(this));
       elation.events.add(this, 'room_active', elation.bind(this, this.subscribe));
       elation.events.add(this, 'room_disable', elation.bind(this, this.unsubscribe));

-----END OF PAGE-----