repo: janusweb
action: commit
revision: 
path_from: 
revision_from: 63362cec4e5972492d82fba047ecb937c23261a0:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit 63362cec4e5972492d82fba047ecb937c23261a0
Author: James Baicoianu 
Date:   Wed Jan 31 23:16:05 2018 -0800

    Deferred room loading

diff --git a/scripts/janusweb.js b/scripts/janusweb.js
index c35573310f48ee47131e0de78bb7443645bc0482..
index ..8cf1e5d40d63be8f3bdbc624a11c4ae83093e4ba 100644
--- a/scripts/janusweb.js
+++ b/scripts/janusweb.js
@@ -262,8 +262,10 @@ elation.require([
         this.network.enable(player);
       }

-      if (this.autoload) {
+      if (this.autoload || starturl != this.properties.homepage) {
         this.load(starturl, true);
+      } else {
+        player.disable();
       }

       if (this.showchat) {
@@ -289,8 +291,11 @@ elation.require([
         url: url,
         janus: this,
         baseurl: baseurl,
-        corsproxy: this.corsproxy
+        corsproxy: this.corsproxy,
+        deferload: true
       });
+      elation.events.fire({element: this, type: 'room_load_start', data: room});
+      room.load();
       // FIXME - should be able to spawn without adding to the heirarchy yet
       this.remove(room);

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