From f5d870ad461b92ecaecfe08f28cff4a6fa91e9bd Mon Sep 17 00:00:00 2001 From: rwldrn Date: Thu, 2 Jun 2011 09:33:46 -0400 Subject: [PATCH] Adds new Popcorn instance member: trackRefs - object, Store track event object references by trackId --- popcorn.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/popcorn.js b/popcorn.js index 97d4e57..434ac92 100644 --- a/popcorn.js +++ b/popcorn.js @@ -161,6 +161,9 @@ // Store track event history data history: [], + // Store track event object references by trackId + trackRefs: {}, + // Playback track event queues trackEvents: { byStart: [{ @@ -632,7 +635,7 @@ var byStart = obj.data.trackEvents.byStart, byEnd = obj.data.trackEvents.byEnd, idx; - + for ( idx = byStart.length-1; idx >= 0; idx-- ) { if ( track.start >= byStart[idx].start ) { @@ -640,7 +643,7 @@ break; } } - + for ( idx = byEnd.length-1; idx >= 0; idx-- ) { if ( track.start >= byEnd[idx].start ) { @@ -648,7 +651,6 @@ break; } } - }; Popcorn.removeTrackEvent = function( obj, trackId ) { -- 2.43.0