html5 video can now set the height and width of the video. popcorn-port
authorhamidouk
Mon, 05 Dec 2011 14:37:05 +0100
branchpopcorn-port
changeset 402 6148fb647f46
parent 398 d1883378b822
child 403 375e8af3c9cd
child 414 abaf6c8eeca2
html5 video can now set the height and width of the video.
src/js/init.js
--- a/src/js/init.js	Mon Dec 05 11:28:43 2011 +0100
+++ b/src/js/init.js	Mon Dec 05 14:37:05 2011 +0100
@@ -16,6 +16,13 @@
       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);
+           
+           if (options.hasOwnProperty("height"))
+             IriSP.jQuery("#" + containerDiv).css("height", options.height);
+
            pop = Popcorn("#" + tmpId).mediafragment({start : 0});
         break;