{/* Header */}
{title}
{channelName && (
{channelName}
)}
{/* Player — wait for metadata, then show local file or YouTube embed */}
{videoLoading ? (
) : localUrl ? (
) : (
)}
{/* Download progress bar (shows while downloading, disappears when done) */}
{isDownloading && (
)}
{/* Status / source indicator */}
{localUrl ? (
▶ Playing local file
) : isDownloading ? (
Watching on YouTube · switching to local when ready
) : dlStatus?.status === "failed" ? (
Download failed — watching on YouTube
) : null}
{/* Follow channel */}
{video?.channel_youtube_id && (
)}
{/* Duration */}
{video?.duration_seconds && (
{formatDuration(currentTime || startAt)} / {formatDuration(video.duration_seconds)}
)}
{/* Description */}
{video?.description && (
Description
{video.description}
)}