aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim@squarespace.com>2013-06-09 16:44:03 +0200
committerHakim El Hattab <hakim@squarespace.com>2013-06-09 16:44:03 +0200
commit033f3ab1699f2cb84a22b7b0c6dede3aec7c8ad6 (patch)
tree0e20a3aa6589f7afcc2060634159d34e73c8c26e /js
parentddfb130d1149e253027c4391220824f875cf7f92 (diff)
parentd3ebbf1be72dc1ea17c7c6e48f8c362feb4deb94 (diff)
downloadperl-software-in-gnu-guix-033f3ab1699f2cb84a22b7b0c6dede3aec7c8ad6.tar
perl-software-in-gnu-guix-033f3ab1699f2cb84a22b7b0c6dede3aec7c8ad6.tar.gz
merge fix for embedded media repeated autoplay
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 73eddeb..d236b84 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -1231,7 +1231,8 @@ var Reveal = (function(){
}
// Dispatch an event if the slide changed
- if( indexh !== indexhBefore || indexv !== indexvBefore ) {
+ var slideChanged = (indexh !== indexhBefore || indexv !== indexvBefore);
+ if( slideChanged ) {
dispatchEvent( 'slidechanged', {
'indexh': indexh,
'indexv': indexv,
@@ -1268,8 +1269,10 @@ var Reveal = (function(){
}
// Handle embedded content
- stopEmbeddedContent( previousSlide );
- startEmbeddedContent( currentSlide );
+ if (slideChanged) {
+ stopEmbeddedContent( previousSlide );
+ startEmbeddedContent( currentSlide );
+ }
updateControls();
updateProgress();