Open GoogleCodeExporter opened 8 years ago
What is the URL you put in startRecording? Suppose it's
http://www.awesomesite.com/wami/record.php. You would need to make sure to
have http://www.awesomesite.com/crossdomain.xml. Notice it's at the root, not
in the "wami" directory.
Original comment by mcgrawian@gmail.com
on 4 Feb 2012 at 1:55
Woah, that mock example site actually had a crossdomain.xml, which was totally
wrong for what you need... just take a look at the one we have checked in here
for the insides:
https://code.google.com/p/wami-recorder/source/browse/example/server/app-engine/
crossdomain.xml
Original comment by mcgrawian@gmail.com
on 4 Feb 2012 at 1:59
Hmmm... nope doesn't seem to do it. Crossdomain.xml is indeed in the root.
Here's my js console. The last "httpStatusHandler" comes through when I try to
play and see the security warning. tried in safari and chrome and both also
showing this error. any ideas?:
FLASH: External.addCallback: startListening
FLASH: External.addCallback: stopListening
FLASH: External.addCallback: startRecording
FLASH: External.addCallback: stopRecording
FLASH: External.addCallback: getRecordingLevel
FLASH: External.addCallback: startPlaying
FLASH: External.addCallback: stopPlaying
FLASH: External.addCallback: getPlayingLevel
FLASH: External.addCallback: showSecurity
FLASH: Listening...
FLASH: Recording at rate: 22050
FLASH: POST 81332 bytes of type audio/x-wav
FLASH: Expected Samples: 41013 Actual Samples: 37888
FLASH: POST openHandler: [Event type="open" bubbles=false cancelable=false
eventPhase=2]
2FLASH: POST progressHandler loaded:3796 total: 0
2FLASH: POST progressHandler loaded:36564 total: 0
2FLASH: POST progressHandler loaded:81260 total: 0
FLASH: POST progressHandler loaded:81338 total: 0
FLASH: POST: completeHandler
FLASH: httpStatusHandler: [HTTPStatusEvent type="httpStatus" bubbles=false
cancelable=false eventPhase=2 status=0 responseURL=null]
FLASH: Unlistening.
Original comment by b...@smartots.com
on 4 Feb 2012 at 3:46
Incidentally - here's my call to record:
Wami.startRecording('http://localhost/wamiserver/audioreceiver.php?name=test.wav', "onRecordStart", "onRecordFinish", "onError"); }
Original comment by b...@smartots.com
on 4 Feb 2012 at 3:47
One other thought - haven't dug into the flash yet but I don't know where the
play comes from. Is the buffer stored in memory and then played? Or is it
reading the file again? Maybe a security issue? Anything I can do in Flash to
show more in-depth logging to find where exactly this issue is cropping up?
Original comment by b...@smartots.com
on 4 Feb 2012 at 3:48
No, it's played back from the server, because we want to demonstrate the whole
loop of audio to server and back.
What is the URL you put in startPlaying? I imagine it would be something like
http://localhost/wamiserver/test.wav, if that is indeed where you saved the wav
file in the PHP code. You just need to make sure it's accessible via URL. If
the SWF is also served from localhost, then you shouldn't need
http://localhost/crossdomain.xml at all.
Original comment by mcgrawian@gmail.com
on 4 Feb 2012 at 5:25
Yep that was it - now I feel dumb. I didn't change the playback server call -
thanks!
Original comment by thebill...@gmail.com
on 7 Feb 2012 at 2:09
Actually one other question. Is there a way for the SWF to pass via javascript
data returned by the server AFTER the file has been successfully saved?
Original comment by thebill...@gmail.com
on 7 Feb 2012 at 2:09
I haven't tried it myself, but my guess is that you could just write data to
the response of the POST from the server, and read it in actionscript:
var loader:URLLoader = URLLoader(event.target);
// loader.data will be the response data
Original comment by mcgrawian@gmail.com
on 7 Feb 2012 at 4:28
Alright I got grabbed the URLLoader data after sending the file to server in
the SinglePost class (sent it to External.debug console). Now I just need to
figure out how to instead of sending that to debug console, send it as data
back to javascript.
Looking into the code it looks like it's going to be a bit complicated - anyone
have any ideas?
Original comment by thebill...@gmail.com
on 7 Feb 2012 at 11:06
actually i should create a new issue on this
Original comment by thebill...@gmail.com
on 7 Feb 2012 at 11:06
Original comment by mcgrawian@gmail.com
on 8 Feb 2012 at 4:25
Original issue reported on code.google.com by
b...@smartots.com
on 4 Feb 2012 at 1:42