aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorMarkku Roponen <markku.roponen@valve.fi>2016-12-12 16:30:07 +0200
committerMarkku Roponen <markku.roponen@valve.fi>2016-12-12 16:30:07 +0200
commit6831f6c17415c6c20269f3d61e673482442319b6 (patch)
treebb44a2acc9c80965e3e681d541b8d053da937bcc /js
parentd6406e433e94a6755bf8ef5214c71503aa1668e9 (diff)
downloadfreenode-live-2017-presentation-6831f6c17415c6c20269f3d61e673482442319b6.tar
freenode-live-2017-presentation-6831f6c17415c6c20269f3d61e673482442319b6.tar.gz
#1770, resume playback for paused media.
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 2c92954..9594255 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -3016,7 +3016,8 @@
// HTML5 media elements
toArray( slide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) {
- if( el.hasAttribute( 'data-autoplay' ) && typeof el.play === 'function' ) {
+ if( ( el.hasAttribute( 'data-autoplay' ) || el.hasAttribute( 'data-paused-by-reveal' ) ) && typeof el.play === 'function' ) {
+ el.removeAttribute('data-paused-by-reveal');
el.play();
}
} );
@@ -3071,6 +3072,7 @@
// HTML5 media elements
toArray( slide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) {
if( !el.hasAttribute( 'data-ignore' ) && typeof el.pause === 'function' ) {
+ el.addAttribute('data-paused-by-reveal');
el.pause();
}
} );