diff --git a/ESP32CAM-ONVIF/web_config.cpp b/ESP32CAM-ONVIF/web_config.cpp new file mode 100644 index 0000000..eee277c --- /dev/null +++ b/ESP32CAM-ONVIF/web_config.cpp @@ -0,0 +1,27 @@ +#include "web_config.h" +#include +#include +#include "rtsp_server.h" + +WebServer webConfigServer(80); + +void handle_root() { + String html = "J0X ESP32-CAM Config" + "

ESP32-CAM Configuration

" + "

WiFi IP: " + WiFi.localIP().toString() + "

" + "

RTSP Stream: " + getRTSPUrl() + "

" + "

ONVIF Service: http://" + WiFi.localIP().toString() + ":8000/onvif/device_service

" + "" + ""; + webConfigServer.send(200, "text/html", html); +} + +void web_config_start() { + webConfigServer.on("/", HTTP_GET, handle_root); + webConfigServer.begin(); + Serial.println("[INFO] Web config server started."); +} + +void web_config_loop() { + webConfigServer.handleClient(); +}