@@ -2,13 +2,7 @@ import { Button } from "@/components/ui/button";
22import { Card , CardContent } from "@/components/ui/card" ;
33import { useUser } from "@clerk/tanstack-start" ;
44import { getAuth } from "@clerk/tanstack-start/server" ;
5- import { Separator } from "@radix-ui/react-dropdown-menu" ;
6- import {
7- Link ,
8- createFileRoute ,
9- notFound ,
10- redirect ,
11- } from "@tanstack/react-router" ;
5+ import { Link , createFileRoute , notFound } from "@tanstack/react-router" ;
126import { createServerFn } from "@tanstack/start" ;
137import { getWebRequest } from "@tanstack/start/server" ;
148import { MediaPlayer , MediaProvider , Poster } from "@vidstack/react" ;
@@ -31,6 +25,7 @@ import { ViewIncrementer } from "../components/view-incrementer";
3125import { WordyDate } from "../components/wordy-date" ;
3226import { getVideoDataServerFn } from "../server-fns/video-player" ;
3327import { seo } from "@/lib/seo" ;
28+ import { Footer } from "@/components/footer" ;
3429
3530const fetchVideoData = createServerFn ( { method : "POST" } )
3631 . validator ( z . object ( { videoId : z . string ( ) } ) )
@@ -95,7 +90,7 @@ function RouteComponent() {
9590 videoDuration = { videoData . videoLengthSeconds }
9691 />
9792 ) }
98- < header className = "max-h-16 h-16 flex justify-between items-center px-4" >
93+ < header className = "max-h-16 h-16 flex justify-between items-center px-4 p-2 " >
9994 < Link className = "flex items-center" to = "/" preload = "render" >
10095 < button
10196 className = "flex-shrink-0 flex items-center z-10"
@@ -121,7 +116,7 @@ function RouteComponent() {
121116 </ header >
122117 < div className = "flex gap-4 p-4 max-w-full overflow-x-hidden h-full flex-col xl:flex-row" >
123118 < MediaPlayer
124- className = "w-full aspect-video rounded-lg overflow-hidden"
119+ className = "w-full rounded-lg overflow-hidden"
125120 // biome-ignore lint/suspicious/noExplicitAny: types are fine
126121 src = { videoSources as any }
127122 viewType = "video"
@@ -131,19 +126,17 @@ function RouteComponent() {
131126 poster = { video . largeThumbnailUrl ?? undefined }
132127 duration = { videoData . videoLengthSeconds ?? undefined }
133128 storage = "player"
129+ controlsDelay = { 500 }
130+ posterLoad = "eager"
134131 >
135- < MediaProvider >
136- { video . largeThumbnailUrl !== null && (
137- < Poster className = "vds-poster" src = { video . largeThumbnailUrl } />
138- ) }
139- </ MediaProvider >
132+ < MediaProvider />
140133 < DefaultVideoLayout
141134 icons = { defaultLayoutIcons }
142135 thumbnails = { video . storyboard }
143136 />
144137 </ MediaPlayer >
145138 < div className = "flex flex-col gap-4 min-w-96 w-96 grow" >
146- < Card className = "border-none shadow-none" >
139+ < Card className = "border-none shadow-none bg-transparent " >
147140 < CardContent className = "p-0 space-y-4" >
148141 < h1 className = "text-2xl font-bold" > { videoData . title } </ h1 >
149142 < div className = "flex flex-col md:flex-row items-start md:items-center justify-between text-sm text-muted-foreground" >
@@ -164,11 +157,11 @@ function RouteComponent() {
164157 < AuthorInfo authorId = { videoData . authorId } />
165158 </ CardContent >
166159 </ Card >
167- < Separator />
168- < Card className = "grow min-h-64 border-none shadow-none" />
160+ < Card className = "grow min-h-64 border-none shadow-none bg-transparent" />
169161 </ div >
170162 </ div >
171163 </ >
164+ < Footer />
172165 </ div >
173166 ) ;
174167}
0 commit comments