var currentTime = obj.media.currentTime,
previousTime = obj.data.trackEvents.previousUpdateTime,
tracks = obj.data.trackEvents,
- tracksBy = {
- start: tracks.byStart,
- end: tracks.byEnd
- },
-
end = tracks.endIndex,
start = tracks.startIndex,
// Playbar advancing
if ( previousTime < currentTime ) {
- while ( tracksBy.end[ end ] && tracksBy.end[ end ].end <= currentTime ) {
+ while ( tracks.byEnd[ end ] && tracks.byEnd[ end ].end <= currentTime ) {
- byEnd = tracksBy.end[ end ];
- natives = byEnd._natives;
+ byEnd = tracks.byEnd[ end ];
+ natives = byEnd._natives;
type = natives && natives.type;
// If plugin does not exist on this instance, remove it
}
}
- while ( tracksBy.start[ start ] && tracksBy.start[ start ].start <= currentTime ) {
+ while ( tracks.byStart[ start ] && tracks.byStart[ start ].start <= currentTime ) {
- byStart = tracksBy.start[ start ];
+ byStart = tracks.byStart[ start ];
natives = byStart._natives;
type = natives && natives.type;
// Playbar receding
} else if ( previousTime > currentTime ) {
- while ( tracksBy.start[ start ] && tracksBy.start[ start ].start > currentTime ) {
+ while ( tracks.byStart[ start ] && tracks.byStart[ start ].start > currentTime ) {
- byStart = tracksBy.start[ start ];
+ byStart = tracks.byStart[ start ];
natives = byStart._natives;
type = natives && natives.type;
}
}
- while ( tracksBy.end[ end ] && tracksBy.end[ end ].end > currentTime ) {
+ while ( tracks.byEnd[ end ] && tracks.byEnd[ end ].end > currentTime ) {
- byEnd = tracksBy.end[ end ];
+ byEnd = tracks.byEnd[ end ];
natives = byEnd._natives;
type = natives && natives.type;