first commit
This commit is contained in:
		
							
								
								
									
										64
									
								
								templates/index2.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								templates/index2.html
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,64 @@ | ||||
| <!DOCTYPE html> | ||||
| <html lang="en-us"> | ||||
|  | ||||
| <head> | ||||
|     <!-- para el grabador/reproductor de audio --> | ||||
|    | ||||
|  | ||||
| </head> | ||||
|  | ||||
| <body> | ||||
| 	<!-- para usar Js con flask tengo que crear una carpeta static  --> | ||||
|     <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> | ||||
|   <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> | ||||
		Reference in New Issue
	
	Block a user