I have build a webRTC video calling app, very simple entirely in JS.
Now the call is between our executives and customers, and for monitoring purposes we need to record the stream on both end.
Is there any way i can get most of the video: two solutions came to my mind was (Using MediaRecorder for the JOB ...)
Every 3-4 seconds update the recorded stream to server to append it, to some temporary file. and on server i check if an hour goes by, and still there is no new blog, upload it to permanent servers.
Problem i am using amazon s3 as storage server, which doesn't allow appending files, so i have to store it locally, i have to run a cronjob, and still system will be complicated, i also have to manage, network drops.
Even if everything works out, there is still chances that 1-2 seconds of footage will be lost.
Save the file in localStorage and update it next time, one of my page opens, or through some background JOB.
Problem Once the tab closes there is no background job i can rely on. Even ServiceWorkers have very limited scope. and they cannot access AJAX or LocalStorage ( as i know, for the best of my knowledge )
Any new solution with any prespective is appreciated. Anything i can do silently is acceptable. and if you have any comments about my existing approaches, then it works as well.
Thanks in Advance.
For your solution #1, consider uploading the blobs to different files in s3. At the end of the session, merge the files into a new file for permanent storage and delete the temporary files.