aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorADAM STONE <astone13@students.towson.edu>2017-03-17 22:47:25 -0400
committerADAM STONE <astone13@students.towson.edu>2017-03-17 22:47:25 -0400
commitd9dd9a92fb5fde644847eb839a3c37ff1860da07 (patch)
treedca3d361591e7d2b2786af7e3e5a1f758ef5f504 /js
parenta349ff43c58c23f9c837b8ea9b5fc7d4761b8de3 (diff)
downloadperl-software-in-gnu-guix-d9dd9a92fb5fde644847eb839a3c37ff1860da07.tar
perl-software-in-gnu-guix-d9dd9a92fb5fde644847eb839a3c37ff1860da07.tar.gz
Fix video background autoplay on iOS
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 9251dc0..43c599c 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -1426,7 +1426,7 @@
* target element.
*
* remaining height = [ configured parent height ] - [ current parent height ]
- *
+ *
* @param {HTMLElement} element
* @param {number} [height]
*/
@@ -3058,6 +3058,8 @@
// Videos
else if ( backgroundVideo && !isSpeakerNotes() ) {
var video = document.createElement( 'video' );
+ video.setAttribute( 'autoplay', '' );
+ video.setAttribute( 'playsinline', '' );
if( backgroundVideoLoop ) {
video.setAttribute( 'loop', '' );
@@ -3900,7 +3902,7 @@
// If there are media elements with data-autoplay,
// automatically set the autoSlide duration to the
// length of that media. Not applicable if the slide
- // is divided up into fragments.
+ // is divided up into fragments.
// playbackRate is accounted for in the duration.
if( currentSlide.querySelectorAll( '.fragment' ).length === 0 ) {
toArray( currentSlide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) {