fix(player): reduce average CPU usage from 100% to 20%
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2346>
This commit is contained in:
parent
1b15e955dd
commit
d6ea66e519
|
@ -179,7 +179,9 @@ export const usePlayer = createGlobalState(() => {
|
|||
? progress
|
||||
: 0
|
||||
|
||||
document.documentElement.style.setProperty('--fw-track-progress', `${lastProgress}%`)
|
||||
for (const bar of document.querySelectorAll<HTMLElement>('.ui.progress .position.bar')) {
|
||||
bar.style.setProperty('--fw-track-progress', `${lastProgress}%`)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue