A collection of WebRTC examples with Node.js and Dart signaling servers
A collection of WebRTC examples demonstrating various features and patterns, with both Node.js and Dart signaling servers.
| Example | Description |
|---|---|
| Basic Peer Connection | Simple peer-to-peer video call between two browsers |
| Audio Only | Audio-only WebRTC connection without video |
| Video Only | Video-only WebRTC connection without audio |
| Audio + Video (Bundled) | Audio and video on a single transport (BUNDLE) |
| Audio + Video (Unbundled) | Audio and video on separate transports |
| Audio/Video Capture | Capture and display local audio/video streams |
| Screen Sharing | Share screen content via WebRTC |
| Speech to Text | Stream audio to server for real-time speech-to-text |
| DataChannel (TCP-like) | Reliable, ordered data channel messaging |
| DataChannel (UDP-like) | Unreliable, unordered data channel for real-time data |
| Renegotiation | Add/remove tracks mid-call without disconnecting |
| Network Interruptions | Handle connection state changes and recovery |
| Multi-Peer | Multiple peers sending audio to a central receiver |
| Stats Dashboard | Real-time WebRTC metrics: bitrate, FPS, RTT, packet loss |
Each example can be run with either Node.js or Dart server:
# Using Node.js server
cd example_name
./run.sh
# Using Dart server
cd example_name
./run.sh dart
npm install
Directory: basic_peer/
Simple peer-to-peer video call between two browsers

cd basic_peer
./run.sh dart
Directory: audio_only/
Audio-only WebRTC connection without video

cd audio_only
./run.sh dart
Directory: video_only/
Video-only WebRTC connection without audio

cd video_only
./run.sh dart
Directory: audio_video_bundled/
Audio and video on a single transport (BUNDLE)

cd audio_video_bundled
./run.sh dart
Directory: audio_video_unbundled/
Audio and video on separate transports

cd audio_video_unbundled
./run.sh dart
Directory: audio_video_capture/
Capture and display local audio/video streams

cd audio_video_capture
./run.sh dart
Directory: screen_sharing/
Share screen content via WebRTC

cd screen_sharing
./run.sh dart
Directory: data_channel_tcp/
Reliable, ordered data channel messaging

cd data_channel_tcp
./run.sh dart
Directory: data_channel_udp/
Unreliable, unordered data channel for real-time data

cd data_channel_udp
./run.sh dart
Directory: renegotiation/
Add/remove tracks mid-call without disconnecting

cd renegotiation
./run.sh dart
Directory: network_interruptions/
Handle connection state changes and recovery

cd network_interruptions
./run.sh dart
Directory: multi_peer/
Multiple peers sending audio to a central receiver

cd multi_peer
./run.sh dart
Directory: speech_to_text/
Stream audio from multiple browser clients to server for real-time speech-to-text transcription using Whisper

cd speech_to_text
./run.sh dart
Directory: stats_dashboard/
Real-time WebRTC metrics: bitrate, FPS, RTT, packet loss

cd stats_dashboard
./run.sh dart
Audio and video samples used in these examples are borrowed from:
MIT