websoket/index.html
developertrinidad08 7e6cf29479 first commit
2023-01-16 18:11:14 -03:00

63 lines
1.5 KiB
HTML

<!DOCTYPE html>
<html lang="en-us">
<head>
<!-- para el grabador/reproductor de audio -->
<script src="wavesurfer.min.js"></script>
<script src="wavesurfer.microphone.min.js"></script>
<script src="stopwatch.js"></script>
<script src="ciseaux.min.js"></script>
<script src="recorder.js"></script>
<script src="imrecorder.js"></script>
</head>
<body>
<div id="recorder" style="width: 300px; border: 1px solid black; float: right; display: block;">
<div id="waveform" style="float: left; height: 40px; width: 200px;"></div>
<div id="chrono-container" style="float: right; height: 40px; width: 100px; font-size: 24px; text-align: right;">
<span id="time"></span>
</div>
</div>
<button id="rec">Rec</button>
<button id="rw">RW</button>
<button id="play">Play</button>
<button id="save">save</button>
<script>
var grabador = undefined;
grabador = new IMRecorder();
grabador.onVoiceRecognition = function(aMsg) {
console.log(aMsg);
};
var rec = document.getElementById('rec');
rec.onclick = function() {
console.log("rec");
grabador.rec_pause_toggle();
};
var rw = document.getElementById('rw');
rw.onclick = function() {
console.log("rw");
grabador.review();
};
var play = document.getElementById('play');
play.onclick = function() {
grabador.play_stop();
};
var play = document.getElementById('save');
play.onclick = function() {
grabador.save1();
};
</script>
</body>
</html>