We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to pause the audio
The text was updated successfully, but these errors were encountered:
Thanks @antonkristiono to reaching out. You can pause/stop the audio by adding another event listener as of v0.3.0
v0.3.0
<script lang="ts"> import { sound } from "svelte-sound"; import click_mp3 from "/assets/click.mp3"; let count: number = 0 const increment = () => { count += 1 } </script> <!-- below the sound starts when "mouseover" event is triggered and stops when "mouseleave" event is triggered --> <button on:click={increment} use:sound={{src:click_mp3, events:["mouseover", "mouseleave"] }}> count is {count} </button>
So, basically you have to just add another event to the events array and it will be used to stop the sound playback.
v0.5.0
Sorry, something went wrong.
This issue has been fixed and there is no activity (response) from the reporter. so closing this issue
No branches or pull requests
how to pause the audio
The text was updated successfully, but these errors were encountered: