web/res/metadataplayer/LdtPlayer-core.js
changeset 765 8cde4d15a173
parent 755 d50aeed9a54b
child 776 e73b0c98d2db
--- a/web/res/metadataplayer/LdtPlayer-core.js	Wed Jan 16 18:25:10 2013 +0100
+++ b/web/res/metadataplayer/LdtPlayer-core.js	Thu Jan 17 15:17:58 2013 +0100
@@ -126,17 +126,17 @@
     });
     this.$.find('.Ldt-Loader').detach();
     
-    var endload = false;
+    this.widgetsLoaded = false;
     
     this.on("widget-loaded", function() {
-        if (endload) {
+        if (_this.widgetsLoaded) {
             return;
         }
         var isloaded = !IriSP._(_this.widgets).any(function(w) {
             return !(w && w.isLoaded())
         });
         if (isloaded) {
-            endload = true;
+            _this.widgetsLoaded = true;
             _this.trigger("widgets-loaded");
         }
     });   
@@ -801,6 +801,7 @@
     this.volume = .5;
     this.paused = true;
     this.muted = false;
+    this.loadedMetadata = false;
     var _this = this;
     this.on("play", function() {
         _this.paused = false;
@@ -825,6 +826,9 @@
             _this.trigger("enter-annotation",_a);
         });
     });
+    this.on("loadedmetadata", function() {
+        _this.loadedMetadata = true;
+    })
 }
 
 Model.Playable.prototype = new Model.Element();
@@ -1484,7 +1488,8 @@
         underscore : "http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.3.3/underscore-min.js",
         Mustache : "http://cdnjs.cloudflare.com/ajax/libs/mustache.js/0.5.0-dev/mustache.min.js",
         raphael : "http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js",
-        json : "http://cdnjs.cloudflare.com/ajax/libs/json2/20110223/json2.js"
+        json : "http://cdnjs.cloudflare.com/ajax/libs/json2/20110223/json2.js",
+        popcorn: "http://cdn.popcornjs.org/code/dist/popcorn-complete.min.js"
     },
     useCdn : false
 }