nstudio / nativescript-camera-plus

MIT License
79 stars 50 forks source link

Help/guidance with circular buffered recording #133

Open grancola opened 4 years ago

grancola commented 4 years ago

Hello, I'm using this plugin and works great but I wonder if I can get any assistance on how to get circular buffer implemented with camera-plus, and store 10 seconds before and after an event is picked up by the phone (sound)

A typical use-case for this sort of storage is security applications where one wishes to detect motion and only record to disk the video where motion was detected. This example keeps 20 seconds of video in memory until the event is detected (sound) Once the event is detected, the script waits 10 more seconds (so that the buffer contains 10 seconds of video from before the event, and 10 seconds after) and writes the resulting video to disk before going back to waiting

Any ideas? thanks