+
+ {playbackError ? (
+
+ {playbackError}
+
+ ) : (
+
+ Preview uses YouTube's embed player. Trim points are approximate in the preview;
+ smart cut produces frame-accurate cuts after download.
+
+ )}
+
+ );
+}
diff --git a/components/youtube-import/YouTubeImportModal.tsx b/components/youtube-import/YouTubeImportModal.tsx
index 7217abec..0eb7b226 100644
--- a/components/youtube-import/YouTubeImportModal.tsx
+++ b/components/youtube-import/YouTubeImportModal.tsx
@@ -10,6 +10,7 @@ import {
YouTubePreviewPlayer,
type YouTubePlayerHandle,
} from '@/components/youtube-import/YouTubePreviewPlayer';
+import { YouTubeEmbedPreviewPlayer } from '@/components/youtube-import/YouTubeEmbedPreviewPlayer';
import { Button } from '@/components/ui/button';
import {
AlertDialog,
@@ -37,6 +38,7 @@ import {
isActiveYoutubeImportStatus,
} from '@/lib/youtube-import/import-job-ui';
import type { ApiResponse, Livestream, YoutubeImportJob } from '@/types';
+import type { YouTubeImportResolvedSource } from '@/lib/youtube-import/resolve-source';
/** Poll interval for in-flight import jobs (matches draft upload polling). */
const IMPORT_JOB_POLL_INTERVAL_MS = 3000;
@@ -50,18 +52,12 @@ const LIVESTREAM_IMPORT_PAGE_SIZE = 2;
type YouTubeImportModalStep = 'source' | 'editor' | 'progress';
/**
- * Resolved YouTube source metadata from the resolve API.
+ * Resolved YouTube source stored in modal state, matching the resolve API plus caller context.
*/
-interface ResolvedYouTubeSource {
- youtubeVideoId: string;
- title: string;
- durationSeconds: number;
- thumbnailUrl: string;
- previewStreamUrl: string;
- previewExpiresAt: number;
+type ResolvedYouTubeSource = YouTubeImportResolvedSource & {
sourceUrl?: string;
livestreamId?: string;
-}
+};
interface LivestreamsListResponse extends ApiResponse