From 1e0b705ba60b8a434daa8f606ed5fd7cb042875b Mon Sep 17 00:00:00 2001 From: daizhoufeng Date: Wed, 6 Dec 2023 20:49:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E9=9D=9E=E7=B2=BE?= =?UTF-8?q?=E5=87=86=E6=A8=A1=E5=BC=8F=E4=B8=8B=EF=BC=8Cfps25=E6=97=B6?= =?UTF-8?q?=E5=8A=A8=E7=94=BB=E6=97=A0=E6=B3=95=E6=92=AD=E6=94=BE=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/video.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/video.ts b/web/src/video.ts index 11262ead..0b97b4fd 100644 --- a/web/src/video.ts +++ b/web/src/video.ts @@ -194,7 +194,8 @@ export default class VapVideo { return (cb) => { index++; return requestAnimationFrame(() => { - if (!(index % (60 / fps))) { + // 取整,否则当结果是小数时,一直都是false + if (!(index % (60 / fps) >> 0)) { return cb(); } this.animId = this.requestAnim(cb);