WebRTC Samples with Source Code
These WebRTC samples let you experience different WebRTC scenarios with Ant Media Server. Play around with our WebRTC demos to understand how your stream will look like at the end. Access the source codes of each example and re-use it to build your own video streaming application from scratch.
WebRTC samples
9 demosWebRTC publish & play
Stream from your camera to a viewer in real time. Experience both publisher and viewer perspectives.
WebRTCpublishplay
HLS / M3U8 Stream Tester
Validate, debug, and analyze your HLS streams instantly — no setup, no account required.
HLS
WebRTC vs HLS
Side-by-side comparison of ultra-low latency WebRTC and standard HLS streaming.
WebRTCHLS
WebRTC publish & HLS play
Publish via WebRTC, deliver to viewers via HLS. Ideal for large audiences with adaptive bitrate.
WebRTCHLS
Audio publish & play
Audio-only WebRTC stream. Microphone capture, transmission and playback with near-zero latency.
audioWebRTC
Virtual background
Real-time background replacement using ML segmentation — no green screen required.
AI/MLcamera
Data channel only
Send arbitrary text data peer-to-peer using WebRTC data channels. No media stream needed.
data channelP2P
Stereo support
Stereo audio delivery over WebRTC at sub-second latency.
audiostereo
High frequency audio
High-frequency audio delivered live via WebRTC. Full fidelity sound for demanding use cases.
audiohi-freq
RTMP & SRT samples
4 demosRTMP publish → WebRTC play
Ingest from OBS or any RTMP encoder. Play back via WebRTC with ultra-low latency.
RTMPOBS
RTMP publish → HLS play
Standard live streaming pipeline: RTMP ingest converted to HLS for scalable delivery.
RTMPHLS
SRT publish → WebRTC play
Resilient SRT ingest with WebRTC playback. Best for unreliable or high-loss networks.
SRTWebRTC
SRT publish → HLS play
Combine resilient SRT encoding with scalable HLS delivery for broadcast workflows.
SRTHLS
Advanced samples
4 demosMultitrack conference
Multi-participant, multi-track WebRTC conference. Full source code to fork and deploy.
conferenceSFU
DeepAR publish & play
Real-time AR face filters via DeepAR streamed over WebRTC. Snapchat-like effects for your app.
ARDeepAR
Interactive whiteboard
Draw and collaborate in real time over a live WebRTC stream. Built for e-learning and telehealth.
whiteboardcollaborate
WebRTC test tool
Health-check your WebRTC environment. Diagnose connectivity, codecs, and TURN reachability.
diagnosticsTURN
Ready to Transform Your Streaming Experience?
Start your free trial today and discover why thousands choose Ant Media for their streaming needs.
No credit card required • Setup in minutes • Cancel anytime