src/js/init.js
branchlab-port
changeset 500 a784e70993b3
parent 461 a9c5eeca190c
child 531 e7f27746668e
equal deleted inserted replaced
499:0a09ff3db7c2 500:a784e70993b3
    28              IriSP.jQuery("#" + containerDiv).css("width", options.width);
    28              IriSP.jQuery("#" + containerDiv).css("width", options.width);
    29            
    29            
    30            if (options.hasOwnProperty("height"))
    30            if (options.hasOwnProperty("height"))
    31              IriSP.jQuery("#" + containerDiv).css("height", options.height);
    31              IriSP.jQuery("#" + containerDiv).css("height", options.height);
    32 
    32 
    33            pop = Popcorn("#" + tmpId).mediafragment({start : 0});
    33            pop = Popcorn("#" + tmpId);
    34         break;
    34         break;
    35         
    35         
    36       case "jwplayer":
    36       case "jwplayer":
    37           var opts = IriSP.jQuery.extend({}, options);
    37           var opts = IriSP.jQuery.extend({}, options);
    38           delete opts.container;
    38           delete opts.container;
    67           templ = "width: {{width}}px; height: {{height}}px;";
    67           templ = "width: {{width}}px; height: {{height}}px;";
    68           var str = Mustache.to_html(templ, {width: opts.width, height: opts.height});    
    68           var str = Mustache.to_html(templ, {width: opts.width, height: opts.height});    
    69           // Popcorn.youtube wants us to specify the size of the player in the style attribute of its container div.
    69           // Popcorn.youtube wants us to specify the size of the player in the style attribute of its container div.
    70           IriSP.jQuery("#" + containerDiv).attr("style", str);
    70           IriSP.jQuery("#" + containerDiv).attr("style", str);
    71           
    71           
    72           pop = Popcorn.youtube("#" + containerDiv, opts.video, opts).mediafragment({start : 0});
    72           pop = Popcorn.youtube("#" + containerDiv, opts.video, opts);
    73         break;
    73         break;
    74         
    74         
    75       default:
    75       default:
    76         pop = undefined;
    76         pop = undefined;
    77     };
    77     };