Browse Source

make sure stretch works with video

Hakim El Hattab 10 years ago
parent
commit
0a021845df
2 changed files with 3 additions and 3 deletions
  1. 2 2
      js/reveal.js
  2. 1 1
      js/reveal.min.js

+ 2 - 2
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 );
 

File diff suppressed because it is too large
+ 1 - 1
js/reveal.min.js


Some files were not shown because too many files changed in this diff