disable onPause for progress gt 95%

This commit is contained in:
Simon 2025-02-01 23:21:21 +07:00
parent a092744958
commit a7d11f53a8
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -346,7 +346,7 @@ const VideoPlayer = ({
onPause={async (videoTag: VideoTag) => { onPause={async (videoTag: VideoTag) => {
const currentTime = Number(videoTag.currentTarget.currentTime); const currentTime = Number(videoTag.currentTarget.currentTime);
if (currentTime < 10) return; if (currentTime < 10 || currentTime > duration * 0.95) return;
await updateVideoProgressById({ await updateVideoProgressById({
youtubeId: videoId, youtubeId: videoId,