From ee39686e0f9c53cfc41d0d6554d90e6904b51ef6 Mon Sep 17 00:00:00 2001 From: AndyEPhipps Date: Tue, 3 Oct 2023 10:57:04 +0100 Subject: [PATCH] Tidyup, post video length test' --- src/components/Molecules/Promo/Promo.js | 3 +-- src/components/Molecules/Promo/Promo.md | 15 +++++++-------- src/components/Molecules/Promo/Promo.style.js | 6 ------ 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/components/Molecules/Promo/Promo.js b/src/components/Molecules/Promo/Promo.js index 1238d03fd..2b5f09b85 100644 --- a/src/components/Molecules/Promo/Promo.js +++ b/src/components/Molecules/Promo/Promo.js @@ -42,8 +42,7 @@ const Promo = ({ if (videoEl.current.duration) { // Calculate the percentage of the video played: const percentage = Math.round((videoEl.current.currentTime / videoEl.current.duration) * 100); - // setVideoProgress(percentage); - + // Rounding const nearest = 1; const roundedPercentage = (percentage + nearest / 2) - ((percentage + nearest / 2) % nearest); setVideoProgress(roundedPercentage); diff --git a/src/components/Molecules/Promo/Promo.md b/src/components/Molecules/Promo/Promo.md index 4311a4c71..b6cc6c3ce 100644 --- a/src/components/Molecules/Promo/Promo.md +++ b/src/components/Molecules/Promo/Promo.md @@ -156,10 +156,9 @@ Promo w/Video const defaultData = require('../../../styleguide/data/data').defaultData;import Text from '../../Atoms/Text/Text'; import Link from '../../Atoms/Link/Link'; import poster from '../../../styleguide/assets/VideoBannerPosterImage.png'; -const shortVideoSrc = - 'https://videos.ctfassets.net/zsfivwzfgl3t/6E6MTXiKrqCNviLx6uW9L9/54554151bc846a9946c5cae17533ec64/6-second-video.mp4'; -const longVideoSrc = - 'https://videos.ctfassets.net/zsfivwzfgl3t/5ZHe4jVngF1uAVeSXEQdNI/8ac0c9ab100e610adb8f3bff6a113e14/15-second-video.mp4'; +const src = + 'https://www.comicrelief.com/sites/default/files/downloads/Creativists_Logo_Web_small_V2_0.mp4'; +
@@ -174,7 +173,7 @@ const longVideoSrc = copyLeft={true} hasOverlay={true} position="upper" - video={shortVideoSrc} + video={src} poster={poster} > @@ -255,7 +254,7 @@ const longVideoSrc = copyLeft={true} hasOverlay={true} position="lower" - video={shortVideoSrc} + video={src} poster={poster} autoPlay={false} > @@ -294,7 +293,7 @@ const longVideoSrc = imageAltText="" copyLeft={false} hasOverlay={true} - video={shortVideoSrc} + video={src} loop={false} poster={poster} autoPlay={false} diff --git a/src/components/Molecules/Promo/Promo.style.js b/src/components/Molecules/Promo/Promo.style.js index 03f7da07c..b94eb7d31 100644 --- a/src/components/Molecules/Promo/Promo.style.js +++ b/src/components/Molecules/Promo/Promo.style.js @@ -140,12 +140,6 @@ const PlayButtonWrapper = styled.div` // opacity: 1; // debug } } - - // Reposition button accordingly: - // ${({ percentLeft }) => percentLeft && css` - // top: ${percentLeft}px; // lol - // `} - `; export {