From: Christopher De Cairos Date: Wed, 8 Jun 2011 20:48:39 +0000 (-0400) Subject: you can now toggle controls, and annotations X-Git-Tag: v0.7^2~33^2~4 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=c19a0da9a8d5407c84fab4235001b017097b7a10;p=popcorn-js.git you can now toggle controls, and annotations --- diff --git a/players/youtube/popcorn.youtube.js b/players/youtube/popcorn.youtube.js index f42e09c..d0c5e12 100644 --- a/players/youtube/popcorn.youtube.js +++ b/players/youtube/popcorn.youtube.js @@ -120,22 +120,24 @@ var onYouTubePlayerReady; this.offsetParent = container.offsetParent; flashvars = { - playerapiid: this.playerId + playerapiid: this.playerId, + controls: this.controls, + iv_load_policy: this.iv_load_policy }; + params = { allowscriptaccess: 'always', allowfullscreen: 'true', // This is so we can overlay html on top of Flash wmode: 'transparent' + }; attributes = { - id: this.playerId + id: this.player }; - - console.log ("http://www.youtube.com/e/" + this.vidId +"?enablejsapi=1&playerapiid=" + this.playerId + "&controls=" + this.controls + "&iv_load_policy=" + this.iv_load_policy + "&version=3"); - swfobject.embedSWF( "http://www.youtube.com/e/" + this.vidId +"?enablejsapi=1&playerapiid=" + this.playerId + "&controls=" + this.controls + "&iv_load_policy=" + this.iv_load_policy + "&version=3", + swfobject.embedSWF( "http://www.youtube.com/e/" + this.vidId +"?enablejsapi=1&playerapiid=" + this.playerId + "&version=3", this.playerId, this.width, this.height, "8", null, flashvars, params, attributes ); } @@ -183,7 +185,7 @@ var onYouTubePlayerReady; options.height = options.height && (+options.height)+"px"; // show controls on video. Integer value - 1 is for show, 0 is for hide - this.controls = +options.controls === 1 || +options.controls === 2 ? options.controls : 1; + this.controls = +options.controls === 0 || +options.controls === 1 ? options.controls : 1; // show video annotations, 1 is show, 3 is hide this.iv_load_policy = +options.annotations === 1 || +options.annotations === 3 ? options.annotations : 1;