svelte-sonic
v0.0.5
Published
simple audio player for svelte, based on [wavesurfer.js](https://github.com/katspaugh/wavesurfer.js). It's Svelte 5 runes for reactivity.
Downloads
11
Readme
svelteSonic
simple audio player for svelte, based on wavesurfer.js. It's Svelte 5 runes for reactivity.
Installation
pnpm i svelte-sonic
Usage
<script lang="ts">
import { AudioPlayer } from 'svelte-sonic';
let togglePlayPause = $state(() => {});
let isPlaying = $state(false);
let progress = $state(0);
</script>
<AudioPlayer
src="/audio.mp3"
barWidth={3}
exclusive={true}
bind:togglePlayPause
bind:isPlaying
bind:progress
/>