|
|
@ -3,15 +3,17 @@ let chunks = [];
|
|
|
|
|
|
|
|
|
|
|
|
var mediaRecorder = false;
|
|
|
|
var mediaRecorder = false;
|
|
|
|
|
|
|
|
|
|
|
|
var sendFile = function (blob) {
|
|
|
|
var sendFile = async function (blob) {
|
|
|
|
const formData = new FormData();
|
|
|
|
const formData = new FormData();
|
|
|
|
|
|
|
|
|
|
|
|
formData.append('userfile', blob, new Date() + ".webm");
|
|
|
|
formData.append('userfile', blob, new Date() + ".webm");
|
|
|
|
|
|
|
|
|
|
|
|
return fetch('upload.php', {
|
|
|
|
const response = await fetch('upload.php', {
|
|
|
|
method: 'POST',
|
|
|
|
method: 'POST',
|
|
|
|
body: formData
|
|
|
|
body: formData
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(response.json())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var initRecording = function (autostart) {
|
|
|
|
var initRecording = function (autostart) {
|
|
|
|