From d78ece0dfd4b3c9008bc03acf99bef9ed518b75d Mon Sep 17 00:00:00 2001 From: Marc Wieland Date: Sun, 18 May 2025 00:47:15 +0200 Subject: [PATCH] Video test integration --- package-lock.json | 10 ++++++ package.json | 1 + src/main.tsx | 5 +++ src/pages/VideosPage.tsx | 73 ++++++++++++++++++++++++++++++++++++++++ tailwind.config.ts | 1 + 5 files changed, 90 insertions(+) create mode 100644 src/pages/VideosPage.tsx diff --git a/package-lock.json b/package-lock.json index 7867cf52d..6cd1129bb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,6 +37,7 @@ "@radix-ui/react-toggle-group": "^1.1.0", "@radix-ui/react-tooltip": "^1.1.4", "@react-pdf/renderer": "^4.3.0", + "@tailwindcss/aspect-ratio": "^0.4.2", "@tanstack/react-query": "^5.56.2", "aos": "^2.3.4", "axios": "^1.9.0", @@ -3153,6 +3154,15 @@ "@swc/counter": "^0.1.3" } }, + "node_modules/@tailwindcss/aspect-ratio": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/aspect-ratio/-/aspect-ratio-0.4.2.tgz", + "integrity": "sha512-8QPrypskfBa7QIMuKHg2TA7BqES6vhBrDLOv8Unb6FcFyd3TjKbc6lcmb9UPQHxfl24sXoJ41ux/H7qQQvfaSQ==", + "license": "MIT", + "peerDependencies": { + "tailwindcss": ">=2.0.0 || >=3.0.0 || >=3.0.0-alpha.1" + } + }, "node_modules/@tailwindcss/line-clamp": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/@tailwindcss/line-clamp/-/line-clamp-0.4.4.tgz", diff --git a/package.json b/package.json index 9b1ed86bb..fbb28a022 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "@radix-ui/react-toggle-group": "^1.1.0", "@radix-ui/react-tooltip": "^1.1.4", "@react-pdf/renderer": "^4.3.0", + "@tailwindcss/aspect-ratio": "^0.4.2", "@tanstack/react-query": "^5.56.2", "aos": "^2.3.4", "axios": "^1.9.0", diff --git a/src/main.tsx b/src/main.tsx index b1bbccfda..2edf3db93 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -34,6 +34,7 @@ import Satzung from "./pages/Satzung"; import Beitraege from "./pages/Beitraege"; import { ThemeProvider } from "@/context/ThemeContext"; +import VideosPage from "./pages/VideosPage"; @@ -75,6 +76,9 @@ ReactDOM.createRoot(document.getElementById("root")!).render( } /> } /> } /> + } /> + + } /> } /> } /> @@ -89,6 +93,7 @@ ReactDOM.createRoot(document.getElementById("root")!).render( } /> } /> + diff --git a/src/pages/VideosPage.tsx b/src/pages/VideosPage.tsx new file mode 100644 index 000000000..e2d2857f1 --- /dev/null +++ b/src/pages/VideosPage.tsx @@ -0,0 +1,73 @@ +import { useRef } from "react"; +import { Rewind, FastForward, Pause, Play } from "lucide-react"; + +const VideosPage = () => { + const videoRef = useRef(null); + + const skip = (seconds: number) => { + if (videoRef.current) { + videoRef.current.currentTime += seconds; + } + }; + + const togglePlayPause = () => { + const video = videoRef.current; + if (!video) return; + if (video.paused) { + video.play(); + } else { + video.pause(); + } + }; + + return ( +
+

+ Trainingsvideo: Satz 1 +

+ +
+ + + {/* Custom Steuerung */} +
+ + + +
+
+
+ ); +}; + +export default VideosPage; diff --git a/tailwind.config.ts b/tailwind.config.ts index dc69d7da5..a6568cdac 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -114,5 +114,6 @@ export default { plugins: [ require("tailwindcss-animate"), require("@tailwindcss/typography"), + require('@tailwindcss/aspect-ratio') ], } satisfies Config;