From f82de81e998aff2379c0549e85130881e6d97ef7 Mon Sep 17 00:00:00 2001 From: Jon Mulhern <81927768+curlyfriesplease@users.noreply.github.com> Date: Mon, 20 Apr 2026 17:24:52 +0100 Subject: [PATCH 1/2] Limits the ability of the StyledVideo component to load in both video files --- src/components/Atoms/AmbientVideo/AmbientVideo.js | 12 +++++++++--- .../__snapshots__/PictureOrVideo.test.js.snap | 10 +++++++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/components/Atoms/AmbientVideo/AmbientVideo.js b/src/components/Atoms/AmbientVideo/AmbientVideo.js index af41547f4..203131a70 100644 --- a/src/components/Atoms/AmbientVideo/AmbientVideo.js +++ b/src/components/Atoms/AmbientVideo/AmbientVideo.js @@ -20,6 +20,8 @@ import { // Normalise webpack module object ({ default }) or string to video URL const normaliseSrc = value => (typeof value === 'string' ? value : value?.default); +const belowLBreakpointMediaString = `(max-width: ${breakpointValues.L - 1}px)`; + const AmbientVideo = ({ src, srcMobile, @@ -32,8 +34,9 @@ const AmbientVideo = ({ const videoRef = useRef(null); const [isPlaying, setIsPlaying] = useState(true); const isBelowL = useMediaQuery({ maxWidth: breakpointValues.L - 1 }); - const rawSrc = srcMobile && isBelowL ? srcMobile : src; - const effectiveSrc = normaliseSrc(rawSrc); + const desktopSrc = normaliseSrc(src); + const mobileSrc = srcMobile ? normaliseSrc(srcMobile) : null; + //