From 2bff4518045ecc06c3f7d07590367d840e9c0d41 Mon Sep 17 00:00:00 2001 From: lovegaoshi <106490582+lovegaoshi@users.noreply.github.com> Date: Mon, 9 Dec 2024 13:46:23 -0800 Subject: [PATCH] feat: use bili volume normalization --- src/utils/mediafetch/bilivideo.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/mediafetch/bilivideo.ts b/src/utils/mediafetch/bilivideo.ts index caf7b0eda..9841ea2fa 100644 --- a/src/utils/mediafetch/bilivideo.ts +++ b/src/utils/mediafetch/bilivideo.ts @@ -159,7 +159,10 @@ export const fetchVideoPlayUrlPromise = async ({ }, ); const json = await res.json(); - return { url: extractResponseJson(json, extractType) as string }; + return { + url: extractResponseJson(json, extractType) as string, + loudness: json.data?.volume?.measured_i, + }; } catch (e) { logger.error(`[resolveURL] error: ${e} of bvid:${bvid}, cid:${cid}`); throw e;