Parcourir la source

make sure stretch works with video

Hakim El Hattab il y a 10 ans
Parent
commit
0a021845df
2 fichiers modifiés avec 3 ajouts et 3 suppressions
  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 );
 

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
js/reveal.min.js


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff