Woody
|
1699a249b0
|
feat: Phase 3.5 — YouTube → ASR integration with source toggle
- useYouTubeASR.ts: adapted from useVideoASR, captures audio from HTMLAudioElement
(hls.js → <audio> → AudioContext.createMediaElementSource → ScriptProcessorNode → WebSocket)
Play/pause events on videoElement; same return shape as useVideoASR
- LTTPage.tsx: Source toggle (Upload/YouTube tabs), YouTubeInput + YouTubeVideoPlayer
wired with handleExtractSuccess → handleAudioReady → useYouTubeASR
Full Transcript button hidden for YouTube source; unified asr variable
- QueryInput.tsx: no changes needed (already supports partialText/value from any source)
- Tests: 18 new (11 useYouTubeASR, 7 LTTPage integration)
- 189/189 total pass (zero regressions)
- Updated plan: 3.5 marked Complete, 5/7 sub-phases done
|
2026-05-09 17:00:32 +08:00 |
Woody
|
a8eea54c0f
|
feat: Phase 3.4 — YouTube Input + Video Player frontend components
- YouTubeInput.tsx: URL input with validation (youtube.com/watch, youtu.be, /live/, /shorts/),
loading/error states, Load Stream button, uses useYouTubeExtract mutation
- YouTubeVideoPlayer.tsx: dual hls.js (video + hidden audio), forwardRef,
thumbnail placeholder until play, LIVE badge, quality capped ≤480p,
onAudioReady callback for ASR hook exposure, dynamic import('hls.js')
- Types: YouTubeFormat, YouTubeStreamResponse interfaces
- API: extractYouTubeStream() — POST /youtube/extract
- Query: useYouTubeExtract() TanStack Query mutation hook
- Tests: 16 new (7 YouTubeInput, 9 YouTubeVideoPlayer)
- 171/171 total pass (zero regressions)
- Updated plan: 3.4 marked Complete, 4/7 sub-phases done
|
2026-05-09 16:43:42 +08:00 |
Woody
|
284028bb1f
|
feat: Phase 3.1 + 3.2 — YouTube config infra and URL extraction
Phase 3.1 — Configuration & Infrastructure:
- Add youtube_proxy_enabled, yt_dlp_timeout, yt_dlp_cache_ttl config fields
- Add yt-dlp and hls.js dependencies
- Create models/youtube.py (request/response schemas)
- Create service stubs (youtube_service, hls_proxy)
- Create router stub and register in main.py
- 11 config tests
Phase 3.2 — YouTube URL Extraction:
- yt-dlp wrapper with async extraction (run_in_executor)
- Format selection: ≤480p video-only + highest-bitrate audio (VOD)
- Combined format fallback: same URL for live streams
- In-memory URL cache: 5min TTL live, 30min VOD
- lru_cache singleton service for cache persistence
- Error handling: DownloadError → 200 with error field
- 18 extract tests, 82/82 total pass (zero regressions)
Real-URL verified: VOD (5bF3tkO5jAA) 24 formats, Live (fN9uYWCjQaw) 6 HLS
|
2026-05-09 15:53:04 +08:00 |