From b504a892477fb8a2fadb95acee34995920e799ac Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Sat, 2 Apr 2022 07:12:24 +1100 Subject: [PATCH] Fix video filters (#2459) --- ui/v2.5/src/components/ScenePlayer/styles.scss | 1 + .../Scenes/SceneDetails/SceneVideoFilterPanel.tsx | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/v2.5/src/components/ScenePlayer/styles.scss b/ui/v2.5/src/components/ScenePlayer/styles.scss index b2fbc7a8a..db45d1961 100644 --- a/ui/v2.5/src/components/ScenePlayer/styles.scss +++ b/ui/v2.5/src/components/ScenePlayer/styles.scss @@ -14,6 +14,7 @@ $sceneTabWidth: 450px; .video-js { height: 56.25vw; + overflow: hidden; width: 100%; @media (min-width: 1200px) { diff --git a/ui/v2.5/src/components/Scenes/SceneDetails/SceneVideoFilterPanel.tsx b/ui/v2.5/src/components/Scenes/SceneDetails/SceneVideoFilterPanel.tsx index 2da3eff64..af3beafac 100644 --- a/ui/v2.5/src/components/Scenes/SceneDetails/SceneVideoFilterPanel.tsx +++ b/ui/v2.5/src/components/Scenes/SceneDetails/SceneVideoFilterPanel.tsx @@ -109,7 +109,11 @@ export const SceneVideoFilterPanel: React.FC = ( ); function updateVideoStyle() { - const playerVideoElement = document.getElementById(VIDEO_PLAYER_ID); + const playerVideoContainer = document.getElementById(VIDEO_PLAYER_ID); + const videoElements = + playerVideoContainer?.getElementsByTagName("video") ?? []; + const playerVideoElement = + videoElements.length > 0 ? videoElements[0] : null; if (playerVideoElement != null) { let styleString = "filter:";