Skip to content

Commit

Permalink
Fix capability detection for poster image
Browse files Browse the repository at this point in the history
We were checking if `backgroundSize` was present on the video element, not the style property of the video element. That meant the IE fallback was being used on all platforms and breaks aspect-ratio preserving poster scaling for those browsers that support it.
  • Loading branch information
dmlap committed Dec 5, 2013
1 parent beb329a commit 090bc0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/poster.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ vjs.PosterImage = vjs.Button.extend({
});

// use the test el to check for backgroundSize style support
var _backgroundSizeSupported = 'backgroundSize' in vjs.TEST_VID;
var _backgroundSizeSupported = 'backgroundSize' in vjs.TEST_VID.style;

vjs.PosterImage.prototype.createEl = function(){
var el = vjs.createEl('div', {
Expand Down

0 comments on commit 090bc0d

Please sign in to comment.