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

Bmillier
Posts: 3
Joined: Sun Aug 13, 2017 12:52 am

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

Postby Bmillier » Wed Jul 24, 2019 5:36 pm

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

Who is online

Users browsing this forum: Baidu [Spider] and 71 guests