Skip to content

Commit b2542e3

Browse files
committed
chore: offset video player position to hide watermarks
1 parent a797da1 commit b2542e3

3 files changed

Lines changed: 18 additions & 8 deletions

File tree

src/app/contact/page.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,22 @@ export default function Contact() {
8080
return (
8181
<div className={`${Raleway.className}`}>
8282
{/* ── Hero Section with Video Background ── */}
83-
<section className="relative w-full min-h-[320px] overflow-hidden">
83+
<section className="relative w-full min-h-[380px] overflow-hidden">
8484
{/* Video Background */}
8585
<div className="absolute inset-0">
8686
<div className="absolute inset-0 opacity-40">
8787
<VideoPlayer
8888
mp4Src="/videos/contact-background.mp4"
8989
posterSrc="/videos/cover-images/contact-background-poster.jpg"
90+
objectPosition="center 75%"
9091
/>
9192
</div>
9293
{/* Dark overlay — matches .dark-translucent-bg */}
9394
<div className="absolute inset-0 bg-black/50 hover:bg-black/60 transition-colors duration-300" />
9495
</div>
9596

9697
{/* Hero Content — accounts for 74px fixed header */}
97-
<div className="relative z-10 flex items-center justify-center min-h-[320px] pt-[74px] px-4 py-10">
98+
<div className="relative z-10 flex items-center justify-center min-h-[380px] pt-[94px] px-4 py-10">
9899
<div className="text-center max-w-3xl mx-auto">
99100
{/* Heading */}
100101
<h2
@@ -337,7 +338,7 @@ export default function Contact() {
337338
{/* Company Name */}
338339
<h3 className="text-[22px] mb-4">
339340
<span className={`${Pacifico.className} text-[#09afdf]`}>CodeBuilder</span>
340-
<span className="text-[#999] font-light">.us</span>
341+
<span className="text-[#999] font-light">, Inc.</span>
341342
</h3>
342343

343344
{/* Separator */}

src/app/services/page.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,25 +168,26 @@ export default function Services() {
168168
return (
169169
<div className={`${Raleway.className}`}>
170170
{/* ── Hero Section with Video Background ── */}
171-
<section className="relative w-full min-h-[320px] overflow-hidden">
171+
<section className="relative w-full min-h-[380px] overflow-hidden">
172172
{/* Video Background */}
173173
<div className="absolute inset-0">
174174
<div className="absolute inset-0 opacity-90">
175175
<VideoPlayer
176176
mp4Src="/videos/network-technology-services.mp4"
177177
posterSrc="/videos/cover-images/network-technology-services-poster.jpg"
178+
objectPosition="top"
178179
/>
179180
</div>
180181
{/* Dark overlay — matches .dark-translucent-bg */}
181182
<div className="absolute inset-0 bg-black/50 hover:bg-black/60 transition-colors duration-300" />
182183
</div>
183184

184185
{/* Hero Content */}
185-
<div className="relative z-10 flex items-center justify-center min-h-[320px] pt-[74px] px-4 py-10">
186+
<div className="relative z-10 flex items-center justify-center min-h-[380px] pt-[74px] px-4 py-10">
186187
<div className="text-center max-w-3xl mx-auto">
187188
{/* "Our Services" heading */}
188189
<h1
189-
className={`text-white text-[28px] font-normal mb-4 drop-shadow-md ${
190+
className={`text-white text-[28px] font-normal mb-2 drop-shadow-md ${
190191
bannerVisible ? 'animate__animated animate__zoomIn' : 'opacity-0'
191192
}`}
192193
style={{

src/components/video-player.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ interface VideoPlayerProps {
55
mp4Src: string
66
webmSrc?: string
77
posterSrc: string
8+
objectPosition?: string
89
}
910

1011
function getType(src: string): string | undefined {
@@ -14,7 +15,7 @@ function getType(src: string): string | undefined {
1415
return undefined
1516
}
1617

17-
const VideoPlayer: React.FC<VideoPlayerProps> = ({ mp4Src, webmSrc, posterSrc }) => {
18+
const VideoPlayer: React.FC<VideoPlayerProps> = ({ mp4Src, webmSrc, posterSrc, objectPosition = 'center' }) => {
1819
const videoRef = useRef<HTMLVideoElement>(null)
1920
const [isPlaying, setIsPlaying] = useState(false)
2021
const retryTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null)
@@ -75,14 +76,21 @@ const VideoPlayer: React.FC<VideoPlayerProps> = ({ mp4Src, webmSrc, posterSrc })
7576
return (
7677
<div className="relative w-full h-full">
7778
{/* Poster/still image — always rendered underneath, visible until video plays */}
78-
<img src={posterSrc} alt="" aria-hidden="true" className="absolute inset-0 w-full h-full object-cover" />
79+
<img
80+
src={posterSrc}
81+
alt=""
82+
aria-hidden="true"
83+
className="absolute inset-0 w-full h-full object-cover"
84+
style={{ objectPosition }}
85+
/>
7986

8087
{/* Video element — layered on top, fades in once playing */}
8188
<video
8289
ref={videoRef}
8390
className={`absolute inset-0 w-full h-full object-cover transition-opacity duration-700 ${
8491
isPlaying ? 'opacity-100' : 'opacity-0'
8592
}`}
93+
style={{ objectPosition }}
8694
poster={posterSrc}
8795
autoPlay
8896
playsInline

0 commit comments

Comments
 (0)