import { fileUrl } from "../api"; import type { FeedItem } from "../types"; import { compactViews, relativeTime } from "./format"; interface Props { item: FeedItem; path: string; onClose: () => void; onDelete: () => void; } /** * Plays the local file through Tauri's asset protocol. Every download is * H.264/AAC in MP4 precisely so WKWebView can decode it natively. */ export default function Player({ item, path, onClose, onDelete }: Props) { return (
{item.channel_title}
{/* Absolute fill + object-contain, so portrait Shorts and landscape videos are both letterboxed to the pane instead of overflowing it. */}

{item.title}

{[compactViews(item.views), relativeTime(item.published)] .filter(Boolean) .join(" · ")}
{item.description && (

{item.description}

)}
); }