-
Notifications
You must be signed in to change notification settings - Fork 9
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
How to play sounds from imported source when run locally? #20
Comments
Can u please post the error? Also, did you try passing |
I've tried stream: true and also stream: false, same error occurs. This below method works on imported sound files just fine without the above error:
|
I managed to get Howler library to work. I had to enable the "autoplay" option, otherwise it wouldn't though... not sure what's the reason behind this but it's likely the same with your library? |
I'll check this weekend and let you know |
Is it possible to share some code fiddle? |
I import sound files like so:
const soundFiles = require.context('./assets/sounds', true, /\.(aac)$/i);
This creates some urls which I can pass to musquito to play, however it won't work when run locally, because of permission errors. It does work when I create an audio object passing the path, e.g. "new Audio(soundFiles[...])".
Is there a way to make musquito compatible?
The text was updated successfully, but these errors were encountered: