maybe a good fix this time...
This commit is contained in:
@@ -59,6 +59,7 @@
|
||||
onMount(async () => {
|
||||
const volumeData = localStorage.getItem('volume');
|
||||
volume = volumeData ? parseFloat(volumeData) : 0.67;
|
||||
setVolume(volume);
|
||||
});
|
||||
|
||||
$: updateCurrentSong(currentTime, $currentSongIndex);
|
||||
@@ -77,9 +78,6 @@
|
||||
} else {
|
||||
audio.volume = volume;
|
||||
}
|
||||
|
||||
console.log(volume);
|
||||
console.log(audio.volume);
|
||||
}
|
||||
|
||||
// workaround for bug https://github.com/sveltejs/svelte/issues/5347
|
||||
@@ -154,14 +152,7 @@
|
||||
<button
|
||||
class="material-icons"
|
||||
style="--icon-color:{iconColor}"
|
||||
on:click={() => {
|
||||
if (audio.paused) {
|
||||
console.log(audio.volume);
|
||||
audio.play();
|
||||
} else {
|
||||
audio.pause();
|
||||
}
|
||||
}}
|
||||
on:click={() => (audio.paused ? audio.play() : audio.pause())}
|
||||
>
|
||||
{#if paused}
|
||||
play_arrow
|
||||
|
||||
Reference in New Issue
Block a user