rickyjoo / wami-recorder

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

File size after save is zero #25

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hey Guys,

I'm trying to use WAMI in ubuntu and i have hosted it in 
/var/www/playground/Wami

the html looks like:

function setupGUI() {
        var gui = new Wami.GUI({
            id : "wami",
            recordUrl : "http://192.168.10.3/playground/Wami/post.php?name=tapas.wav",
            playUrl : "http://192.168.10.3/playground/Wami/post.php?name=tapas.wav"
        });

        gui.setPlayEnabled(false);
    }

and the server page is :

<?php

parse_str($_SERVER['QUERY_STRING'], $params);
$name = isset($params['name']) ? $params['name'] : 'output.wav';
$path = sys_get_temp_dir().'/'.$name;
$content = file_get_contents('php://input');
$fh = fopen($path, 'w') or die("can't open file");
fwrite($fh, $content);
fclose($fh);
?>

When i record the sound the file is getting created but its size is always 
zero.....

can someone help me

Original issue reported on code.google.com by tapas.ba...@mokshadigital.com on 6 Jun 2012 at 11:31

GoogleCodeExporter commented 8 years ago
Did you check whether you allowed the permissions or not in flash player 
settings?

Original comment by shaik.go...@sourcebits.com on 22 Jan 2013 at 6:24

GoogleCodeExporter commented 8 years ago
I have the same issue, here's the log I get on my first attempt to record.

FLASH: External.addCallback: getPlayingLevel
FLASH: External.addCallback: showSecurity
FLASH: Listening...
FLASH: Recording at rate: 22050
FLASH: POST 44 bytes of type audio/x-wav
FLASH: Expected Samples: 17397 Actual Samples: 0
FLASH: Unlistening.
FLASH: POST openHandler: [Event type="open" bubbles=false cancelable=false 
eventPhase=2]
FLASH: POST progressHandler loaded:7 total: 0
FLASH: POST: completeHandler

This only happens the first time you try to record it and after that it records 
just fine.  Flash was given access to the microphone and this was tested both 
with and without the remember me checked.

Original comment by clifford...@gmail.com on 22 Jan 2013 at 10:02

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I'm having the same issue, but at the reverse: It records ok the 1st time. Then 
stops working. :(
Apparently it only happens in Google Chrome, not in firefox. (Has anybody has 
check this?)

Original comment by bor...@gmail.com on 25 Mar 2013 at 10:52

GoogleCodeExporter commented 8 years ago
In setupGUI, the ending " and second param , is not shown.
This may not be related to your issue but could be causing other issues.

Also, I am having the same issue of 44 byte file created but no audio saved. I 
can't seem to find an answer here. Any help of where to look would be 
appreciated.

Original comment by dadavem...@gmail.com on 13 Jun 2013 at 5:19

GoogleCodeExporter commented 8 years ago
same here..
only WAV header is saved first time trying to record(44 bytes)
need to restart browser (?) / clear cache / something else in order to 
workaround the issue.

Any help would be appreciated!

Original comment by lefon...@gmail.com on 29 Jun 2013 at 9:06

GoogleCodeExporter commented 8 years ago
Reporting same issue. Works for Firefox, not on Chrome.

Original comment by jess...@gmail.com on 1 Aug 2013 at 5:43

GoogleCodeExporter commented 8 years ago
My solution: when the recorder is ready, start a record and stop it after a 
10ms timeout. The next record will work well.

Original comment by christop...@gmail.com on 2 Jun 2014 at 10:27