From 3f1fbe11aeb772876db9b18c78bd4f9a28cf36d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=BA=9A=E7=90=AA?= Date: Thu, 30 May 2024 13:29:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DgetVideoInfo=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E7=9A=84size=E5=8D=95=E4=BD=8D=E4=B8=8D=E4=B8=BAKB?= =?UTF-8?q?=E7=9A=84Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/platforms/h5/service/api/media/get-video-info.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/h5/service/api/media/get-video-info.js b/src/platforms/h5/service/api/media/get-video-info.js index 63f39800d3..75ca8d0bb0 100644 --- a/src/platforms/h5/service/api/media/get-video-info.js +++ b/src/platforms/h5/service/api/media/get-video-info.js @@ -32,7 +32,7 @@ export function getVideoInfo ({ clearTimeout(handle) video.onerror = null invoke(callbackId, Object.assign(result, { - size: file.size, + size: Math.ceil((file ? file.size : 0) / 1024), duration: video.duration || 0, width: video.videoWidth || 0, height: video.videoHeight || 0, -- GitLab