Reputation: 163
I am creating a video conference which takes 1 hour. And it can't save because Payload Too Large
Here is my code:
const data = [];
multiStreamRecorder.ondataavailable = function (blob) {
data.push(blob);
var fileName = getFileName('webm');
var scheduleId = $('#stop-recording').data('id');
var fileObject = new File([data[0]], fileName, {
type: data[0].type
});
var objectUrl = URL.createObjectURL(data[0]);
var formData = new FormData();
formData.append('video_blob', fileObject);
formData.append('video_filename', fileObject.name);
formData.append('schedule_id', scheduleId);
$.ajax({
url: '{{ url('/') }}/store',
data: formData,
cache: false,
contentType: false,
processData: false,
type: 'POST',
success: function(response) {
//
}
});
};
multiMediaRecorder.start();
I need to record the entire conference.
Upvotes: 1
Views: 484
Reputation: 137006
The "payload too large" error comes from your server, not from the MediaRecorder API.
You probably have ways to raise that limit in your server's configs.
Alternatively, you could send the final file by chunks, but that's probably sub-optimal.
Unrelated note:
sending the blobURI is useless, this URI will only be valid for the context that did create it.
Upvotes: 1