开发者

Can I use microphone and sound with javascript?

I would like to develop a very small application using javascript... this application should pass the voice recorded from a microphone to the sound.

Is it possible?开发者_如何转开发

I know that i can access to microphone using Flash, but i would like to use javascript if possible.

Thank you!


Keep an eye on HTML5's implementation of getUserMedia. For a work-around using flash see:

https://code.google.com/p/wami-recorder/

That example actually passes audio to a server via an HTTP post (so no need for a Flash Media Server), but you could easily adapt it to keep the audio on the client side.


In this question about video streaming via web sockets it is possible to stream video. Theoretically it might be possible to write a client side application that creates a local TCP socket for microphone and audio, to which the browser and Javascript then listen.

I don't know if this has ever been attempted, and it would require significant code outside the browser to make happen.

You don't gain much either by doing it this way, over say, Flash since you still have client-side dependencies.


Nope. This is not possible. Javascript is not meant to access devices. you will need some abstraction technology like flash or silverlight that can help you with this otherwise javascript engine runs under the browser and it has no strings attached to the client-machine on which the browser is running.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜