src/js/init.js
branchcap-demo
changeset 404 6c4e5b2fee8c
parent 402 6148fb647f46
--- a/src/js/init.js	Mon Dec 05 14:37:27 2011 +0100
+++ b/src/js/init.js	Mon Dec 05 14:54:19 2011 +0100
@@ -7,21 +7,21 @@
     var pop;
     var ret = layoutManager.createDiv(); 
     var containerDiv = ret[0];
-    
+    var tmpId = Popcorn.guid("video"); 
+
     switch(options.type) {
       /*
         todo : dynamically create the div/video tag which
         will contain the video.
       */
       case "html5":
-           var tmpId = Popcorn.guid("video"); 
            IriSP.jQuery("#" + containerDiv).append("<video src='" + options.file + "' id='" + tmpId + "'></video>");
 
            if (options.hasOwnProperty("width"))
-             IriSP.jQuery("#" + containerDiv).css("width", options.width);
+             IriSP.jQuery("#" + tmpId).css("width", options.width);
            
            if (options.hasOwnProperty("height"))
-             IriSP.jQuery("#" + containerDiv).css("height", options.height);
+             IriSP.jQuery("#" + tmpId).css("height", options.height);
 
            pop = Popcorn("#" + tmpId).mediafragment({start : 0});
         break;