-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
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
Added stop button for hello audio worklet example #387
Added stop button for hello audio worklet example #387
Conversation
@hoch this is the single example version of my previous PR. Just to update you on getting a test page for quick and easy inspection of the PR, I started looking into this again yesterday and it does seem possible to do with github pages + github actions. I will continue researching this over the course of the week and provide updates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your patience, and I am hopeful that we can land this pretty soon.
Thanks for the feedback!!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It looks like there's a conflict, so once you resolve it I'll merge the PR.
Cool I think that should resolve the conflict! |
I added a stop button to the hello audio worklet example enabling the user to stop and start the sound.
Specifically, I used audioContext.suspend() to allow the user to pause the sound with a stop button. And I added an isModuleLoaded check to avoid redundantly calling addModule. Also added isPlaying to toggle the playing state.