From 832f745edb48f3d28c61676c54a508cda93c188a Mon Sep 17 00:00:00 2001 From: ScottDowne Date: Tue, 17 May 2011 20:13:00 -0400 Subject: [PATCH] [#421] apply css property in options --- players/vimeo/popcorn.vimeo.html | 6 ++++-- players/vimeo/popcorn.vimeo.js | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/players/vimeo/popcorn.vimeo.html b/players/vimeo/popcorn.vimeo.html index 781fe7d..6c0bea8 100644 --- a/players/vimeo/popcorn.vimeo.html +++ b/players/vimeo/popcorn.vimeo.html @@ -102,8 +102,10 @@ //On document ready document.addEventListener( "DOMContentLoaded", function() { var player = Popcorn( Popcorn.vimeo( "player_1", "http://player.vimeo.com/video/11127501", { - width: 500, - height: 281 + css: { + width: "500px", + height: "281px" + } }) ) .footnote({ start: 5, // seconds diff --git a/players/vimeo/popcorn.vimeo.js b/players/vimeo/popcorn.vimeo.js index 0007c8c..2bc2e19 100644 --- a/players/vimeo/popcorn.vimeo.js +++ b/players/vimeo/popcorn.vimeo.js @@ -282,6 +282,8 @@ this._target.appendChild( this._container ); options = options || {}; + + options.css && Popcorn.extend( this._target.style, options.css ); this.addEventFn; this.evtHolder; @@ -300,8 +302,8 @@ this.evtHolder = new EventManager( this ); // For calculating position relative to video (like subtitles) - this.width = options.width || this._target.style.width || "504px"; - this.height = options.height || this._target.style.height || "340px"; + this.width = this._target.style.width || "504px"; + this.height = this._target.style.height || "340px"; if ( !/[\d]%/.test( this.width ) ) { this.offsetWidth = parseInt( this.width, 10 ); -- 2.43.0