diff --git a/public/app.js b/public/app.js index e4bbf7b..5525781 100644 --- a/public/app.js +++ b/public/app.js @@ -657,7 +657,7 @@ function trimPendingFrameQueue() { const overflow = state.pendingFrames.length - maxQueuedFrames; if (overflow > 0) { - state.pendingFrames.splice(0, overflow); + state.pendingFrames.splice(maxQueuedFrames, overflow); } } @@ -671,7 +671,7 @@ function trimFrameQueue() { return; } - const removed = state.frames.splice(0, overflow); + const removed = state.frames.splice(maxQueuedFrames, overflow); for (const frame of removed) { releaseImage(frame.bitmap);