Solved

Can a Flash app stream back to the server both mp3 audio out and MIC in?

Posted on 2008-06-16
4
233 Views
Last Modified: 2013-11-11
I want to write an application in Flash that will play an mp3 on the client side, take the audio output from the mp3 player along with the Microphone in and stream both back to my server.  Is this possible in Flash?

I could use some help, so any suggestions or comments that put me in the right direction are appreciated.

thanks
0
Comment
Question by:James Glaubiger
  • 2
4 Comments
 
LVL 12

Expert Comment

by:SamuelRostol
ID: 21800640
You can probably write a application in AIR that saves temporarily the sound on the computer, and then uploads it to server via php (or something like that), but I'll have to dissapoint you elsewise. Flash cannot store anything on your computer, and I believe that Flash needs an actual file to upload...
0
 
LVL 12

Expert Comment

by:SamuelRostol
ID: 21800642
Sorry, typo:
"I believe that PHP needs an actual file to upload"
0
 
LVL 7

Author Comment

by:James Glaubiger
ID: 21810969
Any other ideas? Can flash actually do what I want?
0
 
LVL 4

Accepted Solution

by:
emphaticDigital earned 500 total points
ID: 21828035
The basic class you need to implement is the Socket class. It can both read and write raw binary data with no restrictions on the data type.

You can use the NetConnection/NetStream objects to handle grabbing the mic input and you should also be able to use them for sending it to the server.

The problem is keeping track of the raw binary info from the MP3 and the mic, which is why you need the Socket class.

Of course, the Flash Security model will determine whether the communication is allowed at all.

I feel like if you use both of those classes, a solution should be available. It would be high level stuff though without the use of a Flash Remoting Server, which is a separate product available from Adobe. If you set up Flash Remoting on your server, I think it will be more straight forward. I have a socket project coming up, but not for another month, so I'm still researching ways to get around the costly Flash Remoting. Adobe has an open source server called Blaze for socket connections also.

Hope this helps.

PS - PHP can handle binary data, so if you can succesfully capture the raw binary from both the loaded MP3 and the mic, you could write a server deamon in PHP to handle recreating the sound file on your server. Java would also work.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question