Skip to content

Commit

Permalink
fix: seeking when preload is none
Browse files Browse the repository at this point in the history
  • Loading branch information
luwes committed Oct 4, 2024
1 parent e913e7d commit 25fe3fc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/js/media-store/state-mediator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,7 @@ export const stateMediator: StateMediator = {
},
set(value, stateOwners) {
const { media } = stateOwners;
// If the media supports readyState and it's not ready, don't set currentTime
if (!media || media.readyState === 0) return;
if (!media) return;
media.currentTime = value;
},
mediaEvents: ['timeupdate', 'loadedmetadata'],
Expand Down

0 comments on commit 25fe3fc

Please sign in to comment.