diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/App.jsx b/src/App.jsx index 4d9fa1e..18cddbd 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -3,7 +3,7 @@ import 'bootstrap/dist/css/bootstrap.min.css'; import Diagramm from "./components/Diagramm.jsx"; import HistoryTable from "./components/HistoryTable.jsx"; import CurrentDataChart from "./components/CurrentDataChart.jsx"; -import RegressionShart from "./components/RegressionShart.jsx"; +import LivePreview from "./components/LivePreview.jsx"; /** * @component App @@ -70,6 +70,8 @@ export default function App() { + + ) diff --git a/src/components/LivePreview.jsx b/src/components/LivePreview.jsx new file mode 100644 index 0000000..15acc47 --- /dev/null +++ b/src/components/LivePreview.jsx @@ -0,0 +1,39 @@ +import React, { useState } from 'react'; + +function LivePreview() { + const [showStream, setShowStream] = useState(true); + + // Ersetze die IP mit der IP deines Raspberry Pi + const streamUrl = "http://172.20.10.2:8000/video_feed"; + + return ( +
+

Raspberry Pi Live Kamera

+ +
+ +
+ + {showStream ? ( +
+ Kamera Live Stream { + e.target.src = "https://via.placeholder.com/640x480?text=Kamera+nicht+erreichbar"; + }} + /> +
+ ) : ( +
+ Stream ist pausiert +
+ )} +
+ ); +} + +export default LivePreview; \ No newline at end of file