From 10fecf0892063d79ccd9c7f99a86c432ea90f1e5 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 31 Jan 2026 21:00:06 +0800 Subject: [PATCH] feat: add custom high-performance video player optimized for slow networks Co-authored-by: Cursor --- components/top-navbar.tsx | 64 ++-- components/video-player.tsx | 622 ++++++++++++++++++++++++++++++++++++ 2 files changed, 641 insertions(+), 45 deletions(-) create mode 100644 components/video-player.tsx diff --git a/components/top-navbar.tsx b/components/top-navbar.tsx index ecbe41ff3..c21ef06bc 100644 --- a/components/top-navbar.tsx +++ b/components/top-navbar.tsx @@ -13,6 +13,7 @@ import { DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import { ImageAnnotator } from "@/components/image-annotator"; +import { VideoPlayer } from "@/components/video-player"; type RankingItem = { rank: number; @@ -478,9 +479,9 @@ export function TopNavbar({ {/* 视频播放器 */} -
- {currentTutorialVideo.videoUrl.includes('youtube.com') || currentTutorialVideo.videoUrl.includes('youtu.be') ? ( - // YouTube 嵌入 - 启用自动播放和性能优化 + {currentTutorialVideo.videoUrl.includes('youtube.com') || currentTutorialVideo.videoUrl.includes('youtu.be') ? ( + // YouTube 嵌入 - 启用自动播放和性能优化 +