Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function send() {
- var superBuffer = new Blob(recordedBlobs, {type: 'video/webm'});
- $.ajax({
- url: '',
- method: 'post',
- data: {
- 'video': superBuffer,
- 'csrftoken': csrftoken,
- },
- dataType: 'json',
- success: function(data) {
- console.log(data)
- },
- error: function(error) {
- console.log(error)
- }
- });
- }
- TypeError: 'slice' called on an object that does not implement interface Blob.
- function download() {
- var blob = new Blob(recordedBlobs, {type: 'video/webm'});
- var url = window.URL.createObjectURL(blob);
- var a = document.createElement('a');
- a.style.display = 'none';
- a.href = url;
- a.download = blob;
- document.body.appendChild(a);
- a.click();
- setTimeout(function() {
- document.body.removeChild(a);
- window.URL.revokeObjectURL(url);
- }, 100);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement