aboutsummaryrefslogtreecommitdiff
path: root/js/reveal.js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2013-08-19 23:46:29 -0400
committerHakim El Hattab <hakim.elhattab@gmail.com>2013-08-19 23:46:29 -0400
commit0a021845dfb28ff1547022d07a8576b8cfa94c5d (patch)
tree3d0d2e1417b2f7d3d785b42e6a44019af924606d /js/reveal.js
parent74a5fb949da8783f88e65b0dca1ae8e2108b893c (diff)
downloadfosdem-2018-presentation-0a021845dfb28ff1547022d07a8576b8cfa94c5d.tar
fosdem-2018-presentation-0a021845dfb28ff1547022d07a8576b8cfa94c5d.tar.gz
make sure stretch works with video
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 );