WebRTC voice & video calls
BlaB! WS Pro supports voice and video calls over WebRTC in all modern desktop & mobile browsers. It is generally accepted that only 70-80% of the users can technically participate in a WebRTC voice/video call. A WebRTC voice/video call requires on both sides:
- A modern browser that supports WebRTC (latest Firefox, Safari, Chrome and Chromium derivates).
- Obviously hardware equipment - microphone and camera.
- Decent hardware & Internet connection to encode, broadcast, receive and decode compressed audio/video streams in realtime.
- WebRTC calls may be prevented by a restrictive firewall or a complicated NAT (Network Address Translation).
- WebRTC voice & video calls presently do NOT work in WebView apps on Android.
WebRTC & ICE Servers
WebRTC stands for Web Real-Time Communication. It is an open-source project that enables real-time communication between web browsers and mobile applications through simple application programming interfaces (APIs). ICE stands for Interactive Connectivity Establishment. In the context of WebRTC, ICE servers are used to establish a peer-to-peer connection between two devices over the Internet.
We provide an example ICE servers configuration at AdminCP ยป Settings ยป WebRTC Voice & Video Calls which will work out of the box outside your local network. Register for free at metered.ca and create your own: TURN Server ยป Add Credential. Alternatively, use Cloudflare TURN servers - please refer to our online documentation.
Cloudflare TURN Servers
Cloudflare TURN servers are a great altrernative of metered.ca. It is assumed that Cloudflare will transfer the voice and video streams through the TURN servers closest to both parties. In order to use Cloudflare TURN servers follow the instructions:
- Login to Cloudflare
- Find and click on Calls (left menu)
- Click on Create and choose TURN App and confirm app name - Create
- Copy Turn Token ID and API Token and paste them temporarily in a text document
- Open cloudflare_ts.php (main chat folder) and replace
TOKEN_ID
andAPI_TOKEN
with Turn Token ID and API Token
$cf_token_id='TOKEN_ID';
$cf_api_token='API_TOKEN';
Run the file with your browser YOUR-URL.COM/chat/cloudflare_ts.php
and you should see text // Iceservers replaced with fresh ones! which means all is ok.
Setup a CRON schedule that calls YOUR-URL.COM/chat/cloudflare_ts.php
every 2-3 hours. If you are unfamiliar with CRONTAB we recommend cron-job.org or of course you can Google for another online service.