An overview of the engineering, performance optimizations, local vector database search, and design mechanisms integrated within the AI Course Player.
Dragging the timeline updates progress elements locally at 60fps, preventing snapped slider jitters. Actual video range fetching only triggers once when you release the mouse, minimizing network requests.
Switch dynamically between Local mode (fast disk reading) and Google Drive Cloud mode (streaming directly from a secure Google Service Account using npm run local or npm run drive).
Streams videos from GDrive API directly via raw Node HTTPS. We copy statuses/ranges on the fly and bypass SDK dependencies, making seeking instantaneous in cloud mode.
When you seek to a new point, the browser cancels the request. Our server intercepts the close event and immediately aborts the active Google Drive connection, preventing network saturation.
Uses ffmpeg-static to extract audio and runs Xenova/whisper-base.en locally inside an isolated worker thread. Transcriptions generate VTT subtitles on the fly in a background queue.
Features tabbed headers to monitor Ongoing (queued/active) and Completed (success/history) transcription jobs with live counters and sticky scrollable layouts.
Offline semantic Vector DB search (ONNX MiniLM) with Gemini/Ollama priority routing. Automatically scrapes DuckDuckGo for web grounding and executes player seek/lecture commands.
Dynamic 5-question lecture and 20-question stratified multi-week course exams. Enforces 100% technical mechanics, auto-saves results on submission, and auto-pauses video playback during quizzes.
Dedicated analytics dashboard (reports.html) featuring live overview cards, data table pagination, student/quiz filters, title search, soft-delete archive view, icon tooltips, and custom glassmorphism confirmation modals.
How range requests travel from your browser to Google Cloud and back, optimized for low latency and high bandwidth conservation.
Video player requests a specific frame range (e.g. bytes=150000-) when you seek or play.
If a previous request was active, the server immediately aborts the active GDrive connection to clear the buffer.
Backend requests the video media using raw Node.js https.get and the Service Account Bearer token.
Google replies with partial video bytes, and the server pipes the stream and headers directly to the browser.