# HG changeset patch # User hamidouk # Date 1320676032 -3600 # Node ID 8ffb1b7a9c6b66ceab177b1f666cfe0db9b39e85 # Parent a793a8a0c9d2d6871cfd0d740e634ed2f93ede5b activated youtube support. diff -r a793a8a0c9d2 -r 8ffb1b7a9c6b src/js/init.js --- 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;