src/js/init.js
branchcap-demo
changeset 404 6c4e5b2fee8c
parent 402 6148fb647f46
equal deleted inserted replaced
403:375e8af3c9cd 404:6c4e5b2fee8c
     5 
     5 
     6 IriSP.configurePopcorn = function (layoutManager, options) {
     6 IriSP.configurePopcorn = function (layoutManager, options) {
     7     var pop;
     7     var pop;
     8     var ret = layoutManager.createDiv(); 
     8     var ret = layoutManager.createDiv(); 
     9     var containerDiv = ret[0];
     9     var containerDiv = ret[0];
    10     
    10     var tmpId = Popcorn.guid("video"); 
       
    11 
    11     switch(options.type) {
    12     switch(options.type) {
    12       /*
    13       /*
    13         todo : dynamically create the div/video tag which
    14         todo : dynamically create the div/video tag which
    14         will contain the video.
    15         will contain the video.
    15       */
    16       */
    16       case "html5":
    17       case "html5":
    17            var tmpId = Popcorn.guid("video"); 
       
    18            IriSP.jQuery("#" + containerDiv).append("<video src='" + options.file + "' id='" + tmpId + "'></video>");
    18            IriSP.jQuery("#" + containerDiv).append("<video src='" + options.file + "' id='" + tmpId + "'></video>");
    19 
    19 
    20            if (options.hasOwnProperty("width"))
    20            if (options.hasOwnProperty("width"))
    21              IriSP.jQuery("#" + containerDiv).css("width", options.width);
    21              IriSP.jQuery("#" + tmpId).css("width", options.width);
    22            
    22            
    23            if (options.hasOwnProperty("height"))
    23            if (options.hasOwnProperty("height"))
    24              IriSP.jQuery("#" + containerDiv).css("height", options.height);
    24              IriSP.jQuery("#" + tmpId).css("height", options.height);
    25 
    25 
    26            pop = Popcorn("#" + tmpId).mediafragment({start : 0});
    26            pop = Popcorn("#" + tmpId).mediafragment({start : 0});
    27         break;
    27         break;
    28         
    28         
    29       case "jwplayer":
    29       case "jwplayer":