rickyjoo / wami-recorder

Automatically exported from code.google.com/p/wami-recorder
0 stars 0 forks source link

saving files on server. #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hello Ian,

I am trying to use the wami recorder to host a browser audio data capture for a 
study. I have been going through the project website trying to identify how the 
wami recorder saves audio files to the server and then plays them back.
I am missing still that part. Is there a way to do it without having to modify 
the Wami.swf using flex / flash builder?

Thanks for your support!

Original issue reported on code.google.com by ignacioa...@gmail.com on 6 Jan 2012 at 1:19

GoogleCodeExporter commented 8 years ago
You will need to set up your own server.  I have given you a few examples in a 
couple different languages of how you might do that, but at the end of the day, 
you'll have to set up the server yourself.  You can use the Google App Engine, 
but it's limited to 500MB, and I did not create any sample code for how to 
actually save the data in a database (I don't think the Google App Engine lets 
you save them to a file system).  The easiest thing to do might be to run the 
python script on a server you control and then point startRecording to it:

http://code.google.com/p/wami-recorder/source/browse/example/server/python/serve
r.py

This example is currently for testing on "localhost".  If you want to use it to 
host for real, then you'll also need a crossdomain.xml served at the same 
domain and port.  Your other option (which is easier for real hosting, but not 
necessarily for testing on "localhost") is to use a Apache2 with PHP.  The PHP 
code (if you choose this route) is on the front page.

Long story short, you have to host the server yourself.

Original comment by mcgrawian@gmail.com on 6 Jan 2012 at 3:52

GoogleCodeExporter commented 8 years ago

Original comment by mcgrawian@gmail.com on 6 Jan 2012 at 3:53

GoogleCodeExporter commented 8 years ago
Hello Ian,

I think the PHP option is the most suitable for me but I am still running 
through issues understanding where Flash is posting the audio capture and how 
to access it.

I have the Wami.startRecording function pointing to a folder in my server with 
writing rights and I have included  the crossdomain.xml file on it. 

If I execute the javascript console when using the wami recorder I can see that 
Flash is recording and posting data but the player cannot retrieve it back (See 
the javascript log for more information).

Thanks for your help!

Original comment by ignacioa...@gmail.com on 7 Jan 2012 at 1:14

Attachments:

GoogleCodeExporter commented 8 years ago
Suppose your Apache with PHP is set up to host files out of /var/www, for 
example http://localhost/index.html.  Make sure that you have crossdomain.xml 
at the ROOT of the domain (i.e. not in a subdirectory).  Thus, you should see 
it at  http://localhost/crossdomain.xml.  Technically you might not need this 
because this example (in addition to being on localhost) plays and records from 
the same host from which the Wami.swf.

To host the five client side files that are linked to on the front page, maybe 
it's best to create a directory called /var/www/test.  Thus, you will get to 
the test page at http://localhost/test/index.html.  Now you must ensure that 
the permissions are appropriate:

chmod a+w /var/www/test

This gives write permissions in this directory to everyone.  Actually this is 
probably a security risk as is, but it's a start at least.  There's probably a 
user associated with Apache that allows only Apache itself to write... you'll 
need to look that up.

Anyway.  The last step would be to take the PHP code I gave you and put it in 
/var/www/test/test.php and make sure you do 
startRecording('http://localhost/test/test.php');.

Original comment by mcgrawian@gmail.com on 7 Jan 2012 at 6:12

GoogleCodeExporter commented 8 years ago
sorry may be its a noob question but where should i add 
"startRecording('http://localhost/test/test.php');"

thnxs

Original comment by hammadah...@gmail.com on 3 Jun 2012 at 11:06

GoogleCodeExporter commented 8 years ago
I'm working with wami-recorder and I am confused about how to set the directory 
where the audio files are saved. I'm using the php script. In index.html, I can 
point to the record.php script via the recordUrl hash in the setupGUI function.

The previous comments stated to add 
"startRecording('http://localhost/test/test.php');"  but where is that to be 
added?

Thanks, Eric

Original comment by erics...@gmail.com on 28 Aug 2012 at 11:53

GoogleCodeExporter commented 8 years ago
If you are using the GUI already provided, then Wami.startRecording is already 
called within gui.js.  If not, you'll need to call it yourself after 
everything's been loaded.

Original comment by mcgrawian@gmail.com on 29 Aug 2012 at 2:13