aboutsummaryrefslogtreecommitdiff
path: root/js/reveal.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/reveal.js')
-rw-r--r--js/reveal.js4
1 files changed, 2 insertions, 2 deletions
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 );