mirror of
https://github.com/yusufipk/OpenFrame.git
synced 2026-09-11 17:46:06 +00:00
Add multi-file drag-and-drop queues for project videos and the assets pane, and route asset video uploads through S3/R2 when direct Bunny uploads are disabled.
31 lines
969 B
TypeScript
31 lines
969 B
TypeScript
import { VideoPageContent } from '@/components/video-page-content';
|
|
import { ShareLinkBootstrap } from '@/components/share-link-bootstrap';
|
|
import { ShareLinkUnlock } from '@/components/share-link-unlock';
|
|
import { isS3VideoUploadsEnabled } from '@/lib/feature-flags';
|
|
|
|
interface WatchPageProps {
|
|
params: Promise<{ videoId: string }>;
|
|
searchParams: Promise<{ shareToken?: string; unlock?: string }>;
|
|
}
|
|
|
|
export default async function WatchPage({ params, searchParams }: WatchPageProps) {
|
|
const { videoId } = await params;
|
|
const { shareToken, unlock } = await searchParams;
|
|
|
|
if (typeof shareToken === 'string' && shareToken.length > 0) {
|
|
return <ShareLinkBootstrap videoId={videoId} shareToken={shareToken} />;
|
|
}
|
|
|
|
if (unlock === '1') {
|
|
return <ShareLinkUnlock videoId={videoId} />;
|
|
}
|
|
|
|
return (
|
|
<VideoPageContent
|
|
mode="watch"
|
|
videoId={videoId}
|
|
directUploadProvider={isS3VideoUploadsEnabled() ? 'r2' : 'bunny'}
|
|
/>
|
|
);
|
|
}
|