Skip to content

Commit

Permalink
fix: correctly reset deferred seeked
Browse files Browse the repository at this point in the history
  • Loading branch information
martinstark committed Sep 17, 2024
1 parent 800f75b commit 349ebd0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/media-event-filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,15 @@ export const getMediaEventFilter = ({
return;
}

state = {
...state,
seeking: false,
deferSeekedEvent: false,
};

// if seeking within buffer, allow seeked to trigger
// otherwise wait for canplaythrough.
if (mediaElement.readyState === HTMLMediaElement.HAVE_ENOUGH_DATA) {
state = {
...state,
seeking: false,
deferSeekedEvent: false,
};

callback(FilteredMediaEvent.SEEKED);
}
};
Expand Down

0 comments on commit 349ebd0

Please sign in to comment.