Skip to content
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

No sound when I attach the component to audio tag #36

Open
nkostadinov opened this issue Jan 25, 2022 · 2 comments
Open

No sound when I attach the component to audio tag #36

nkostadinov opened this issue Jan 25, 2022 · 2 comments

Comments

@nkostadinov
Copy link

When I add the AudioSpectrum component to a page after an audio tag the sound disappears. I've made a demo showing the issue. The audio seems to be playing but there is no sound, if you remove the component and refresh the sound is back.

@b3d0NA
Copy link

b3d0NA commented Oct 25, 2022

Same here as well!!

@etuong
Copy link

etuong commented Nov 17, 2022

It's a CORS thing. This response is very helpful. https://stackoverflow.com/questions/27429123/html5-audio-web-audio-api-cors-and-firefox

This will work because the server has proper CORS policy. You'll still need to set the cross origin to anonymous in your . Try this MP3 that is already configured: https://pineprojectmusic.s3-us-west-2.amazonaws.com/StreamingSongs/Radio.mp3

The alternative is to have your audio in the same origin like the author. He puts his playlist songs in \assets\media of his example demo. It will work if you clone and run his demo locally.

Reason why it doesn't work on Github pages is for the same said reason on CORS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants