web/res/metadataplayer/LdtPlayer-core.js
changeset 776 e73b0c98d2db
parent 765 8cde4d15a173
child 778 525f00c2d6ac
--- a/web/res/metadataplayer/LdtPlayer-core.js	Thu Jan 17 15:54:18 2013 +0100
+++ b/web/res/metadataplayer/LdtPlayer-core.js	Thu Jan 24 18:52:38 2013 +0100
@@ -1072,17 +1072,6 @@
 
 Model.Mashup.prototype = new Model.Playable();
 
-Model.Mashup.prototype.checkLoaded = function() {
-    var loaded = !!this.segments.length;
-    this.getMedias().forEach(function(_m) {
-        loaded = loaded && _m.loaded;
-    });
-    this.loaded = loaded;
-    if (loaded) {
-        this.trigger("loadedmetadata");
-    }
-}
-
 Model.Mashup.prototype.updateTimes = function() {
     var _time = 0;
     this.segments.forEach(function(_segment) {
@@ -1450,6 +1439,9 @@
 return Model;
 
 })(IriSP);
+
+/* END model.js */
+
 IriSP.language = 'en';
 
 IriSP.libFiles = {
@@ -1595,8 +1587,10 @@
        _this[_key] = _value;
     });
     
+    this.$ = IriSP.jQuery('#' + this.container);
+    
     if (typeof this.width === "undefined") {
-        this.width = player.config.width;
+        this.width = this.$.width();
     }
     
     /* Setting this.player at the end in case it's been overriden
@@ -1605,7 +1599,6 @@
     this.player = player;
     
     /* Adding classes and html attributes */
-    this.$ = IriSP.jQuery('#' + this.container);
     this.$.addClass("Ldt-TraceMe Ldt-Widget").attr("widget-type", _type);
     
     this.l10n = (