Permalink
Browse files

Smarter syncing behaviour

  • Loading branch information...
1 parent 7018ba6 commit 7d38fc20b8ce32d4df89b2922dfc22a781aa9354 @rwaldron committed Sep 15, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/mediagroup.js
View
@@ -29,9 +29,11 @@
function mediaGroupSync( controller, slaves ) {
- if ( slaves[ 0 ].currentTime !== controller.currentTime ) {
+ if ( slaves.length ) {
slaves.forEach(function( slave ) {
- slave.currentTime = controller.currentTime;
+ if ( slave.currentTime !== controller.currentTime ) {
+ slave.currentTime = controller.currentTime;
+ }
});
}

0 comments on commit 7d38fc2

Please sign in to comment.