fix; camera frame fixed & making UI more accessible
CD — Kai-Sa-Cam Deployment / deploy (push) Failing after 11s

This commit is contained in:
2026-10-28 18:25:32 +01:00
parent dc24709d7f
commit fa73617d53
8 changed files with 34 additions and 27 deletions
+1 -1
View File
@@ -27,4 +27,4 @@ jobs:
git pull --ff-only origin main
docker compose --profile prod build --progress=plain
docker compose --profile prod up -d --force-recreate kai-sa-go2rtc kai-sa-cam
docker image prune -af
docker image prune -afb
Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 KiB

+10 -10
View File
@@ -82,7 +82,7 @@ export function App() {
return (
<div className="min-h-screen flex flex-col">
<section className="relative mx-auto w-[90%] h-[75vh] mt-[5vh]">
<section className="relative mx-auto w-[95%] h-[90vh] mt-[3vh]">
<header className="absolute z-[2] top-0 left-0 flex items-center">
<img
src="/logo.png"
@@ -92,10 +92,10 @@ export function App() {
</header>
{sessionExpired && (
<div className="absolute z-[3] top-[calc(10vh+1rem)] left-0 right-0 glass-card px-6 py-2 flex items-center justify-between rounded-[50px] text-sm">
<div className="absolute z-[3] top-[calc(10vh+0.75rem)] left-0 right-0 glass-card px-6 py-2 flex items-center justify-between rounded-[50px] text-base">
<span>Session expirée.</span>
<button
className="glass-button px-4 py-1 rounded-[50px] text-sm font-medium"
className="glass-button px-4 py-1 rounded-[50px] text-base font-medium"
onClick={() => reauthenticate().catch(() => {})}
>
Se reconnecter
@@ -106,7 +106,7 @@ export function App() {
<main className="absolute inset-0 flex flex-col">
<nav className="mx-auto mt-[12vh] flex gap-2 trans-bloc p-1 rounded-[50px] w-fit">
<button
className={`px-8 py-2 rounded-[50px] text-sm md:text-base transition-all ${
className={`px-10 py-2.5 rounded-[50px] text-base md:text-lg transition-all ${
activeTab === "live"
? "glass-button font-medium"
: "bg-transparent hover:opacity-80"
@@ -116,7 +116,7 @@ export function App() {
Live
</button>
<button
className={`px-8 py-2 rounded-[50px] text-sm md:text-base transition-all ${
className={`px-10 py-2.5 rounded-[50px] text-base md:text-lg transition-all ${
activeTab === "media"
? "glass-button font-medium"
: "bg-transparent hover:opacity-80"
@@ -128,8 +128,8 @@ export function App() {
</nav>
{activeTab === "live" ? (
<div className="flex-1 flex flex-col items-center gap-4 mt-4 px-2 overflow-auto no-scrollbar">
<div className="w-full h-[50vh] rounded-[30px] overflow-hidden glass-card">
<div className="flex-1 flex flex-col items-center gap-5 mt-5 px-2 overflow-auto no-scrollbar">
<div className="w-full flex-1 min-h-[55vh] rounded-[30px] overflow-hidden glass-card">
{/* Même origine => même session Access, plus de stream.esiah.dev.
Le key force le rechargement du flux après une reconnexion. */}
<VideoPlayer
@@ -137,7 +137,7 @@ export function App() {
streamUrl="/go2rtc/stream.html?src=webcam&mode=mse"
/>
</div>
<div className="w-full max-w-4xl">
<div className="w-full max-w-6xl">
<Controls
isRecording={isRecording}
recordingTime={recordingTime}
@@ -151,13 +151,13 @@ export function App() {
/>
</div>
{(recError || talkError) && (
<div className="text-red-400 text-sm text-center px-4 error-message">
<div className="text-red-400 text-base text-center px-4 error-message">
{recError || talkError}
</div>
)}
</div>
) : (
<div className="flex-1 flex flex-col mt-4 px-2 overflow-auto no-scrollbar">
<div className="flex-1 flex flex-col mt-5 px-2 overflow-auto no-scrollbar">
<MediaGallery />
</div>
)}
+8 -8
View File
@@ -28,12 +28,12 @@ export function Controls({
};
return (
<div className="glass-card p-4 rounded-[50px] flex flex-col md:flex-row items-center justify-between gap-4">
<div className="glass-card p-5 rounded-[50px] flex flex-col md:flex-row items-center justify-between gap-5">
<div className="flex items-center gap-3">
<button
onClick={onRecord}
disabled={disabled}
className={`px-6 py-2 rounded-[50px] text-sm font-medium transition-all ${
className={`px-7 py-2.5 rounded-[50px] text-base font-medium transition-all ${
isRecording
? "bg-red-500/30 text-red-200 border border-red-400/40"
: "glass-button"
@@ -46,15 +46,15 @@ export function Controls({
<button
onClick={onSnapshot}
disabled={disabled}
className="px-6 py-2 rounded-[50px] text-sm font-medium glass-button"
className="px-7 py-2.5 rounded-[50px] text-base font-medium glass-button"
>
Capture
</button>
</div>
<div className="flex items-center gap-4">
<div className="flex items-center gap-2">
<span className="text-xs opacity-80">Gain micro</span>
<div className="flex items-center gap-5">
<div className="flex items-center gap-3">
<span className="text-sm opacity-80">Gain micro</span>
<input
type="range"
min="0.2"
@@ -62,13 +62,13 @@ export function Controls({
step="0.1"
value={gain}
onChange={(e) => onGainChange(Number(e.target.value))}
className="w-28 accent-white"
className="w-32 accent-white"
/>
</div>
<button
onClick={onTalk}
disabled={disabled}
className={`px-6 py-2 rounded-[50px] text-sm font-medium transition-all ${
className={`px-7 py-2.5 rounded-[50px] text-base font-medium transition-all ${
isTalking
? "bg-blue-400/30 text-blue-100 border border-blue-300/40"
: "glass-button"
+4 -4
View File
@@ -76,19 +76,19 @@ export function MediaGallery() {
return (
<div className="flex-1 flex flex-col p-4 gap-4 overflow-y-auto">
<div className="flex justify-between items-center glass-card px-4 py-2 rounded-[50px]">
<span className="text-sm opacity-80">{media.length} fichiers</span>
<div className="flex justify-between items-center glass-card px-5 py-2.5 rounded-[50px]">
<span className="text-base opacity-80">{media.length} fichiers</span>
<div className="flex gap-2">
<button
onClick={fetchMedia}
className="px-4 py-1 text-xs glass-button rounded-[50px]"
className="px-5 py-1.5 text-sm glass-button rounded-[50px]"
>
Actualiser
</button>
{media.length > 0 && (
<button
onClick={handleExportAll}
className="px-4 py-1 text-xs glass-button rounded-[50px]"
className="px-5 py-1.5 text-sm glass-button rounded-[50px]"
>
Tout télécharger et vider
</button>
+1 -1
View File
@@ -7,7 +7,7 @@ export function VideoPlayer({ streamUrl }: VideoPlayerProps) {
<div className="w-full h-full relative bg-black overflow-hidden flex items-center justify-center">
<iframe
src={streamUrl}
className="w-full h-full border-none absolute inset-0"
className="w-full h-full border-none absolute inset-0 scale-[1.02]"
allow="autoplay; encrypted-media; fullscreen"
title="Flux caméra"
/>
+10 -3
View File
@@ -23,9 +23,16 @@
body {
margin: 0;
font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, sans-serif;
background-image: url(/background_img.jpg);
font-family:
Poppins,
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
"Helvetica Neue",
Arial,
sans-serif;
background-image: url(/background_img.png);
background-size: cover;
background-position: center;
background-attachment: fixed;