summaryrefslogtreecommitdiffhomepage
path: root/js/reveal.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/reveal.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();