src/js/init.js
branchpopcorn-port
changeset 198 8ffb1b7a9c6b
parent 175 b0cb7132accb
child 204 a5e807f33a67
equal deleted inserted replaced
197:a793a8a0c9d2 198:8ffb1b7a9c6b
    20         
    20         
    21       case "jwplayer":
    21       case "jwplayer":
    22           var opts = IriSP.jQuery.extend({}, options);
    22           var opts = IriSP.jQuery.extend({}, options);
    23           delete opts.container;
    23           delete opts.container;
    24           pop = Popcorn.jwplayer("#" + containerDiv, "", opts);
    24           pop = Popcorn.jwplayer("#" + containerDiv, "", opts);
       
    25         break;
       
    26       
       
    27       case "youtube":
       
    28           var opts = IriSP.jQuery.extend({}, options);
       
    29           delete opts.container;
       
    30           opts.controls = 0;
       
    31           opts.autostart = false;
       
    32           templ = "width: {{width}}px; height: {{height}}px; margin-bottom: 5px;";
       
    33           var str = Mustache.to_html(templ, {width: opts.width, height: opts.height});    
       
    34           // Popcorn.youtube wants us to specify the size of the player in the style attribute of its container div.
       
    35           IriSP.jQuery("#" + containerDiv).attr("style", str);
       
    36           
       
    37           pop = Popcorn.youtube("#" + containerDiv, opts.video, opts);
    25         break;
    38         break;
    26         
    39         
    27       default:
    40       default:
    28         pop = undefined;
    41         pop = undefined;
    29     };
    42     };