feat: support lyrics (finnaly)

This commit is contained in:
qier222 2021-01-06 20:53:47 +08:00
parent cef149e68c
commit 6366886fe8
9 changed files with 593 additions and 4 deletions

View file

@ -208,3 +208,10 @@ export function bytesToSize(bytes) {
return (bytes / megaBytes).toFixed(decimal) + " MB";
else return (bytes / gigaBytes).toFixed(decimal) + " GB";
}
export function formatTrackTime(value) {
if (!value) return "";
let min = ~~((value / 60) % 60);
let sec = (~~(value % 60)).toString().padStart(2, "0");
return `${min}:${sec}`;
}