So I tried to implement a useEffect which causes handleDownload to run after we stop capturing. It works when I set the function to onClick listener to the button, however, it doesn't work when I call the function inside of handleStopCaptureClick Ideally, I want to use the same react-webcam component, but not sure I can do that, so for now this will do. Originally it downloaded the video file when clicking the button, but I want the video to be replayable as soon as I stop a recording. I have a handleDownload function which sets the video tag source with the blob I just recorded. I'm using react-webcam for this, with some functionality I've found online. Just making a video recording component that you can replay afterwards to see if you like it, if not you just re-record, and finally it will store it in the database.
0 Comments
Leave a Reply. |