A clean and modern web-based screen sharing application built with WebRTC technology. Share your screen with multiple viewers in real-time with low latency and efficient bandwidth usage.
- ๐ Fully Offline - Works entirely on local network, no internet required
- ๐ HTTPS Support - Self-signed certificates for secure context over network
- ๐ฅ Real-time Screen Broadcasting - Share your screen with multiple viewers simultaneously
- ๐ Network Access - Access from any device on the same Wi-Fi/LAN
- ๐ฑ Mobile Responsive - Optimized viewing experience on phones and tablets
- ๐ฅ๏ธ Multi-Session Support - Multiple users can broadcast different sessions simultaneously
- โก WebRTC Direct Connection - Low latency peer-to-peer streaming
- ๐ฎ Advanced Viewer Controls:
- โฏ๏ธ Play/Pause with frame-by-frame navigation
- ๐ผ๏ธ Picture-in-Picture mode
- โถ Fullscreen with auto-rotate on mobile
- ๐ Session Management - View all active sessions with live viewer counts
- ๐ Re-broadcast - Quickly rejoin inactive sessions with waiting viewers
- โฎ๏ธ / โญ๏ธ Frame Stepping: Navigate frame-by-frame when paused
- โธ๏ธ Play/Pause: Control video playback
- ๐ผ๏ธ Picture-in-Picture: Pop video into floating window
- โถ Fullscreen: Full screen mode with auto-rotation on mobile
- Responsive Layout: Optimized for mobile and desktop
- Modern Glassmorphic UI: Sleek design with smooth animations
- Auto IP Detection: Server automatically finds your local network IP
- One-Click Copy: Easy sharing with copy-to-clipboard button
- Mobile Optimized: Controls adapt to screen size, auto-rotate to landscape
- Backend: Node.js + Express
- Real-time Communication: Socket.IO for signaling
- Streaming: WebRTC (uses UDP internally via SRTP)
- Frontend: Vanilla HTML/CSS/JavaScript
- Install dependencies:
npm installScreen sharing requires a secure context (HTTPS) when accessed over network. The server automatically uses HTTPS if it finds SSL certificates.
Generate SSL certificate (one-time setup):
npm run generate-certThis creates server.key and server.cert files that enable HTTPS.
- Start the server:
npm startThe server will automatically:
- Use HTTPS if certificates exist โ
https://localhost:3000 - Fall back to HTTP if no certificates โ
http://localhost:3000
Note: First-time users must accept the self-signed certificate warning in their browser:
- Click "Advanced" or "Show Details"
- Click "Proceed to [IP address] (unsafe)" or "Accept the Risk"
- This only needs to be done once per browser
Or for development with auto-reload:
npm run dev- Server will start and display:
Server running on:
Local: http://localhost:3000
Network: http://192.168.100.102:3000
Share this URL for viewers on your network:
http://192.168.100.102:3000/viewer.html
- Open
https://localhost:3000/broadcast.htmlin your browser - Enter a session name (e.g., "meeting-room-1", "presentation-hall-a")
- Use alphanumeric characters, hyphens, and underscores
- 3-50 characters long
- Click "๐ฅ Start Broadcasting" button
- Select the screen/window you want to share in the browser dialog
- Click "Share" or "Allow" to grant permission
- A shareable viewer URL will appear with your session ID
- Share this URL with your audience
- Monitor the viewer count in real-time
- Click "โน๏ธ Stop Broadcasting" when done
Multiple users can broadcast simultaneously with different session names!
- Each broadcaster creates a unique session with a custom name
- Viewers join specific sessions using the session ID in the URL
- All sessions are independent - no interference between them
- Sessions table shows all active broadcasts on the network
Meeting Room A:
- Broadcaster enters session name:
meeting-room-a - Shares URL:
https://192.168.1.100:3000/viewer.html?id=meeting-room-a
Conference Hall:
- Another broadcaster enters:
conference-hall - Shares URL:
https://192.168.1.100:3000/viewer.html?id=conference-hall
Training Room:
- Third broadcaster enters:
training-101 - Shares URL:
https://192.168.1.100:3000/viewer.html?id=training-101
All three broadcasts run simultaneously on the same server!
The broadcaster page shows an Active Broadcast Sessions table with:
| Column | Description |
|---|---|
| Session Name | The session identifier (shows "(You)" for your session) |
| Viewers | Number of people watching this session |
| Viewer URL | Shareable link with session ID |
| Actions | Control buttons for each session |
Action Buttons:
- โน๏ธ Stop (Active sessions): Stop the broadcast
- ๐ก Broadcast (Inactive with viewers): Re-join session if you refreshed
- โช Inactive (No broadcaster, no viewers): Session is empty
If you refresh the browser while broadcasting:
- Your session becomes inactive but stays in the table
- Viewers remain connected and waiting
- Click the ๐ก Broadcast button to rejoin
- Your screen sharing resumes for waiting viewers
This is useful if you need to restart your browser or switch tabs!
- Get the viewer URL from the broadcaster (includes session ID)
- Format:
https://[SERVER-IP]:3000/viewer.html?id=session-name
- Format:
- Open the URL in your browser
- Accept certificate warning (first time only on HTTPS)
- Video will appear automatically once broadcast begins
- Use playback controls to interact with the stream
Important: The URL must include the ?id=session-name parameter to connect to the correct session!
Playback Controls (First Row):
- โฎ๏ธ Previous Frame - Step backward one frame (when paused)
- โธ๏ธ Pause /
โถ๏ธ Play - Pause or resume the stream - โญ๏ธ Next Frame - Step forward one frame (when paused)
View Mode Controls (Second Row):
- ๐ผ๏ธ PiP - Enter Picture-in-Picture mode (floating window)
- โถ Fullscreen - Enter fullscreen mode
- Mobile: Automatically rotates to landscape orientation
Tips:
- Pause the video to use frame-by-frame navigation
- PiP mode keeps video on top while you work in other apps
- Fullscreen provides immersive viewing, especially on mobile
To broadcast from one device and view from another on the same network:
- Start the server - The console will display both HTTP and HTTPS URLs
- On broadcaster device - Open the broadcast page:
- HTTPS:
https://[SERVER-IP]:3000/broadcast.html(recommended) - HTTP:
http://[SERVER-IP]:3000/broadcast.html(localhost only)
- HTTPS:
- On viewer devices - Use the shareable URL with session ID:
- Format:
https://[SERVER-IP]:3000/viewer.html?id=session-name - You can copy this URL from the broadcaster interface
- Format:
โ ๏ธ Important: Screen sharing over network requires HTTPS. Make sure you:
- Generated SSL certificates with
npm run generate-cert- Accepted the certificate warning on each device
Example:
Server IP: 192.168.1.100
Broadcaster: https://192.168.1.100:3000/broadcast.html
Viewer: https://192.168.1.100:3000/viewer.html?id=meeting-room-1
Symptom: Error when clicking "Start Broadcasting" from a network device
Solution: Screen sharing requires HTTPS over network. Follow these steps:
-
Generate SSL certificate:
npm run generate-cert
-
Restart the server - It will now use HTTPS
-
Accept the certificate warning on each device:
- Navigate to
https://[IP]:3000 - Click "Advanced" โ "Proceed to [IP] (unsafe)"
- This is safe - it's your own local certificate
- Navigate to
-
Use HTTPS URLs for broadcasting:
- โ
https://192.168.1.100:3000/broadcast.html - โ
http://192.168.1.100:3000/broadcast.html
- โ
Can't connect from another device?
-
Check firewall: Ensure your Mac allows incoming connections on port 3000
- Go to: System Settings โ Network โ Firewall
- Allow Node.js or the broadcaster app
-
Verify network: Both devices must be on the same Wi-Fi network
- Don't use VPN on either device
-
Test connection: From another device, try pinging the server:
ping 192.168.100.102
This broadcaster is designed to work completely offline on a local network:
- โ No internet connection required
- โ No external STUN/TURN servers
- โ No external dependencies after installation
- โ Self-signed HTTPS certificate (no CA needed)
- โ Direct peer-to-peer WebRTC connections on LAN
Perfect for:
- Corporate presentations in conference rooms
- Classroom broadcasting
- Events with unreliable internet
- Privacy-sensitive environments (no data leaves your network)
- Remote locations with local Wi-Fi only
How it works:
- Devices on the same network can communicate directly via local IP addresses
- HTTPS is used for secure context (browser requirement), not for encryption over internet
- No data is sent outside your local networkine
- Server runs locally on your computer (localhost:3000)
- WebRTC uses local IPs - Devices discover each other via local network
- Direct connections - Video streams flow peer-to-peer on your LAN
- No internet needed - As long as devices are on the same Wi-Fi/LAN
- Corporate presentations - Share in conference rooms without internet
- Schools/Education - Classroom broadcasting on local network
- Events - Display screens at venues with unreliable internet
- Privacy - Keep all data on local network, nothing goes to cloud
- Remote locations - Works anywhere with just local Wi-Fi
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ Broadcaster โโโโโโโโโโบโ Server โโโโโโโโโโบโ Viewer 1 โ
โ (Browser) โ Socket โ (Socket.IO) โ Socket โ (Browser) โ
โโโโโโโโโโโโโโโ .IO โโโโโโโโโโโโโโโโ .IO โโโโโโโโโโโโโโโ
โ โฒ
โ WebRTC P2P Connection โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
(Direct Media Stream)
WebRTC was chosen because it's the optimal solution for real-time browser-based streaming:
- UDP-based Media Transport - Uses UDP internally for minimal latency
- Peer-to-Peer Architecture - Direct streams reduce server load
- Security Built-in - Mandatory encryption (DTLS-SRTP)
- Browser Native - Works in all modern browsers without plugins
- Chrome/Chromium 74+
- Firefox 66+
- Safari 12.1+
- Edge 79+
Mobile Browsers:
- Chrome Mobile (Android)
- Safari (iOS)
- Firefox Mobile
The application is configured for local network operation without internet:
- No STUN/TURN servers required
- Direct peer-to-peer connections on LAN
- Works completely offline
If you need to broadcast over the internet (not just local network), you can add STUN/TURN servers:
// In broadcast.js and viewer.js
const configuration = {
iceServers: [
{ urls: 'stun:stun.l.google.com:19302' },
// For production, add TURN servers for better connectivity
]
};For production deployment, consider:
- TURN servers: Better connectivity through restrictive firewalls (for internet use)
- Authentication: Implement user authentication for broadcasters
- Room system: Multiple independent broadcast rooms
- Recording: Save broadcasts server-side
- Chat: Real-time viewer chat functionality
- Quality controls: Bandwidth and resolution settings
| Feature | Description | Status |
|---|---|---|
| Screen Sharing | Share your screen in real-time | โ |
| Multiple Viewers | Unlimited simultaneous viewers | โ |
| Network Access | Share across local network | โ |
| Playback Controls | Pause, play, frame stepping | โ |
| Picture-in-Picture | Floating window mode | โ |
| Fullscreen | Full screen with auto-rotate | โ |
| Mobile Optimized | Responsive controls | โ |
| Viewer Count | Real-time viewer tracking | โ |
| Auto IP Detection | Automatic network URL | โ |
| Copy to Clipboard | Easy URL sharing | โ |
MIT


