activated youtube support.
--- a/src/js/init.js Fri Nov 04 16:30:22 2011 +0100
+++ b/src/js/init.js Mon Nov 07 15:27:12 2011 +0100
@@ -23,6 +23,19 @@
delete opts.container;
pop = Popcorn.jwplayer("#" + containerDiv, "", opts);
break;
+
+ case "youtube":
+ var opts = IriSP.jQuery.extend({}, options);
+ delete opts.container;
+ opts.controls = 0;
+ opts.autostart = false;
+ templ = "width: {{width}}px; height: {{height}}px; margin-bottom: 5px;";
+ var str = Mustache.to_html(templ, {width: opts.width, height: opts.height});
+ // Popcorn.youtube wants us to specify the size of the player in the style attribute of its container div.
+ IriSP.jQuery("#" + containerDiv).attr("style", str);
+
+ pop = Popcorn.youtube("#" + containerDiv, opts.video, opts);
+ break;
default:
pop = undefined;