Please tell me where you can find the listing of the simplest code for capturing data from the camera and sending it in real time to an rtmp server.

With the flash for the first time I started working, I only achieved that the camera turns on 1 shot and sends it. I tried to send data through setInterval (fun, 20), so it turns out huge delays and in general somehow it is not correct.