]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#593] Fixes incorrect index dereferencing
authorrwldrn <waldron.rick@gmail.com>
Thu, 23 Jun 2011 17:53:31 +0000 (13:53 -0400)
committerrwldrn <waldron.rick@gmail.com>
Thu, 23 Jun 2011 17:53:31 +0000 (13:53 -0400)
popcorn.js

index a5968c19889c0f221a6ad0ce5e984b80c16e48c3..2d5c03604e69e09ad57ec2bddea0f87185fbc49d 100644 (file)
                 if ( !tracksByStart[ tracks.startIndex ]._natives || !!that[ tracksByStart[ tracks.startIndex ]._natives.type ] ) {
                   if ( tracksByStart[ tracks.startIndex ].end > currentTime && 
                         tracksByStart[ tracks.startIndex ]._running === false && 
-                          that.data.disabled.indexOf( tracksByStart[ tracks.endIndex ]._natives.type ) === -1 ) {
+                          that.data.disabled.indexOf( tracksByStart[ tracks.startIndex ]._natives.type ) === -1 ) {
                           
                     tracksByStart[ tracks.startIndex ]._running = true;
                     tracksByStart[ tracks.startIndex ]._natives.start.call( that, event, tracksByStart[ tracks.startIndex ] );
                 if ( !tracksByEnd[ tracks.endIndex ]._natives || !!that[ tracksByEnd[ tracks.endIndex ]._natives.type ] ) {
                   if ( tracksByEnd[ tracks.endIndex ].start <= currentTime && 
                         tracksByEnd[ tracks.endIndex ]._running === false  && 
-                          that.data.disabled.indexOf( tracksByStart[ tracks.endIndex ]._natives.type ) === -1 ) {
+                          that.data.disabled.indexOf( tracksByEnd[ tracks.endIndex ]._natives.type ) === -1 ) {
 
                     tracksByEnd[ tracks.endIndex ]._running = true;
                     tracksByEnd[ tracks.endIndex ]._natives.start.call( that, event, tracksByEnd[tracks.endIndex] );