mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 05:38:04 +00:00
fix(player): 修复歌曲时长过长时的进度显示问题 (#1936)
原先进度条遇到时长超过 1hr 的歌曲, 不会呈现小时数的部分。这个 commit 将歌曲时长小时数加到分钟数中。
This commit is contained in:
parent
65f5df8a60
commit
b7f7ac8d31
2 changed files with 3 additions and 5 deletions
|
|
@ -221,7 +221,7 @@ export function bytesToSize(bytes) {
|
|||
|
||||
export function formatTrackTime(value) {
|
||||
if (!value) return '';
|
||||
let min = ~~((value / 60) % 60);
|
||||
let min = ~~(value / 60);
|
||||
let sec = (~~(value % 60)).toString().padStart(2, '0');
|
||||
return `${min}:${sec}`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue