File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
apps/web/app/s/[videoId]/_components Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ export function CapVideoPlayer({
107107 const isUploading = uploadProgress ?. status === "uploading" ;
108108 const isUploadProgressPending = uploadProgress ?. status === "fetching" ;
109109
110- const resolvedSrc = useQuery ( {
110+ const resolvedSrc = useQuery < { url : string ; supportsCrossOrigin : boolean } > ( {
111111 queryKey : [ "resolvedSrc" , videoSrc ] ,
112112 queryFn :
113113 isUploadProgressPending || isUploading
@@ -156,7 +156,10 @@ export function CapVideoPlayer({
156156 const fallbackUrl = videoSrc . includes ( "?" )
157157 ? `${ videoSrc } &_t=${ timestamp } `
158158 : `${ videoSrc } ?_t=${ timestamp } ` ;
159- return { fallbackUrl, supportsCrossOrigin : enableCrossOrigin } ;
159+ return {
160+ url : fallbackUrl ,
161+ supportsCrossOrigin : enableCrossOrigin ,
162+ } ;
160163 }
161164 } ,
162165 } ) ;
@@ -284,7 +287,7 @@ export function CapVideoPlayer({
284287
285288 useEffect ( ( ) => {
286289 const video = videoRef . current ;
287- if ( ! video || ! resolvedSrc . isLoading ) return ;
290+ if ( ! video || resolvedSrc . isLoading ) return ;
288291
289292 const handleLoadedData = ( ) => {
290293 setVideoLoaded ( true ) ;
You can’t perform that action at this time.
0 commit comments