This commit is contained in:
Ashley 2023-12-08 20:17:17 +00:00
parent c0cadded4c
commit 6b9ac260be

View file

@ -1806,12 +1806,16 @@ const drawPause = () => {
step = undefined step = undefined
} }
const init = () => { const init = () => {
AMvideo.addEventListener("canplaythrough", draw, false); video.pause();video.play();
AMvideo.addEventListener("play", drawLoop, false); AMvideo.addEventListener("loadeddata", draw, false)
AMvideo.addEventListener("pause", drawPause, false); AMvideo.addEventListener("seeked", draw, false)
AMvideo.addEventListener("ended", drawPause, false); AMvideo.addEventListener("play", drawLoop, false)
}; AMvideo.addEventListener("pause", drawPause, false)
AMvideo.addEventListener("ended", drawPause, false)
}
const cleanup = () => { const cleanup = () => {
AMvideo.removeEventListener("loadeddata", draw) AMvideo.removeEventListener("loadeddata", draw)