1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-31 03:11:11 +02:00

Fix capability detection for poster image

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.
This commit is contained in:
David LaPalomento 2013-12-05 11:15:10 -05:00
parent beb329ad71
commit 090bc0d12a

View File

@ -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', {