hvianna / audioMotion-analyzer

High-resolution real-time graphic audio spectrum analyzer JavaScript module with no dependencies.
https://audioMotion.dev
GNU Affero General Public License v3.0
643 stars 63 forks source link

beginner question #23

Closed ghost closed 1 year ago

ghost commented 2 years ago

Hi

Can i use the script in a webbrowser locally? Is there an example file I can look at?

I just want the script to work on audio I play on my computer, using an offlind html file.

Is this possible?

hvianna commented 2 years ago

Hello,

JavaScript security policies impose a lot of restrictions in local file mode - you can't import ES6 modules or read music files if not using http/https protocols. You can solve this by using a simple HTTP server to make files accessible via http://localhost - if you have node.js installed I'd recommend http-server, otherwise check this big list of http servers.

Cheers!