Skip to content

Commit

Permalink
Prevent seek video before 0 seconds and after video duration. Fix #328
Browse files Browse the repository at this point in the history
  • Loading branch information
ferserc1 committed Sep 27, 2023
1 parent 6981bf9 commit df65f7a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/js/core/StreamProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,14 @@ export default class SteramProvider extends PlayerResource {
}

async setCurrentTime(t) {
const duration = await this.duration();
if (t < 0) {
t = 0;
}
else if (t > duration) {
t = duration;
}

This comment has been minimized.

Copy link
@karendolan

karendolan Sep 27, 2023

Contributor

formatting :D

const prevTime = (await this.executeAction("currentTime"))[0];
let returnValue = null;

Expand Down

0 comments on commit df65f7a

Please sign in to comment.