教程使用Flash或Java servlet上传麦克风数据从浏览器到服务器? [英] tutorial on using flash or java servlet to upload microphone data from browser to server?

查看:150
本文介绍了教程使用Flash或Java servlet上传麦克风数据从浏览器到服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个关于如何通过HTTP浏览器从客户端的麦克风获取数据到服务器的问题,答案是使用flash或者Java servlet applet。好,但是怎么样?那里有没有示例代码或教程?可以使用香草服务器来做,还是需要使用Adobe Media Server?解决方案

我相信答案是真正的 Flash或者可能是一个Java小程序,而不是java servlet。对于你的问题,你必须实现两件事:


  • 客户端应用程序运行在用户的浏览器中,捕获音频,然后连接到远程服务器上传文件。

  • 接受上传文件的网络应用程序。



客户端应用程序必须在浏览器的插件技术中实现,因为不可能直接从浏览器录制音频。这可以使用flash或Java Applet完成。这些不是唯一的选择,但它们是最常见的选择。



请参阅链接。这个blogspot还有趣地描述了你的Silverlight选项。



对于Java,这是一个 tutorial 进行录音。你需要创建一个applet,这不是很难。一个棘手的问题是,你可能需要签名你的小程序,以便能够访问用户的机器上的麦克风。

对于服务器端可以使用任何服务器技术和Adobe媒体服务器并不是必需的。例子是PHP,Java(Tomcat),ASP.NET。文件上传部分甚至可以用Apache Web Server来完成。您只需将其配置为允许上传文件即可。



更新:

我同意你的评论,闪光将是最好的解决方案。您可以在网络中找到许多使用ActionScript访问麦克风的示例。这是我很快找到的:


There was a question on how to get data from a microphone on a client to a server via an HTTP browser, and the answer was "use flash or maybe a java servlet applet". Fine, but how? Is there any sample code or tutorial out there? Can it be done with a vanilla server or do I need adobe media server?

解决方案

I believe that the answer was really "use flash or maybe a java applet" and not a "java servlet". For your problem you must implement two things:

  • A client application running in the user's browser that captures audio and then connects to a remote server to upload files.
  • A web application that accepts the uploaded files.

The client application must be implemented in a browser's plug-in technology, as it is impossible to record audio from the browser directly. This could be done with flash or a Java Applet. These aren't the only options, but they are the most common ones.

See this link for ActionScript code that access the microphone. The blogspot also interestingly describes what are your options with Silverlight.

For Java, this is a tutorial for audio recording. You would need to create an applet, which isn't very hard. A tricky issue is that you'd probably need to "sign" your applet in order to be able to access the microphone at the user's machine.

For the server side you can use any server technology and adobe media server is by no means required. Examples are PHP, Java (Tomcat), ASP.NET. The file uploading part you could even do it with just an Apache Web Server. All you need is to configure it to allow file uploads.

Update:

I agree with your comment that flash will be the best solution. You can find many examples in the net for accessing the microphone with ActionScript. This is what I have quickly found:

这篇关于教程使用Flash或Java servlet上传麦克风数据从浏览器到服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆