You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 23, 2022. It is now read-only.
In my use case, I want to make sure to stop any audio that is being played before playing the next one. So I try to use the stop method before playing the next audio file, but when running the function to do that, on first run time it will error out with Error: no audio playback to stop. How to bypass it, and write an if block before stopping to make sure an audio is being played?
The text was updated successfully, but these errors were encountered:
Troubadour shouldn't be throwing an error when you call .stop(). It should be emitting an error event that you can listen to or ignore.
In your case, bypassing it just means ignoring the event that was emitted.
There isn't a function at the moment that can be used to check the status. However, it's possible that one can be written as there's a pointer to the audio process internally. If you decide that's something you need and you want to write it yourself, I'd be open to a pull request.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In my use case, I want to make sure to stop any audio that is being played before playing the next one. So I try to use the
stop
method before playing the next audio file, but when running the function to do that, on first run time it will error out withError: no audio playback to stop
. How to bypass it, and write an if block before stopping to make sure an audio is being played?The text was updated successfully, but these errors were encountered: