How to add a webcam chat to your website
A live video chat keeps visitors on your site and turns an audience into a community. Here’s how to add one in an afternoon, without running your own media server.
Choose between hosted and self-hosted
There are two ways to run a webcam chat. A self-hosted setup means installing a media server (Red5, Janus, mediasoup, Jitsi…), a TURN server for visitors behind strict firewalls, and keeping it all updated. It gives full control but needs a Linux server and real WebRTC experience.
A hosted chat such as Dialogoo or HTML5-Chat handles the streaming for you. You configure the chat in a panel and paste one line of code. For most websites, this is the right choice: no server to maintain and capacity that grows with your audience.
Step by step: from account to live chat
- Create the chat. Open an account on Dialogoo or HTML5-Chat and name your chat.
- Set the rooms. Start with one or two public rooms. Too many empty rooms make a chat look dead.
- Brand it. Pick colours that match your site, add your logo and translate the labels into your visitors’ language.
- Set the rules. Turn on the bad-words filter, name at least one moderator and decide whether guests can use their webcam.
- Paste the embed code into the page where the chat should appear.
- Test it on a computer and on a phone, with the camera on and off.
The embed code
A full-page chat is a simple iframe. Replace YOUR_SITE_KEY with the key from your panel:
<iframe src="https://dialogoo.com/chat?embed=1&mode=fullscreen&site=YOUR_SITE_KEY"
style="width:100%;height:100dvh;border:0"
allow="camera; microphone; autoplay; fullscreen"
allowfullscreen title="Chat"></iframe>
The allow attribute matters: without camera; microphone, browsers silently block the webcam inside the iframe. If you prefer a small bubble in the corner of every page, use the floating widget script from your panel instead.
On WordPress
Paste the iframe in a Custom HTML block on the page of your choice. HTML5-Chat also offers a WordPress plugin that logs in your members automatically, so they don’t have to choose a nickname twice.
HTTPS is mandatory
Browsers only allow access to the camera and microphone on secure pages. Your site must load over https://, and every page that embeds the chat too. Free certificates from Let’s Encrypt or a CDN such as Cloudflare are enough.
Moderation: decide before you launch
A public webcam chat needs rules from day one. Publish clear terms of use, give moderators the power to kick and ban, and add a simple way to report abuse. Most problems come in the first hours after launch, so stay online when you open the chat.
Privacy and GDPR
Video, nicknames and messages are personal data. Mention the chat in your privacy policy, name the provider that hosts it and explain how users can contact you. Never record streams without telling users clearly.