repo: janusweb action: commit revision: path_from: revision_from: fc57041d585192e3404c2813694c01b64d336d33: path_to: revision_to:
commit fc57041d585192e3404c2813694c01b64d336d33 Author: bioidDate: 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
--- 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-----