diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2017-02-14 14:51:14 +0100 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2017-02-14 14:51:43 +0100 |
commit | 313a23ba2bc60bffcc9cf51bf456dd15afe4d566 (patch) | |
tree | bf80b7a8320937d8d547d452b2c15d7ea644013e /js | |
parent | 909efab7dfa21374f5932b97de234b102b0e721e (diff) | |
parent | 962c6c133b0860b5ad4d99d9fb36eca625de5b7a (diff) | |
download | perl-software-in-gnu-guix-313a23ba2bc60bffcc9cf51bf456dd15afe4d566.tar perl-software-in-gnu-guix-313a23ba2bc60bffcc9cf51bf456dd15afe4d566.tar.gz |
merge autoplay conflict #1771
Diffstat (limited to 'js')
-rw-r--r-- | js/reveal.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/js/reveal.js b/js/reveal.js index 882149e..d31d591 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3228,10 +3228,14 @@ } // Autoplay is always on for slide backgrounds - var autoplay = el.hasAttribute( 'data-autoplay' ) || !!closestParent( el, '.slide-background' ); + var autoplay = el.hasAttribute( 'data-autoplay' ) || + el.hasAttribute( 'data-paused-by-reveal' ) || + !!closestParent( el, '.slide-background' ); if( autoplay && typeof el.play === 'function' ) { + el.removeAttribute( 'data-paused-by-reveal' ); + if( el.readyState > 1 ) { startEmbeddedMedia( { target: el } ); } @@ -3344,6 +3348,7 @@ // HTML5 media elements toArray( element.querySelectorAll( 'video, audio' ) ).forEach( function( el ) { if( !el.hasAttribute( 'data-ignore' ) && typeof el.pause === 'function' ) { + el.setAttribute('data-paused-by-reveal', ''); el.pause(); } } ); |