diff options
| author | Factiven <[email protected]> | 2023-04-17 23:20:32 +0700 |
|---|---|---|
| committer | Factiven <[email protected]> | 2023-04-17 23:20:32 +0700 |
| commit | 47a18c5e0da56d1c98a7e367dddfb0b0fc71b7fa (patch) | |
| tree | 2ee854abd7522f53e9c143dff77a54f7445d087e /components | |
| parent | 7th fixes (diff) | |
| download | moopa-47a18c5e0da56d1c98a7e367dddfb0b0fc71b7fa.tar.xz moopa-47a18c5e0da56d1c98a7e367dddfb0b0fc71b7fa.zip | |
8th fixes
Diffstat (limited to 'components')
| -rw-r--r-- | components/videoPlayer.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/components/videoPlayer.js b/components/videoPlayer.js index 5d35874..b5f8412 100644 --- a/components/videoPlayer.js +++ b/components/videoPlayer.js @@ -83,16 +83,18 @@ export default function VideoPlayer({ } }); - art.on("destroy", () => { + art.on("video:timeupdate", () => { const currentTime = art.currentTime; const duration = art.duration; const percentage = currentTime / duration; + // console.log(percentage); + if (percentage >= 0.9) { // use >= instead of > markProgress(aniId, progress, stats); - } else { - return; + art.off("video:timeupdate"); + console.log("Video progress marked"); } }); |