Closed priMo-ex3m closed 6 years ago
So, that was because :
To salve this cross-browser incompatibility with code :
player.on('finishRecord', function() {
if(player.recordedData.video == undefined) {
var videoFile = player.recordedData;
} else {
var videoFile = player.recordedData.video;
}
console.log('finished recording: ', videoFile);
// upload data to server
var filesList = [videoFile];
$('#fileupload').fileupload('add', {files: filesList});
});
@priMo-ex3m thanks for that fix, can you make a pull request for that?
You're using audio+video, and the examples use audio-only, so I cannot update these examples, closing as is.
I just spend whole day to install this package via npm first (w/o succes), then with bower... and the links from example was different with current directories. So, finally I solve it. I use to remake ur code to reproduce audio-player & upload to server obrained audio file. I did absolutely same with video player, I changed all like in example " audio + video", video is obtaining (console.log), it shows me size of obtained file, format, but returns me error 500 from the server. Note that I use absolute the same code at backend like with audio-only(it worked with audio). I'm working with Laravel 5.4, console.log shows me following stepts :
My back-end code :
Response from /test route in my debugger :
Array ()
, so it means that obtained video doesn't hit the Request object.My entire code of player and jQuery (worked for audio-only)
UPDATE : I added
if (jQuery('#fileupload').val()) { console.log("YES"); } else { console.log("NO");}
afterand it outputed me "NO" at console.log
So, here is the problem :
$('#fileupload').fileupload('add', {files: filesList});
doesn't add obtained file to the input. Do you have idea - why?