How iam-rahul-sah/custom-video-player works
Project type and purpose
• Type: Single-page, static front-end application
• Purpose: Provide a custom HTML5 video player using Tailwind CSS and vanilla JavaScript
Main components
a. Developer / Local Environment
– Node.js & NPM (runs PostCSS + Tailwind build)
– Tailwind CLI / PostCSS plugin (reads tailwind.config.js, postcss.config.js)
– Docker (optional: wraps your static server)
b. Build Pipeline
– Input: tailwind.config.js, style.css (with Tailwind directives)
– Process: PostCSS → Tailwind CSS compiler
– Output: final style.css
c. Static Assets / Code
– index.html (entry point)
– main.js (player logic & HTML5 Video API hooks)
– style.css (compiled Tailwind output)
– public/ (video files or other media)
d. Runtime / Production
– Static HTTP Server (e.g. serve, nginx, or Docker container from Dockerfile)
– Browser client
e. Video Element
– HTML5 <video> tag (points to files under public/)
– Controlled via main.js
Relationships & data flow
• Developer invokes “npm run build” → Tailwind/PostCSS compiles CSS
• Dockerfile (or direct CLI) spins up a static HTTP server
• Browser requests index.html → server returns HTML, CSS, JS, video files
• Browser loads main.js → attaches event listeners to <video>
• User interacts with UI → main.js calls HTML5 Video API → updates UI
Architectural patterns & tech
– Pattern: Static Single-Page Application (SPA)
– Build tools: Node.js, NPM scripts, Tailwind CSS, PostCSS
– Containerization: Docker (wraps static server)
– No backend or database layers—pure client-side