Adjust video state clearing settings

What's strange is that this only occurs when you refresh odysee in between the plays. Might be a bug there.
This commit is contained in:
Thomas Zarebczan 2021-10-28 11:48:39 -04:00 committed by GitHub
parent 4b0a06cef7
commit a77e59cb53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,8 +71,8 @@ function FilePage(props: Props) {
const videoPlayedEnoughToResetPosition = React.useMemo(() => {
const durationInSecs =
fileInfo && fileInfo.metadata && fileInfo.metadata.video ? fileInfo.metadata.video.duration : 0;
const isVideoTooShort = durationInSecs <= 10;
const almostFinishedPlaying = position / durationInSecs >= 0.9;
const isVideoTooShort = durationInSecs <= 45;
const almostFinishedPlaying = position / durationInSecs >= 0.8;
return isVideoTooShort || almostFinishedPlaying;
}, [fileInfo, position]);