UNPKG

ads-reels-player

Version:

A lightweight, customizable ads and reels video player SDK for modern web applications. Works like Mux with video keys, supports React, Vue, Angular, and vanilla JavaScript. Framework agnostic video player with Mux-like functionality. Browser-only SDK wit

19 lines (17 loc) 592 B
import http from 'http'; import fs from 'fs'; const server = http.createServer((req, res) => { if (req.url === '/') { const html = fs.readFileSync('video-player-demo.html', 'utf8'); res.writeHead(200, { 'Content-Type': 'text/html' }); res.end(html); } else { res.writeHead(404, { 'Content-Type': 'text/plain' }); res.end('Not found'); } }); const PORT = 3000; server.listen(PORT, () => { console.log('🚀 Server running at http://localhost:' + PORT); console.log('🌐 Open this URL in your browser to see the SDK working!'); });