cwilso / PitchDetect

Pitch detection in Web Audio using autocorrelation
https://cwilso.github.io/PitchDetect/
MIT License
1.31k stars 440 forks source link

Downloaded zip, program wont work #15

Open odonckers opened 8 years ago

odonckers commented 8 years ago

When I try the live input or anything else for that matter, it stays blank and will not do anything. Please help, this program would be so cool if it would work in places other than your demo website.

cwilso commented 8 years ago

Well, javascript typically won't run if you just open it as file://; you'll need to run a local web host. But it should work after that.

odonckers commented 8 years ago

Okay, I will try it.

odonckers commented 8 years ago

I tried this on my website http://dontaskmeagain.com/pitch/ and it gave me this error: getUserMedia threw exception :TypeError: navigator.getUserMedia is not a function. (In 'navigator.getUserMedia(dictionary, callback, error)', 'navigator.getUserMedia' is undefined)

cwilso commented 8 years ago

getUserMedia is restricted to secure domains. If you're not running on localhost, it will need to be https://.

odonckers commented 8 years ago

Okay, I will see what I can do...

dav-m85 commented 8 years ago

If you still get the error, make sure the navigator you're using is compatible. getUserMedia is not supported everywhere... http://caniuse.com/#feat=stream

cwilso commented 8 years ago

Ah, good point. Safari doesn't support getUserMedia, on iOS or desktop.

Puddingsan commented 6 years ago

As of September 2018 navigator.getUserMedia has been deprecated (though still supported pretty much) in favour of navigator.mediaDevices.getUserMedia. The getUserMedia function in the code could be modified to incorporate this.