How to access a device webcam and auto save the frames into the device without clicking any single button for capturing and saving?

I am working on a project which takes video input from user and puts the prediction and sends the video frames to the users. As it is easy on my device as it does not need any permission to access. But when it comes to the client side it asks for capturing and saving the frames which is a irritating task. I want a solution that it has to take the device camera permission and autosave the video frames into the device.

I tried opening the device camera using python OpenCV. It works fine with my system, but when it comes to the deployment stage python is unable to open the user device camera. I am searching for a solution which can open device camera using Javascript and autosave the video frames into the device without any single click for capturing and saving the frames.