feat(example): video streaming

This commit is contained in:
Bijit Mondal
2026-02-19 18:42:06 +05:30
parent bbe354b70b
commit c5542fc156
10 changed files with 1214 additions and 14 deletions

View File

@@ -2,19 +2,19 @@ const http = require('http');
const fs = require('fs');
const path = require('path');
const PORT = 3000;
const PORT = 3102;
// Create a simple HTTP server to serve the voice client HTML
const server = http.createServer((req, res) => {
if (req.url === '/' || req.url === '/index.html') {
const htmlPath = path.join(__dirname, 'voice-client.html');
const htmlPath = path.join(__dirname, 'video-client.html');
fs.readFile(htmlPath, (err, data) => {
if (err) {
res.writeHead(500);
res.end('Error loading voice-client.html');
return;
}
res.writeHead(200, {'Content-Type': 'text/html'});
res.writeHead(200, { 'Content-Type': 'text/html' });
res.end(data);
});
} else {