Developers can make users broadcast live video streams from their browser with WebRTC that can be distributed to many with DASH and HLS. In other words, users can broadcast live video from browsers as they do with a flash plugin, fortunately, this time there is no need to use any third-party plugin.
Ant Media Server is a media server that has additional life-saving features/APIs for developers. Ant Media Server supports HLS and DASH so that live streams play on almost all web browsers. It also supports 360-degree video and adaptive bitrate.
Table of Contents
How Do You Publish WebRTC Streams from Browsers?
Let me walk you through the step-by-step explanation of how you can start a live video stream directly from your browser with Ant Media Server.
Setup Requirements
- WebRTC Publishing is available in both Community Edition (CE) and Enterprise Edition (EE). To publish with WebRTC on a remote server, you need to install SSL to your server. WebRTC Publishing requires SSL for remote server deployment due to browser getUserMedia security restrictions mandating HTTPS origins, making proper certificate installation process essential through Let’s Encrypt automation with automatic renewal configuration, wildcard certificate support for subdomain deployments, and Certbot validation across Ubuntu, CentOS, and Debian distributions to prevent getUserMedia blocking.
- Quick Link: Learn How to Install SSL to your Ant Media Server
Publishing Steps
- Visit
https://your_domain_name:5443/WebRTCAppEE(Enterprise Edition) orhttps://your_domain_name:5443/WebRTCApp(Community Edition). For local testing, usehttp://localhost:5080/WebRTCAppEE(EE) orhttp://localhost:5080/WebRTCApp(CE)

- Write a stream ID or leave it as default and press
Start Publishing. After pressing the button, you’ll see “Publishing” text appear. You can also view WebRTC statistics on the WebRTC Publisher page.

You are now broadcasting to Ant Media Server. Next, let’s watch the live stream.
How Do You Play HLS Streams with Ant Media Server?
HLS playback is available in both Community and Enterprise Editions. Before playing a stream, ensure it’s actively broadcasting on the server. HLS playback compatibility across iOS Safari, Android Chrome, and Smart TV browsers comes from HTTP-based transport without special server requirements, while the underlying segment-based delivery mechanism using ts file fragmentation with m3u8 manifest updates enables quality switching through variant playlists and handles network fluctuations with 6-10 second buffering windows for uninterrupted playback.
Using the Embedded Player
- Access the play.html page:
https://your_domain_name:5443/WebRTCAppEE/play.html?id=stream1&playOrder=hls - For local testing:
http://localhost:5080/WebRTCAppEE/play.html?id=stream1&playOrder=hls

The HLS stream will start playing automatically when it becomes live.

Alternative Playback Methods
You can watch HLS streams with FFplay, VLC, or other media players using:
ffplay http://localhost:5080/WebRTCApp/streams/stream1.m3u8After stopping the broadcast, you can play the recorded MP4 file via both RTMP and HTTP.
How Do You Enable DASH Streaming Playback?
Ant Media Server supports CMAF packaging with DASH delivery, reducing storage overhead and encoding duplication compared to maintaining separate HLS and DASH pipelines through unified packaging format that generates fmp4 fragments compatible with both HLS byte-range requests and DASH MPD manifests, enabling single encoding pass with dual manifest generation for maximum CDN caching efficiency. Enable DASH muxing by modifying the application properties file webapps/{APP}/WEB-INF/red5-web.properties:
settings.dashMuxingEnabled=trueImportant: Restart Ant Media Server after modifying the red5-web.properties file.
DASH Playback Configuration
- Access the DASH player:
https://your_domain_name:5443/WebRTCAppEE/play.html?id=stream1&playOrder=dash - For local testing:
http://localhost:5080/WebRTCAppEE/play.html?id=stream1&playOrder=dash

The DASH stream will start playing automatically when it becomes live.

Command Line Playback
Watch DASH streams with FFplay, VLC, or similar players:
ffplay http://localhost:5080/WebRTCApp/streams/stream1.mpdFrequently Asked Questions
What is the latency difference between WebRTC and HLS?
WebRTC delivers 200-500ms latency while HLS ranges 6-30 seconds. The 12-60x latency difference between WebRTC’s 200-500ms delivery and HLS’s 6-30 second buffering originates from fundamentally different protocol latency characteristics where UDP-based WebRTC with minimal buffering achieves sub-second glass-to-glass delay while TCP-based RTMP requires 2-5 second buffering and HLS mandates 3-6 segment buffering before playback initialization across firewall configurations.
Can I broadcast without installing software?
Yes. WebRTC works directly in Chrome, Firefox, Safari, and Edge browsers without plugins. Users only need camera/microphone permissions and HTTPS connection.
Do all devices support WebRTC playback?
No. WebRTC playback requires modern browsers with WebRTC support. HLS and DASH provide universal playback compatibility across all devices including legacy systems.
How many viewers can watch one WebRTC stream?
Direct WebRTC supports 20-50 viewers maximum per publisher. Direct WebRTC’s 20-50 viewer maximum per publisher stems from peer connection overhead and bandwidth multiplication requiring architectural scaling patterns through SFU cascading with origin-edge topology, WebRTC-to-HLS transcoding for CDN distribution, and mesh network limitations versus star topology configurations enabling thousands of concurrent WebRTC viewers with proper infrastructure design. HLS/DASH distribution scales to millions through CDN delivery.
What video quality can WebRTC handle?
WebRTC supports 4K resolution at 60fps. Practical limits depend on upload bandwidth: 1080p requires 5+ Mbps, 720p needs 3+ Mbps.
Is recording automatic?
Recording requires manual enablement in Ant Media Server settings. Enable per application or per stream through REST API or dashboard configuration.
What protocols enable browser-based streaming?
Browser-based publishing eliminates plugin dependencies through native getUserMedia API access and codec negotiation without server-side transcoding overhead, though understanding underlying real-time media negotiation protocols including SDP offer-answer exchange, ICE candidate gathering, and DTLS-SRTP encryption handshakes helps troubleshoot connectivity issues across restrictive network topologies with symmetric NAT configurations.
Conclusion
With modern browsers supporting WebRTC natively, it’s now easier than ever to let users broadcast live video directly from the browser—no plugins, no extra software, and no complicated setup. By combining WebRTC for real-time publishing with HLS and DASH for wide-scale distribution, you get the best of both worlds: ultra-low latency input and highly compatible playback across all devices.
Ant Media Server brings this workflow together in a developer-friendly way. You can publish live streams with WebRTC, deliver them via HLS and DASH to millions of viewers, and take advantage of powerful features like adaptive bitrate, 360° video, and CMAF support—all from a single platform.
Whether you’re building live events, online classes, video conferencing tools, or interactive streaming apps, this setup gives you flexibility, scalability, and performance out of the box.
Try Ant Media Server for free, experiment with WebRTC publishing, and start building next-generation live video experiences today.
Estimate Your Streaming Costs
Use our free Cost Calculator to find out how much you can save with Ant Media Server based on your usage.
Open Cost Calculator