jquery - how to increase recording time duration in recordRTC -
i want increase time duration record canvas , send server ,for write code shown in below not shows error neither create video. using recordrtc jquery plugin.
var canvas = document.getelementbyid('can'); var recorder = recordrtc(canvas, { type: 'canvas' }); recorder.startrecording(); var stop = false; (function looper() { if (stop) { var fiveminutes = 5 * 1000 * 60; * recorder.setrecordingduration(fiveminutes, function () { console.log(recorder); var blob = recorder.getblob(); var reader = new window.filereader(); reader.readasdataurl(blob); reader.onloadend = function () { base64data = reader.result; //console.log(base64data); var basecode = { "webemvideo": base64data }; document.getelementbyid("viddata").value = base64data; var templateid = $("#templateid").val(); var pstdata = $("#viddata").val(); var music_name = $("#music_file_final").val(); $.post(baseurl + 'create_video', { music_name: music_name , templateid: templateid , webemvideo: pstdata , }, function (data, status) { var objdata = $.parsejson(data); //console.log(data); //console.log(objdata.status); if (objdata.status == "success") { $(location).attr('href', baseurl + 'playground-step-3/' + objdata.video_created); } else { alert("try again") } }); } }); return; } settimeout(looper, 100); })(); var seconds = 10; var interval = setinterval(function () { seconds--; if (document.queryselector('h1')) { document.queryselector('h1').innerhtml = seconds + ' seconds remaining.'; } }, 1000); settimeout(function () { cleartimeout(interval); stop = true; }, seconds * 1000); }
Comments
Post a Comment