Skip to content

Commit

Permalink
feat: use bili volume normalization
Browse files Browse the repository at this point in the history
  • Loading branch information
lovegaoshi committed Dec 9, 2024
1 parent 1592ef5 commit 2bff451
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils/mediafetch/bilivideo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2bff451

Please sign in to comment.