From: ScottDowne Date: Tue, 27 Sep 2011 20:28:37 +0000 (-0400) Subject: [#423] whitespace fixes X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=8bb4e4c0f94c9e7aa4d6a914cebd21a6d366ddcd;p=popcorn-js.git [#423] whitespace fixes --- diff --git a/players/youtube/popcorn.youtube.js b/players/youtube/popcorn.youtube.js index d74d370..7b70080 100755 --- a/players/youtube/popcorn.youtube.js +++ b/players/youtube/popcorn.youtube.js @@ -194,7 +194,7 @@ Popcorn.player( "youtube", { media.paused && media.dispatchEvent( 'loadeddata' ); }; - options.controls = +options.controls === 0 || +options.controls === 1 ? options.controls : 1; + options.controls = +options.controls === 0 || +options.controls === 1 ? options.controls : 1; options.annotations = +options.annotations === 1 || +options.annotations === 3 ? options.annotations : 1; flashvars = { @@ -214,7 +214,7 @@ Popcorn.player( "youtube", { src = /^.*[\/=](.{11})/.exec( media.src )[ 1 ]; - swfobject.embedSWF( "http://www.youtube.com/e/" + src + "?enablejsapi=1&playerapiid=" + container.id + "&version=3", + swfobject.embedSWF( "http://www.youtube.com/e/" + src + "?enablejsapi=1&playerapiid=" + container.id + "&version=3", container.id, media.offsetWidth, media.offsetHeight, "8", null, flashvars, params, attributes ); }; diff --git a/popcorn.js b/popcorn.js index 39f6c21..dcee995 100644 --- a/popcorn.js +++ b/popcorn.js @@ -1584,11 +1584,11 @@ events[ evtName ] = []; } - + events[ evtName ].push( fn ); return fn; }; - + // Can take event object or simple string basePlayer.dispatchEvent = function( oEvent ) { @@ -1596,20 +1596,20 @@ self = this, eventInterface, eventName = oEvent.type; - + // A string was passed, create event object if ( !eventName ) { eventName = oEvent; eventInterface = Popcorn.events.getInterface( eventName ); - + if ( eventInterface ) { evt = document.createEvent( eventInterface ); evt.initEvent( eventName, true, true, window, 1 ); } } - + Popcorn.forEach( events[ eventName ], function( val ) { val.call( self, evt, self );