From 1066402619d6fe03cc9a2ed16a8919fd3df91fee Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Sat, 30 Aug 2025 20:00:13 +0000 Subject: [PATCH] Improve video sharing by using custom thumbnails when available Update `client/src/pages/VideoPage.tsx` to prioritize `customThumbnailUrl` over `thumbnailUrl` for Open Graph and Twitter meta tags, enhancing social sharing previews. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 074b0e4c-6171-43bd-aa98-f9e04623ca14 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/074b0e4c-6171-43bd-aa98-f9e04623ca14/Sy6XHzr --- client/src/pages/VideoPage.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/pages/VideoPage.tsx b/client/src/pages/VideoPage.tsx index 2b08cec..6d4b0e9 100644 --- a/client/src/pages/VideoPage.tsx +++ b/client/src/pages/VideoPage.tsx @@ -95,7 +95,9 @@ export default function VideoPage() { updateMetaTag('og:title', currentVideo.title); updateMetaTag('og:description', currentVideo.description || `Watch ${currentVideo.title} on go4.video`); - updateMetaTag('og:image', currentVideo.thumbnailUrl); + // Use custom thumbnail if available, otherwise default thumbnail + const thumbnailForSharing = currentVideo.customThumbnailUrl || currentVideo.thumbnailUrl; + updateMetaTag('og:image', thumbnailForSharing); updateMetaTag('og:url', window.location.href); updateMetaTag('og:type', 'video.other'); updateMetaTag('og:video:duration', currentVideo.duration.toString()); @@ -113,7 +115,7 @@ export default function VideoPage() { updateTwitterTag('twitter:title', currentVideo.title); updateTwitterTag('twitter:description', currentVideo.description || `Watch ${currentVideo.title} on go4.video`); - updateTwitterTag('twitter:image', currentVideo.thumbnailUrl); + updateTwitterTag('twitter:image', thumbnailForSharing); } }, [currentVideo]);