diff --git a/RELEASE.rst b/RELEASE.rst index e9bb08b0e8..dff5e5b850 100644 --- a/RELEASE.rst +++ b/RELEASE.rst @@ -1,6 +1,11 @@ Release Notes ============= +Version 0.66.7 +-------------- + +- fix: add video captions on the video detail page (#3284) + Version 0.66.6 (Released May 06, 2026) -------------- diff --git a/frontends/main/src/app-pages/VideoPlaylistCollectionPage/VideoDetailPage.tsx b/frontends/main/src/app-pages/VideoPlaylistCollectionPage/VideoDetailPage.tsx index f425683fb9..063a1cf9a9 100644 --- a/frontends/main/src/app-pages/VideoPlaylistCollectionPage/VideoDetailPage.tsx +++ b/frontends/main/src/app-pages/VideoPlaylistCollectionPage/VideoDetailPage.tsx @@ -28,6 +28,7 @@ import { FeatureFlags } from "@/common/feature_flags" import { useFeatureFlagsLoaded } from "@/common/useFeatureFlagsLoaded" import { notFound } from "next/navigation" import SharePopover from "@/components/SharePopover/SharePopover" +import { buildVideoStructuredData } from "./videoStructuredData" const NEXT_PUBLIC_ORIGIN = process.env.NEXT_PUBLIC_ORIGIN @@ -388,7 +389,6 @@ const VideoDetailPage: React.FC = ({ const playlist = playlistData as VideoPlaylistResource | undefined const video = resource as VideoResource | undefined - const sources = useMemo( () => video @@ -406,6 +406,7 @@ const VideoDetailPage: React.FC = ({ : null const topics = video?.topics ?? [] + const captionUrls = video?.video?.caption_urls ?? [] const playlistLabel = playlist?.title || "Video Collection" @@ -442,12 +443,26 @@ const VideoDetailPage: React.FC = ({ } }, [isLoading, videoId]) + // VideoObject JSON-LD for Google search indexing. + // See: https://developers.google.com/search/docs/appearance/structured-data/video + const structuredData = !isLoading ? buildVideoStructuredData(video) : null + if (!showVideoPlaylistPage) { return flagsLoaded ? notFound() : null } return ( + {structuredData && ( + injection. + // See: https://developers.google.com/search/docs/appearance/structured-data/video + const structuredData = !isLoading ? buildVideoStructuredData(video) : null + if (!showVideoPlaylistPage) { return flagsLoaded ? notFound() : null } return ( + {structuredData && ( +