test ignore

This commit is contained in:
Ashley 2023-12-08 18:27:57 +00:00
parent 4f181670bb
commit fb935907e7

View file

@ -1801,16 +1801,7 @@ const draw = () => {
// Adjust the frame rate by changing the interval // Adjust the frame rate by changing the interval
const frameRate = 4; // Set the desired frame rate in milliseconds const frameRate = 4; // Set the desired frame rate in milliseconds
const drawLoopWithInterval = () => {
const now = performance.now();
if (!lastDraw || now - lastDraw >= frameRate) {
draw();
lastDraw = now;
}
step = window.requestAnimationFrame(drawLoopWithInterval);
};
const drawLoop = () => { const drawLoop = () => {
draw() draw()
@ -1828,7 +1819,9 @@ const drawPause = () => {
const init = () => { const init = () => {
AMvideo.addEventListener("loadeddata", drawLoop, false) AMvideo.addEventListener("loadeddata", drawLoop, false)
AMvideo.addEventListener("seeked", draw, false) AMvideo.addEventListener("seeked", draw, false)
AMvideo.addEventListener("play", drawLoopWithInterval, false); setInterval(function() {
AMvideo.addEventListener("play", drawLoop, false);
}, 50);
AMvideo.addEventListener("pause", drawPause, false) AMvideo.addEventListener("pause", drawPause, false)
AMvideo.addEventListener("ended", drawPause, false) AMvideo.addEventListener("ended", drawPause, false)
} }