From 0a021845dfb28ff1547022d07a8576b8cfa94c5d Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 19 Aug 2013 23:46:29 -0400 Subject: make sure stretch works with video --- js/reveal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/reveal.js') diff --git a/js/reveal.js b/js/reveal.js index 46da532..e7860ff 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1081,8 +1081,8 @@ var Reveal = (function(){ // Consider the aspect ratio of media elements if( /(img|video)/gi.test( element.nodeName ) ) { - var nw = element.naturalWidth, - nh = element.naturalHeight; + var nw = element.naturalWidth || element.videoWidth, + nh = element.naturalHeight || element.videoHeight; var es = Math.min( width / nw, remainingHeight / nh ); -- cgit v1.2.3