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:
parent
43f231ef2d
commit
b0adee63eb
1 changed files with 1 additions and 3 deletions
|
@ -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}>
|
||||
|
|
Loading…
Add table
Reference in a new issue