Browse Source

merge fix for embedded media repeated autoplay

Hakim El Hattab 11 years ago
parent
commit
033f3ab169
2 changed files with 6 additions and 3 deletions
  1. 0 0
      README.md
  2. 6 3
      js/reveal.js

File diff suppressed because it is too large
+ 0 - 0
README.md


+ 6 - 3
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();

Some files were not shown because too many files changed in this diff