From 4a4719b5874176907a5ee83221cd9fc17a7a55a5 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 4 Oct 2017 11:13:09 +0200 Subject: [PATCH] always show media controls on mobile devices --- js/reveal.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/reveal.js b/js/reveal.js index 88bf4ac6..eb9e45df 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3376,6 +3376,13 @@ _appendParamToIframeSource( 'src', 'player.vimeo.com/', 'api=1' ); _appendParamToIframeSource( 'data-src', 'player.vimeo.com/', 'api=1' ); + // Always show media controls on mobile devices + if( isMobileDevice ) { + toArray( dom.slides.querySelectorAll( 'video, audio' ) ).forEach( function( el ) { + el.controls = true; + } ); + } + } /**