views:

124

answers:

1

Simply stated: I'm trying to record audio in a browser, and get that data back up to the server.

I originally tried to capture, encode and upload the audio using Silverlight, but because of the lack of suitable client-side encoding options, I'm now giving Flash a shot (Flash has baked-in support for encoding to Speex).

I think I've figured out how to capture and encode the audio... But now what was easy in Silverlight, is the challenge in Flash.

  • My server-side is .NET: MVC2-
  • I'm open to receiving the audio in whatever manner is best- REST, WCF..
  • So that's my question:
    How could one upload binary data from Flash, to a .NET server-side endpoint.

If the answer is WCF: then how would one setup the client-side proxies to communicate with the service? If the answer is REST or HTTP Post, then how would one construct this HTTP request and pass along the data? I've been reading up on AS3, but am new to Flash dev... Thanks for any help!

+1  A: 

For uploading binary data: Get the data into a ByteArray, create a URLRequest with the according URL and put that ByteArray into its data property. Then send it per POST

however I am not sure this will help. The speex encoder is not exposed through the API. The only thing you can generally get from a sound in Flash are its raw decoded samples. Sound compression is fully transparent and is handled within the player when sounds are sent over a NetStream.

greetz
back2dos

back2dos
hm, helpful explanation, thx, but it seems I'm still far from a sln - is the NetStream a viable way to get the data to the server in my scenario, or is it exclusively aimed at Flash Media Server (the docs seem to indicate the latter)?
Bobby
@Bobby: there's multitude of alternatives to the Flash Media Server. I'm not too much into all this, but it seems WebORB runs on .NET: http://www.themidnightcoders.com/products/weborb-for-net/overview.html
back2dos