瀏覽代碼

make sure stretch works with video

Hakim El Hattab 10 年之前
父節點
當前提交
0a021845df
共有 2 個文件被更改,包括 3 次插入3 次删除
  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