From 63d1a68d99b1d7b6e4ae81ffaf05c0030aa86445 Mon Sep 17 00:00:00 2001 From: Adam Shiervani Date: Tue, 14 Oct 2025 15:53:36 +0200 Subject: [PATCH] feat: hide video if there are connectionIssues --- ui/src/components/WebRTCVideo.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/src/components/WebRTCVideo.tsx b/ui/src/components/WebRTCVideo.tsx index 64452bf8..65d39971 100644 --- a/ui/src/components/WebRTCVideo.tsx +++ b/ui/src/components/WebRTCVideo.tsx @@ -23,7 +23,7 @@ import { PointerLockBar, } from "./VideoOverlay"; -export default function WebRTCVideo() { +export default function WebRTCVideo({ hasConnectionIssues }: { hasConnectionIssues: boolean }) { // Video and stream related refs and states const videoElm = useRef(null); const { mediaStream, peerConnectionState } = useRTCStore(); @@ -527,9 +527,10 @@ export default function WebRTCVideo() { "max-h-full min-h-[384px] max-w-full min-w-[512px] bg-black/50 object-contain transition-all duration-1000", { "cursor-none": settings.isCursorHidden, - "opacity-0": + "!opacity-0": isVideoLoading || hdmiError || + hasConnectionIssues || peerConnectionState !== "connected", "opacity-60!": showPointerLockBar, "animate-slideUpFade border border-slate-800/30 shadow-xs dark:border-slate-300/20":