Page 1 of 1

ESP32-EYE- starting/stopping video stream using a switch on ESP32 board

Posted: Wed Jul 24, 2019 5:36 pm
by Bmillier
I have downloaded the camera webserver example code via the Arduino IDE and it works fine. I would like to start/stop the video stream from the ESP32 code itself (demo uses a button on the web page) using a switch on a ESP32 GPIO pin.
Nowhere in the code can I see where the video stream is turned on/off by the message sent by the web client when the Stream on/off button is pressed. The button ID is "toggle-stream", but I can't find any reference to this in the ESP32 code. Strangely however, the functions for all of the sliders on the webpage are easy enough to find in the ESP32 code.
So, I don't know how to modify code to respond to GPIO input.
Can anyone point out to me where in the Arduino example "ESP32-EYE_CameraWebserver" this stream on/off function occurs. I'm not too familiar with all the HTML code underlying the camera web-page, but surely there has to be a command going back to the ESP32-eye to start/stop the stream. There is a "Stream_handler" function in app_http.cpp that I can modify to start/stop the stream, but I don't know how this function gets called in the first place (after Start Stream button is clicked on) to start streaming after a power-up/re-boot.
Thanks in advance