From d9514e23d7b06a70efaf9822cc168d92fdc4b8d1 Mon Sep 17 00:00:00 2001 From: Julian Vollmer Date: Mon, 18 May 2026 15:49:33 +0200 Subject: [PATCH] Add fullscreen live view at /live MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Schwarzer Hintergrund, Stream füllt den ganzen Bildschirm (object-fit: cover) - Overlay mit Uhrzeit und Einstellungs-Link erscheint bei Tap/Klick, blendet sich nach 3s aus - Vollbild-Button nutzt Fullscreen API - Auf Handys wird automatisch Landscape angefragt - Stream-Box auf Hauptseite ist jetzt klickbar und verlinkt auf /live Co-Authored-By: Claude Sonnet 4.6 --- app/main.py | 6 ++ app/templates/index.html | 22 ++-- app/templates/live.html | 214 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 232 insertions(+), 10 deletions(-) create mode 100644 app/templates/live.html diff --git a/app/main.py b/app/main.py index b994b5b..e45e02b 100644 --- a/app/main.py +++ b/app/main.py @@ -139,6 +139,12 @@ def index(): return render_template("index.html", status=status) +@app.route("/live") +def live(): + status = get_system_status() + return render_template("live.html", status=status) + + @app.route("/api/status") def api_status(): return jsonify(get_system_status()) diff --git a/app/templates/index.html b/app/templates/index.html index 96dccd0..7be8545 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -194,16 +194,18 @@
-
- {% if status.cam_available %} - Kamera-Stream - {% else %} -
- Kamera nicht verfügbar
- Ribbon-Kabel verbunden? -
- {% endif %} -
+ +
+ {% if status.cam_available %} + Kamera-Stream + {% else %} +
+ Kamera nicht verfügbar
+ Ribbon-Kabel verbunden? +
+ {% endif %} +
+
diff --git a/app/templates/live.html b/app/templates/live.html new file mode 100644 index 0000000..afa56d5 --- /dev/null +++ b/app/templates/live.html @@ -0,0 +1,214 @@ + + + + + + Babycam – Live + + + + +{% if status.cam_available %} + Babycam Live-Stream +{% else %} +
+ 📷 +

Kamera nicht verbunden

+
+{% endif %} + +
+ +
+
+
+ Babycam Live +
+ +
+ + + + + + +