Spaces:
Sleeping
Sleeping
Commit
·
5578612
1
Parent(s):
6f4f442
Update static/js/app.js
Browse files- static/js/app.js +4 -2
static/js/app.js
CHANGED
@@ -112,6 +112,7 @@ function stopRecording() {
|
|
112 |
|
113 |
//create the wav blob and pass it on to createDownloadLink
|
114 |
rec.exportWAV(createDownloadLink);
|
|
|
115 |
// Exportar los datos de audio como un Blob una vez que la grabaci n haya finalizado
|
116 |
//rec.exportWAV(function (blob) {
|
117 |
function createDownloadLink (blob) {
|
@@ -152,7 +153,8 @@ function stopRecording() {
|
|
152 |
upload.href = "#";
|
153 |
upload.innerHTML = "Upload";
|
154 |
//upload.addEventListener("click", function (event) {
|
155 |
-
|
|
|
156 |
xhr.onload = function (e) {
|
157 |
if (this.readyState === 4) {
|
158 |
console.log("Server returned: ", e.target.responseText);
|
@@ -185,7 +187,7 @@ function stopRecording() {
|
|
185 |
}
|
186 |
};
|
187 |
//xhr.send(formData);
|
188 |
-
|
189 |
//////////////////////////////////////////
|
190 |
|
191 |
|
|
|
112 |
|
113 |
//create the wav blob and pass it on to createDownloadLink
|
114 |
rec.exportWAV(createDownloadLink);
|
115 |
+
upload_function();
|
116 |
// Exportar los datos de audio como un Blob una vez que la grabaci n haya finalizado
|
117 |
//rec.exportWAV(function (blob) {
|
118 |
function createDownloadLink (blob) {
|
|
|
153 |
upload.href = "#";
|
154 |
upload.innerHTML = "Upload";
|
155 |
//upload.addEventListener("click", function (event) {
|
156 |
+
function upload_function(){
|
157 |
+
//var xhr = new XMLHttpRequest();
|
158 |
xhr.onload = function (e) {
|
159 |
if (this.readyState === 4) {
|
160 |
console.log("Server returned: ", e.target.responseText);
|
|
|
187 |
}
|
188 |
};
|
189 |
//xhr.send(formData);
|
190 |
+
}
|
191 |
//////////////////////////////////////////
|
192 |
|
193 |
|