WebRTC API
Checking compatibility...
Enable real-time communication in web applications with the WebRTC API. Learn to implement video calls, screen sharing, and peer-to-peer data transfer.
Demo Limitations
This demo uses BroadcastChannel for signaling and only works between tabs in the same browser. Production WebRTC applications require a dedicated signaling server and STUN/TURN servers for NAT traversal and reliable connectivity.
Basic Connection
Establish a direct link between two browsers to exchange messages in real-time. This example shows the essential steps to create a peer-to-peer connection that works even through firewalls and network address translators.
Note: This example requires two tabs of the same browser to work. It won't work between different browsers because it uses BroadcastChannel for signaling.
Real-world WebRTC applications use dedicated signaling servers and STUN/TURN servers to handle NAT traversal and firewall issues.
=
=
=
=
=
=
Output
Click Run to see output...