Files
KVideo/components/player/PlayerError.tsx
T
kuekhaoyang ad9e75bc8c feat: Implement video player components and search functionality
- Added EpisodeList component for displaying a list of episodes with selection functionality.
- Created PlayerError component to handle and display video playback errors.
- Developed VideoMetadata component to show detailed information about the video.
- Implemented VideoPlayer component for video playback with error handling and loading states.
- Introduced EmptyState and NoResults components for search results handling.
- Created ResultsHeader component to display search results summary.
- Developed SearchForm component for user input and search initiation.
- Implemented SourceBadges component to show available video sources.
- Created VideoGrid component to display search results in a grid format.
- Added useSearchCache and useSearchStream hooks for managing search state and caching results.
- Implemented useVideoPlayer hook for fetching and managing video details.
- Added utility function to map source IDs to their respective names.
2025-11-17 13:51:03 +08:00

42 lines
1.3 KiB
TypeScript

'use client';
import { Card } from '@/components/ui/Card';
import { Button } from '@/components/ui/Button';
import { Icons } from '@/components/ui/Icon';
interface PlayerErrorProps {
error: string;
onBack: () => void;
onRetry: () => void;
}
export function PlayerError({ error, onBack, onRetry }: PlayerErrorProps) {
return (
<div className="flex flex-col items-center justify-center py-20 text-center">
<Card className="max-w-2xl">
<Icons.AlertTriangle size={64} className="mx-auto mb-4 text-red-500" />
<h2 className="text-2xl font-bold text-[var(--text-color)] mb-4">视频源不可用</h2>
<p className="text-[var(--text-color-secondary)] mb-6">{error}</p>
<div className="flex gap-3 justify-center">
<Button
variant="primary"
onClick={onBack}
className="flex items-center gap-2"
>
<Icons.ChevronLeft size={20} />
<span>返回</span>
</Button>
<Button
variant="secondary"
onClick={onRetry}
className="flex items-center gap-2"
>
<Icons.RefreshCw size={20} />
<span>重新检测</span>
</Button>
</div>
</Card>
</div>
);
}