jRecorder Example-->li{display:inline; margin-right:10px;}$.jRecorder({host: 'http://eficazlaudos.com/laudo_voz/acceptfile.php?filename=".$row2['id_lista_trab'].".wav&id_lanca=h71',//replace with your server path pleasecallback_started_recording: function(){callback_started();},callback_stopped_recording: function(){callback_stopped();},callback_activityLevel: function(level){callback_activityLevel(level);},callback_activityTime: function(time){callback_activityTime(time);},callback_finished_sending: function(time){ callback_finished_sending()},swf_path: 'jRecorder.swf',});Time: 00:00Level:Status:This Record button trigger the record event. See the javascript example in the bottom of the page.(View Source in your browser).
$('#record').click(function(){
$.jRecorder.record(30); //record up to 30 sec and stops automatically
})
-->This Stop button trigger the stop record event.
Onclick of this button trigger $.jRecorder.sendData() which send the data to the Server
-->This SendData button trigger the sendData event to flash to send the wav data to Server(configured in the host parameter).
$('#stop').click(function(){
$.jRecorder.stop();
})
-->Time area is used to update the time. There is an event Listener which update the recording time dynamically.
callback_activityTime: function(time){callback_activityTime(time); //see the initialisation
//function callback
function callback_activityTime(time)
{
$('#time').html(time);
}
<html>
<head>
<meta name='author' content='Sajith Amma' />
<script src='jquery.min.js'> </script>
<script src='jRecorder.js'> </script>
<!--<title>jRecorder Example</title> -->
<style>
li {display:inline; margin-right:10px;}
</style>
</head>
<body>
<script>
$.jRecorder({
host : 'http://eficazlaudos.com/laudo_voz/acceptfile.php?filename=".$row2['id_lista_trab'].".wav&id_lanca=h71' , //replace with your server path please
callback_started_recording: function(){callback_started(); },
callback_stopped_recording: function(){callback_stopped(); },
callback_activityLevel: function(level){callback_activityLevel(level); },
callback_activityTime: function(time){callback_activityTime(time); },
callback_finished_sending: function(time){ callback_finished_sending() },
swf_path : 'jRecorder.swf',
});
</script>
</div>
<div style='background-color: #eeeeee;border:1px solid #cccccc'>
Time: <span id='time'>00:00</span>
</div>
<div>
Level: <span id='level'></span>
</div>
<div id='levelbase' style='width:200px;height:20px;background-color:#ffff00'>
<div id='levelbar' style='height:19px; width:2px;background-color:red'>
</div>
</div>
<div>
Status: <span id='status'></status>
</div>
<div>
<input type='button' id='record' value='Gravar' style='color:red'>
<!--
<p>
This Record button trigger the record event. See the javascript example in the bottom of the page. (View Source in your browser).
<pre>
$('#record').click(function() {
$.jRecorder.record(30); //record up to 30 sec and stops automatically
});
</pre>
</p>
<hr/>
-->
<input type='button' id='stop' value='Parar'>
<!--
<p>
This Stop button trigger the stop record event.
<pre>
Onclick of this button trigger $.jRecorder.sendData() which send the data to the Server
</pre>
</p>
<hr/>
-->
<input type='button' id='send' value='Enviar voz'>
<!--
<p>This SendData button trigger the sendData event to flash to send the wav data to Server (configured in the host parameter).
<hr/>
<pre>
$('#stop').click(function(){
$.jRecorder.stop();
});
</pre>
</p>
<hr/>
-->
</div>
<!--
<p>
Time area is used to update the time. There is an event Listener which update the recording time dynamically.
<pre>
callback_activityTime: function(time){callback_activityTime(time); //see the initialisation
//function callback
function callback_activityTime(time) {
$('#time').html(time);
}
</pre>
</p>
-->
</body>
</html>
<script type='text/javascript'>
$('#record').click(function(){
$.jRecorder.record(30);
});
$('#stop').click(function(){
$.jRecorder.stop();
});
$('#send').click(function() {
$.jRecorder.sendData();
});
function callback_finished() {
$('#status').html('Recording is finished');
}
function callback_started() {
$('#status').html('Recording is started');
}
function callback_error(code) {
$('#status').html('Error, code:' + code);
}
function callback_stopped() {
$('#status').html('Stop request is accepted');
}
function callback_finished_recording() {
$('#status').html('Recording event is finished');
}
function callback_finished_sending() {
$('#status').html('File has been sent to server mentioned as host parameter');
}
function callback_activityLevel(level) {
$('#level').html(level);
if(level == -1) {
$('#levelbar').css('width', '2px');
} else {
$('#levelbar').css('width', (level * 2)+ 'px');
}
}
function callback_activityTime(time) {
//$('.flrecorder').css('width', '1px');
//$('.flrecorder').css('height', '1px');
$('#time').html(time);
}
</script>
-->$('#record').click(function(){$.jRecorder.record(30);})$('#stop').click(function(){$.jRecorder.stop();})$('#send').click(function(){$.jRecorder.sendData();})function callback_finished(){$('#status').html('Recording is finished');}function callback_started(){$('#status').html('Recording is started');}function callback_error(code){$('#status').html('Error, code:' + code);}function callback_stopped(){$('#status').html('Stop request is accepted');}function callback_finished_recording(){$('#status').html('Recording event is finished');}function callback_finished_sending(){$('#status').html('File has been sent to server mentioned as host parameter');}function callback_activityLevel(level){$('#level').html(level);if(level ==-1){$('#levelbar').css('width', '2px');}else{$('#levelbar').css('width',(level * 2)+ 'px');}}function callback_activityTime(time){//$('.flrecorder').css('width', '1px');//$('.flrecorder').css('height', '1px');$('#time').html(time);}