From 6b9ac260be3d5fc335aedccb7f2abc7e3bf7552e Mon Sep 17 00:00:00 2001 From: Ashley Date: Fri, 8 Dec 2023 20:17:17 +0000 Subject: [PATCH] yeah --- html/poketube.ejs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/html/poketube.ejs b/html/poketube.ejs index 03f4bbb3..724a387a 100644 --- a/html/poketube.ejs +++ b/html/poketube.ejs @@ -1806,12 +1806,16 @@ const drawPause = () => { step = undefined } + const init = () => { - AMvideo.addEventListener("canplaythrough", draw, false); - AMvideo.addEventListener("play", drawLoop, false); - AMvideo.addEventListener("pause", drawPause, false); - AMvideo.addEventListener("ended", drawPause, false); - }; + video.pause();video.play(); + AMvideo.addEventListener("loadeddata", draw, false) + AMvideo.addEventListener("seeked", draw, false) + AMvideo.addEventListener("play", drawLoop, false) + AMvideo.addEventListener("pause", drawPause, false) + AMvideo.addEventListener("ended", drawPause, false) +} + const cleanup = () => { AMvideo.removeEventListener("loadeddata", draw)