1
0
Fork 0
mirror of https://github.com/mat-1/matdoesdev.git synced 2025-08-02 06:36:04 +00:00

hide music player in browsers that don't support it

This commit is contained in:
mat 2023-11-29 01:33:02 -06:00
parent 43f231ef2d
commit b0adee63eb

View file

@ -4,7 +4,6 @@
import Pause from './icons/Pause.svelte'
import Play from './icons/Play.svelte'
import { browser } from '$app/environment'
import { onMount } from 'svelte'
let musicPlayerEl: HTMLAudioElement | undefined = undefined
@ -19,7 +18,6 @@
musicPlayerEl.pause()
}
}
$: console.log(playing)
const SONGS = [
'C418 - Thunderbird',
@ -67,7 +65,7 @@
<audio bind:this={musicPlayerEl} on:ended={nextSong} />
<table class="music-player">
<table class="music-player" style={musicPlayerEl ? '' : 'display: none'}>
<tr>
<td>
<button on:click={prevSong}>