From: rwldrn Date: Thu, 2 Jun 2011 13:33:46 +0000 (-0400) Subject: Adds new Popcorn instance member: trackRefs - object, Store track event object refere... X-Git-Tag: v0.7^2~53^2~3 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=f5d870ad461b92ecaecfe08f28cff4a6fa91e9bd;p=popcorn-js.git Adds new Popcorn instance member: trackRefs - object, Store track event object references by trackId --- 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 ) {