?
Solved

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

Posted on 2008-06-16
4
Medium Priority
?
236 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1500 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

752 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