Added await to player.toggleRepeat
This commit is contained in:
parent
893138e15b
commit
b40fc4617e
1 changed files with 1 additions and 1 deletions
|
|
@ -585,7 +585,7 @@ export function initializePlayerEvents(player, audioPlayer, scrobbler, ui) {
|
||||||
|
|
||||||
repeatBtn.addEventListener('click', async () => {
|
repeatBtn.addEventListener('click', async () => {
|
||||||
await hapticLight();
|
await hapticLight();
|
||||||
const mode = player.toggleRepeat();
|
const mode = await player.toggleRepeat();
|
||||||
trackToggleRepeat(mode === REPEAT_MODE.OFF ? 'off' : mode === REPEAT_MODE.ALL ? 'all' : 'one');
|
trackToggleRepeat(mode === REPEAT_MODE.OFF ? 'off' : mode === REPEAT_MODE.ALL ? 'all' : 'one');
|
||||||
repeatBtn.classList.toggle('active', mode !== REPEAT_MODE.OFF);
|
repeatBtn.classList.toggle('active', mode !== REPEAT_MODE.OFF);
|
||||||
repeatBtn.classList.toggle('repeat-one', mode === REPEAT_MODE.ONE);
|
repeatBtn.classList.toggle('repeat-one', mode === REPEAT_MODE.ONE);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue