Interesting idea. That sounds more feasible, but I still need to figure out: 1. How to avoid bombarding the player with download requests, 2. Performance, and 3. How to stitch together the recordings. I'll see what I can do.
I don't think you need to bombard the player - I was thinking that you might be able to use the AJAX plugin to read the recorded video via its URL. From that plugin's page:
Binary data
The AJAX object can receive resources as binary, and also post binary data, using the Binary Data object. This is also useful to fetch local resources like canvas snapshot URLs or video recording URLs, and load them in to a Binary Data object to do something else with them, like save it to storage or upload it to a server.
So:
- Create an array with 30 entries
- Record 1 second
- Store its URL in the array
- Delete the last entry (i.e. the 31st) every time a new video is logged
- Player clicks the download button
- Loop through the 30 entries in the array
- Use the AJAX plugin to retrieve each clip via its URL
- Some magic here to stitch all the clips together (might need raw JavaScript)
- Serve the resulting 30 clip to the user as a download
That might solve the problem of not wanting to prompt the user to download every video, but you might have a similar problem requesting permission to start the recording. This is from the Video Recorder manual:
For security reasons, browsers will prompt the user before the recording starts. To avoid the prompt annoying users, this action may only be allowed in a user input trigger, e.g. On button clicked, On touch start etc.
And I'm not exactly sure what that implies!