From 7daa0e04de7d0ab2bae3159faae0b18d4eb3c8d3 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 31 Jan 2017 16:24:06 +0100 Subject: [PATCH] make background videos work on ipad #1778 --- js/reveal.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/reveal.js b/js/reveal.js index 9b0768a..c2888e8 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3212,6 +3212,9 @@ else { el.removeEventListener( 'loadeddata', startEmbeddedMedia ); // remove first to avoid dupes el.addEventListener( 'loadeddata', startEmbeddedMedia ); + + // `loadeddata` never fires unless we start playing on iPad + if( /ipad/gi.test( UA ) ) el.play(); } }