auto download by using recordRTC when we click the stop button

265 Views Asked by At

I am using this source code https://www.webrtc-experiment.com/RecordRTC/simple-demos/screen-recording.html

to screen recording, it is working fine and after clicking stop button we can see our recorded video and then we can download the video by clicking download option at video.

Instead of manually download, is there any way auto download like If I click stop button the video can download automatically into my download folder.

what I have tried: in stopRecordingCallback() function

var reader = new FileReader();
     reader.readAsDataURL(recorder.getBlob()); 
     reader.onloadend = function() {
         var base64data = reader.result;                
        console.log(base64data);
          $.ajax({
                type: 'POST',
                url: 'save.php',
                data: {base64data: base64data},              
                success: function(msg) {
               
                   // alert('Successfully uploaded.');
                },
                error: function(jqXHR, textStatus, errorMessage) {
                    alert('Error:' + JSON.stringify(errorMessage));
                }
          });               
     }

Problem is ,it is working fine in my localhost and i can download the video automatically but when I update this code into my server it is not working ,I got this error:Request Entity Too Large ,I am changed my code in init.php file

#set max post size
post_max_size = 512M
upload_max_filesize = 512M
php_value post_max_size 20M 

I am sending my data by using POST only.

still I am getting same error ,so instead of this ,is there any way to download automatically that video.

Thanks

0

There are 0 best solutions below