From 48ca432a9c22b7020e4162db8717e4ec05fd2438 Mon Sep 17 00:00:00 2001 From: sylenien Date: Wed, 31 Aug 2022 15:26:02 +0200 Subject: [PATCH] fix(player): don't show video box if there is no stream --- .../Assist/components/VideoContainer/VideoContainer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app/components/Assist/components/VideoContainer/VideoContainer.tsx b/frontend/app/components/Assist/components/VideoContainer/VideoContainer.tsx index c6fb7c585..bff02fb0c 100644 --- a/frontend/app/components/Assist/components/VideoContainer/VideoContainer.tsx +++ b/frontend/app/components/Assist/components/VideoContainer/VideoContainer.tsx @@ -20,7 +20,7 @@ function VideoContainer({ stream, muted = false, height = 280 }: Props) { if (!stream) { return } const iid = setInterval(() => { const settings = stream.getVideoTracks()[0]?.getSettings() - const isDummyVideoTrack = settings ? (settings.width === 2 || settings.frameRate === 0) : true + const isDummyVideoTrack = settings ? (settings.width === 2 || settings.frameRate === 0 || !settings.frameRate && !settings.width) : true const shouldBeEnabled = !isDummyVideoTrack isEnabled !== shouldBeEnabled ? setEnabled(shouldBeEnabled) : null; }, 500)