Skip to content

Commit

Permalink
Make setPlayerSize actually honour the supplied width and height. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyt committed Mar 1, 2012
1 parent 1c7de20 commit d0fb3f6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/js/mep-player.js
Expand Up @@ -693,8 +693,13 @@

setPlayerSize: function(width,height) {
var t = this;

// testing for 100% code

t.width = width;
t.height = height;

// XXX: Dirty hack:
// If there is a % char in the supplied height value, set size to
// 100% of parent container.
if (t.height.toString().indexOf('%') > 0) {

// do we have the native dimensions yet?
Expand Down Expand Up @@ -970,7 +975,7 @@
},
changeSkin: function(className) {
this.container[0].className = 'mejs-container ' + className;
this.setPlayerSize();
this.setPlayerSize(this.width, this.height);
this.setControlsSize();
},
play: function() {
Expand Down

0 comments on commit d0fb3f6

Please sign in to comment.