muxinc / upchunk

Uploads Chunks! Takes big files, splits them up, then uploads each one with care (and PUT requests).
MIT License
336 stars 46 forks source link

Feature Request - Allow blobs from MediaRecorder #70

Open blairliikala opened 2 years ago

blairliikala commented 2 years ago

Is it possible to suggest being able to upload video live while a webcam/screen recording is happening. Currently the blobs have to be stored in the browser, turned into a File, and then uploaded. The user has to then wait for the upload, and if the browser fails/refreshes then the video is lost. The file property requires a file, and MediaRecorder returns blobs.

mediarecorder = new MediaRecorder(camera);
mediarecorder.addEventListener('dataavailable', function(e) {
    // Send to UpChunk to be uploaded?
    upchunk.pushblob(e.data);
});

Or otherwise pass the MediaRecorder instance to Upchunk to handle it?

UpChunk.createUpload({
    endpoint: url,
    recorder: new MediaRecorder(camera);
});