Component that wraps html audio tag for building custom audio player.
npm install svelte-audio-player
or using yarn
yarn add svelte-audio-player
<script>
import { AudioPlayer } from 'svelte-audio-player'
</script>
<AudioPlayer src="/BabyElephantWalk60.wav">
<MyAudioPlayer />
</AudioPlayer>
MyAudioPlayer.svelte
<script>
import { getAudioContext } from 'svelte-audio-player'
const {
currentTime,
repeat,
duration,
playing,
volume,
muted,
ended,
paused,
playbackRate,
seekBy,
seekTo
} = getAudioContext()
</script>
<!-- Your custom audio player component -->
Full documentation please visit Svelte Audio Player's website