more debug
This commit is contained in:
@@ -77,6 +77,9 @@
|
||||
} else {
|
||||
audio.volume = volume;
|
||||
}
|
||||
|
||||
console.log(volume);
|
||||
console.log(audio.volume);
|
||||
}
|
||||
|
||||
// workaround for bug https://github.com/sveltejs/svelte/issues/5347
|
||||
@@ -89,8 +92,6 @@
|
||||
// workaround for bug https://github.com/sveltejs/svelte/issues/5914
|
||||
audio.addEventListener('loadedmetadata', (event) => {
|
||||
paused = audio.paused;
|
||||
console.log(volume);
|
||||
console.log(audio.volume);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -153,7 +154,14 @@
|
||||
<button
|
||||
class="material-icons"
|
||||
style="--icon-color:{iconColor}"
|
||||
on:click={() => (audio.paused ? audio.play() : audio.pause())}
|
||||
on:click={() => {
|
||||
if (audio.paused) {
|
||||
console.log(audio.volume);
|
||||
audio.play();
|
||||
} else {
|
||||
audio.pause();
|
||||
}
|
||||
}}
|
||||
>
|
||||
{#if paused}
|
||||
play_arrow
|
||||
|
||||
Reference in New Issue
Block a user