From: ScottDowne Date: Tue, 17 May 2011 19:30:53 +0000 (-0400) Subject: [#421] removed getStyle from vimeo X-Git-Tag: v0.6~10^2~1 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=0565e9f34a8b4c36bc8c7e481d758a178e45b33c;p=popcorn-js.git [#421] removed getStyle from vimeo --- diff --git a/players/vimeo/popcorn.vimeo.html b/players/vimeo/popcorn.vimeo.html index a55c36f..781fe7d 100644 --- a/players/vimeo/popcorn.vimeo.html +++ b/players/vimeo/popcorn.vimeo.html @@ -246,4 +246,4 @@
- \ No newline at end of file + diff --git a/players/vimeo/popcorn.vimeo.js b/players/vimeo/popcorn.vimeo.js index 012f309..0007c8c 100644 --- a/players/vimeo/popcorn.vimeo.js +++ b/players/vimeo/popcorn.vimeo.js @@ -229,11 +229,6 @@ var matches = url.match( rWebUrl ); return matches ? matches[0].substr(10) : ""; } - - // Gets the style for the given element - function getStyle( elem, styleProp ) { - return elem.style[styleProp]; - } function makeSwf( self, vidId, containerId ) { if ( !window.swfobject ) { @@ -305,9 +300,9 @@ this.evtHolder = new EventManager( this ); // For calculating position relative to video (like subtitles) - this.width = options.width || getStyle( this._target, "width" ) || "504px"; - this.height = options.height || getStyle( this._target, "height" ) || "340px"; - + this.width = options.width || this._target.style.width || "504px"; + this.height = options.height || this._target.style.height || "340px"; + if ( !/[\d]%/.test( this.width ) ) { this.offsetWidth = parseInt( this.width, 10 ); this._target.style.width = this.width + "px";