CreateJS / SoundJS

A Javascript library for working with Audio. It provides a consistent API for loading and playing audio on different browsers and devices. Currently supports WebAudio, HTML5 Audio, Cordova / PhoneGap, and a Flash fallback.
http://createjs.com/
MIT License
4.42k stars 836 forks source link

SoundJS Web Audio Music Visualizer Not Loading in Chrome #85

Closed Burn-E99 closed 10 years ago

Burn-E99 commented 10 years ago

I just downloaded the most recent version of soundJS, and wanting to see the visualizer, immediately went to the examples folder, and opened MusicVisualizer.html. The HTML document opens, in chrome, and displays the error:

Sorry!

SoundJS or Web Audio is not currently supported in your browser. Currently only Chrome and iOS6 Safari support the Web Audio API, and content must be run from a server.

Please log a bug with the device and browser you are using if you see this in Chrome or Safari. Thank you.

Little extra info: I am using chrome Version 28.0.1500.95 m on Windows 7 Professional

fareskalaboud commented 10 years ago

Same here, using latest Mac OS X.

lannymcnie commented 10 years ago

Are you running the file locally? Chrome can not load audio files via XHR when running on the system, and this is the only way that the visualizer will work. HTML5 audio can be loaded locally, but its only good for playback, not visualization.

Does this work? http://createjs.com/Demos/SoundJS/MusicVisualizer.html

Typically we test our content using a local server like MAMP, XAMPP, or through a grunt process like Connect.

Burn-E99 commented 10 years ago

Yes I am trying to run it locally, and it does load through http://createjs.com/Demos/SoundJS/MusicVisualizer.html.

Just to let me get this straight, the visualization needs to run through a server?

Also, what does XHR stand for?

lannymcnie commented 10 years ago

WebAudio needs to load raw data using XHR (XmlHttpRequests - http://www.w3schools.com/xml/xml_http.asp), similar to loading raw text. Due to security restrictions, this can not load on the local file system.

In order to test locally, the best option is to run a webserver, such as MAMP (mac) or XAMPP (pc). If you upload to a remote server, it will run fine (as long as you aren't loading cross-domain, which has other restrictions).

Burn-E99 commented 10 years ago

Ok.

OJayRobinson commented 10 years ago

Thanks for the feedback, we'll likely adjust that messaging for future releases.

Burn-E99 commented 10 years ago

Ok. Glad I could help.

On Mon, Feb 10, 2014 at 11:41 AM, OJay notifications@github.com wrote:

Thanks for the feedback, we'll likely adjust that messaging for future releases.

Reply to this email directly or view it on GitHubhttps://github.com/CreateJS/SoundJS/issues/85#issuecomment-34652439 .

Ean Milligan Tenth Grader @ DRSS Programmer

OJayRobinson commented 10 years ago

This change has been pushed for the NEXT version of SoundJS