Flash录音,然后上传到服务器

发布于 2024-10-04 19:19:24 字数 312 浏览 0 评论 0原文

我正在寻找一个 Flash 小部件,允许用户录制音频然后将其发送到服务器。

还有一些类似的问题:

录制音频并上传为Wav或MP3到服务器

他们主张使用Red5或flash媒体服务器。

是否可以使用用户已有的编解码器在用户客户端上进行本地录制,然后将生成的文件上传到服务器,而不是说在服务器本身上处理并记录流。

谢谢。

I'm looking for a flash widget that allows users to record their audio and then send it to the server.

There are a few similar questions:

Record Audio and Upload as Wav or MP3 to server

They advocate using Red5 or flash media server.

Shouldn't it be possible to record locally on the user's client using the codecs that the user already has and then upload the resulting file to the server, rather than say, process the and record the stream on the server itself.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

爱的十字路口 2024-10-11 19:19:24

如果您正在运行 Flash,请根据捕获声音输入文章 Player 10.1 中您可以将麦克风数据保存到 ByteArray 中。捕获麦克风声音data 部分给出了有关如何执行此操作的以下示例:

var mic:Microphone = Microphone.getMicrophone(); 
mic.setSilenceLevel(0, DELAY_LENGTH); 
mic.addEventListener(SampleDataEvent.SAMPLE_DATA, micSampleDataHandler); 

function micSampleDataHandler(event:SampleDataEvent):void { 
  while(event.data.bytesAvailable) { 
    var sample:Number = event.data.readFloat(); 
    soundBytes.writeFloat(sample); 
  } 
}

一旦有了 ByteArray,您当然可以用它做任何您想做的事情。

According to the the Capturing Sound Input Article if you are running Flash Player 10.1 you can save the microphone data to a ByteArray. The Capturing microphone sound data section gives the following example on how to do it:

var mic:Microphone = Microphone.getMicrophone(); 
mic.setSilenceLevel(0, DELAY_LENGTH); 
mic.addEventListener(SampleDataEvent.SAMPLE_DATA, micSampleDataHandler); 

function micSampleDataHandler(event:SampleDataEvent):void { 
  while(event.data.bytesAvailable) { 
    var sample:Number = event.data.readFloat(); 
    soundBytes.writeFloat(sample); 
  } 
}

Once you have the ByteArray you can of course do whatever you want with it.

情泪▽动烟 2024-10-11 19:19:24

获得 ByteArray 后,您可以使用 NetStream.appendBytes()

Once you have the ByteArray you can pass it in with NetStream.appendBytes()

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文