diff --git a/client/src/pages/VideoPage.tsx b/client/src/pages/VideoPage.tsx index a7fa0d3..2f17e46 100644 --- a/client/src/pages/VideoPage.tsx +++ b/client/src/pages/VideoPage.tsx @@ -152,10 +152,13 @@ export default function VideoPage() { // Update page title document.title = `${currentVideo.title} | go4.video`; - // Update meta description + // Update meta description with original or rich content const metaDescription = document.querySelector('meta[name="description"]'); if (metaDescription) { - metaDescription.setAttribute('content', currentVideo.description || `Watch ${currentVideo.title} on go4.video`); + const descriptionContent = currentVideo.description && currentVideo.description.trim() !== '' + ? currentVideo.description + : `Schauen Sie sich "${currentVideo.title}" auf go4.video an. Professionelle Video-Streaming-Plattform mit exklusivem Content von FOLX STADL, Geschichte des Liedes und weiteren Premium-Inhalten.`; + metaDescription.setAttribute('content', descriptionContent); } // Update Open Graph tags @@ -170,7 +173,13 @@ export default function VideoPage() { }; updateMetaTag('og:title', currentVideo.title); - updateMetaTag('og:description', currentVideo.description || `Watch ${currentVideo.title} on go4.video`); + + // Use original description if available, otherwise create rich description + const richDescription = currentVideo.description && currentVideo.description.trim() !== '' + ? currentVideo.description + : `Schauen Sie sich "${currentVideo.title}" auf go4.video an. Professionelle Video-Streaming-Plattform mit exklusivem Content von FOLX STADL, Geschichte des Liedes und weiteren Premium-Inhalten.`; + + updateMetaTag('og:description', richDescription); // Uporabljan cache-busting parameter za social media refresh const timestamp = new Date().getTime(); const socialThumbnail = `${window.location.origin}/api/video-thumbnail/${currentVideo.id}?v=${timestamp}`; @@ -183,6 +192,7 @@ export default function VideoPage() { updateMetaTag('og:type', 'video.other'); updateMetaTag('og:video:duration', currentVideo.duration.toString()); updateMetaTag('og:site_name', 'go4.video'); + updateMetaTag('og:locale', 'de_DE'); // Update Twitter Card tags const updateTwitterTag = (name: string, content: string) => { @@ -197,7 +207,7 @@ export default function VideoPage() { updateTwitterTag('twitter:card', 'summary_large_image'); updateTwitterTag('twitter:title', currentVideo.title); - updateTwitterTag('twitter:description', currentVideo.description || `Watch ${currentVideo.title} on go4.video`); + updateTwitterTag('twitter:description', richDescription); updateTwitterTag('twitter:image', socialThumbnail); updateTwitterTag('twitter:image:alt', `${currentVideo.title} - go4.video`); updateTwitterTag('twitter:site', '@go4video');