src/js/init.js
branchnih-youtube
changeset 756 f971fb0f2a3e
parent 743 69a9969daa41
child 757 43e261bcd4ce
equal deleted inserted replaced
755:d60401f66984 756:f971fb0f2a3e
   104           delete opts.container;
   104           delete opts.container;
   105           opts.controls = 0;
   105           opts.controls = 0;
   106           opts.autostart = false;
   106           opts.autostart = false;
   107           templ = "width: {{width}}px; height: {{height}}px;";
   107           templ = "width: {{width}}px; height: {{height}}px;";
   108           var str = Mustache.to_html(templ, {width: opts.width, height: opts.height});    
   108           var str = Mustache.to_html(templ, {width: opts.width, height: opts.height});    
   109           // Popcorn.youtube wants us to specify the size of the player in the style attribute of its container div.
       
   110           IriSP.jQuery("#" + containerDiv).attr("style", str);
       
   111           
   109           
   112           pop = Popcorn.youtube("#" + containerDiv, opts.video, opts);
   110           //pop = Popcorn.youtube("#" + containerDiv, opts.video, opts);
       
   111           pop = new IriSP.PopcornReplacement.youtube(containerDiv, opts);
   113         break;
   112         break;
   114         
   113         
   115       case "allocine":
   114       case "allocine":
   116           /* pass the options as-is to the allocine player and let it handle everything */
   115           /* pass the options as-is to the allocine player and let it handle everything */
   117           pop = new IriSP.PopcornReplacement.allocine("#" + containerDiv, options);
   116           pop = new IriSP.PopcornReplacement.allocine("#" + containerDiv, options);