From 090bc0d12a4cf00a44d79ff31b5ec71810d371c5 Mon Sep 17 00:00:00 2001 From: David LaPalomento Date: Thu, 5 Dec 2013 11:15:10 -0500 Subject: [PATCH] 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. --- src/js/poster.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/poster.js b/src/js/poster.js index ffc934952..bdec39020 100644 --- a/src/js/poster.js +++ b/src/js/poster.js @@ -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', {