WebRTC Videochat and Conferencing Support

WebRTC is a new real time video communication technology. Support is not available on all browsers and devices but is increasing. The real issue in present is scalability.

Scalability

Because WebRTC utilizes peering networks, there still has to be a nearby node to help distribute the stream to other local hosts. Peering across a global network can be incredibly difficult.

Conventional out-of-the-box WebRTC solutions require each client to establish and maintain separate connections with every other participant in a complicated network where the bandwidth load increases exponentially as each additional participant is added.

Broadcasters need server grade connections to live stream to multiple users and using a regular home ADSL connection (that has has higher download and bigger upload) causes real issues.

While testing with 2 or few users works fine in demos and small load trials, WebRTC limits often show in production mode: becomes unusable when many users are watching same HD stream and broadcaster connection is regular.

All startups hope their streaming applications will become a huge success, with thousands of viewers watching. A performer streaming a full hd video at 8 Mbps directly to 100 viewers in various world locations would require up to 800Mbps upload connection.
Most ADSL connections have under 100Mbps upload allowing streaming such video to a maximum of 12 users.

A solution is to use a relay server for streaming reliable from and to WebRTC clients as implemented with the BroadcastLiveVideo solution.

Regular Browser Support and Reliability of Implementation

WebRTC is not currently supported by default PC browsers on older systems (Internet Explorer for Windows and Safari for older Mac OS) or generally older versions used by many users.
This creates a real issue for organisation networks with standard software distributions, older OS setups, studios and internet caffes with restrictive administrative software or plain newbie users that use their computers with default setup.
WebRTC is not currently supported on default mobile browsers either,  excepting latest Android.
While WebRTC is popular with technology geeks and enthusiasts, many regular users are not able to access such implementation or can use only limited functionality.

WebRTC standards are early in the process of ratification.  Browsers supporting WebRTC are not fully transparent with updates which can result in issues with the implementation of WebRTC.

For more details see these reference sites:

PC Browser Share WebRTC RTMP
Internet Explorer + Edge (Windows default) 9% No* Yes
Safari (MacOS default) 13% No Yes
Chrome 57% Yes Yes
Firefox 9% Yes* Yes
Opera 5% Yes Yes

*Mozilla reports Navigator.getUserMedia as Deprecated and MediaDevices.getUserMedia as Experimental .
*IE does not support WebRTC at all but there are plans to introduce some support in Edge browser .

PC Browser market share shows WebRTC setup will not work for a lot of PC users due to browser support. Many of these users with default browsers are beginners or restricted by workplace policies from using a different browsers and are unlikely to change their browser.
On mobiles WebRTC support is even lower while RTMP is supported both on Android and iOS with apps.
RTMP streams can be published to iOS and Android browsers as HLS.

WebRTC vs RTMP

Currently, WebRTC is still in development discussion for its complete implementation whereas RTMP is already available for any Real Time Communication project’s deployments.

WebRTC could be a solution for the future and RTMP is a solution for the present that could be required for a while.

WebRTC could loose the current battle for its standardisation and interoperability, with many implementation proposals over the top web browsers or with a divergent market approach from Google, Microsoft, Apple.

RTMP is reliably implemented on all PC browsers with Flash plugin and as stand alone applications for mobile and desktop OS.

Relayed (RTMP Server) vs P2P (WebRTC or Flash RTMFP)

Depending on ISP and network setup an important share of users can’t connect and stream directly to each other at all. Some experience huge latency (several seconds) and massive frame loss over P2P.

Test your P2P network capabilities with this  RTMFP Connectivity checker .

Using a relay server is most reliable solution for video communications.

Some providers say only 8% of their users need RTMP but that could be biased considering they emphasise WebRTC / RTMFP sessions that don’t require streaming server costs.
Usually most home internet connections don’t go well with P2P unless users are in same or very close network. Server grade connections are usually required for reliable P2P on this technology.

Security Concerns with Using Browsers that Support WebRTC

In January 2015, TorrentFreak reported that browsers supporting WebRTC suffer from a serious security flaw that compromises the security of VPN-tunnels, by allowing the true IP address of the user to be read. The IP address read requests are not visible in the browsers developer console, and they are not blocked by common ad blocking/privacy plugins (enabling online tracking by advertisers and other entities despite precautions).

If your browser is WebRTC compliant test this IP detection tool.

End of Flash

Flash was planned to be discontinued a decade ago but alternatives took a long time and browsers continued support as that was the only reliable method to provide certain features as broadcasting webcam.

Currently browsers and developers plan to end support for Flash at the end of 2020.

Flash support will be discontinued by browsers when other technologies become available and reliable for features previously provided by Flash only (streaming live video from webcam).

VideoWhisper RTMP Web Session Check

For sites and integrations where additional security measures are required, VideoWhisper Web Applications support login session check on Wowza RTMP side.

This is used to make sure no clients will be able to connect to rtmp server without having previously logged in on the website (with the _login.php scripts for php editions).
When a new client tries to connect to RTMP server with a session name, rtmp application will check on the web server if that client session exists. If web server does not confirm that client logged in, rtmp server will reject the connection. RTMP server will also check for a webKey that needs to be configured same way on rtmp and web server: this will prevent connections in case of web domain hijacking (only web server and rtmp server know the key, client app does not).

Notes

  • This will disable connections from external encoders (ie. FMLE) and players (ie. JwPlayer) to that rtmp address, as these will not provide a session name to check for validity. These apps can be supported with a more advanced solution that allows inserting a key in rtmp address and also continuous rtmp session control from web (rtmp reports online sessions to web scripts and these can terminate any rtmp session):  RTMP Session Control
  •  Usually, each installation will require its own rtmp side that checks session info with that installation. Otherwise you will have to tweak scripts to check on all installations.
  • This Wowza SE functionality is optional and can be disabled by leaving those properties blank.

 

RTMP Configuration

RTMP side web session check is currently supported for Wowza rtmp side. Download latest version of Wowza rtmp side, deploy to your server and update these settings in conf/videowhisper-web/Application.xml :


<Properties>
<Property>
<Name>acceptPlayers</Name>
<Value>true</Value>
</Property>
<Property>
<Name>webLogin</Name>
<Value>http://installation_url/rtmp_login.php?s=</Value>
</Property>
<Property>
<Name>webKey</Name>
<Value>VideoWhisper</Value>
</Property>
<Property>
<Name>webLogout</Name>
<Value>http://installation_url/rtmp_logout.php?s=</Value>
</Property>
</Properties>
</Application>

 

 

Then restart WowzaMediaServer service. For troubleshooting check Wowza access logs. If errors occur in the error logs submit a ticket to VideoWhisper about this.

Web Configuration

Download latest Video Conference php edition and check these integration files:
rtmp.inc.php – stores session info when user authenticates from vc_login.php ; contains $webKey if you want to change it
rtmp_login.php – called by rtmp server to see if a session name is valid (authenticated); also gets canKick permission to allow user to kick clients
rtmp_logout.php – called by rtmp server when client with a session name disconnected (to cleanup session)

Configure settings.php to use the videowhisper-web rtmp address.

To integrate this on other editions or installations you will need to copy the 3 files mentioned above to installation folder and include rtmp.inc.php in the _login.php scripts that authorize the user.
Other changes could be required depending on particularities of each integration.

Sample Demo Configuration

Installation url: http://www.videowhisper.com/demos/vc_web
Using rtmp address: rtmp://videowhisper.com/videowhisper-web

         <Property>
<Name>webLogin</Name>
<Value>http://www.videowhisper.com/demos/vc_web/rtmp_login.php?s=</Value>
</Property>
<Property>
<Name>webKey</Name>
<Value>VideoWhisper</Value>
</Property>
<Property>
<Name>webLogout</Name>
<Value>http://www.videowhisper.com/demos/vc_web/rtmp_logout.php?s=</Value>
</Property>

 

RTMP Session Control (including after login and for 3rd party encoders/apps)

In addition to session login control, VideoWhisper rtmp side for Wowza can also  provide RTMP Session Control (special licensing is required for 3rd party servers).

This can be used to monitor 3rd party clients, other than VideoWhisper applications, like Wirecast, Flash Media Live Encoder (FMLE), Open Broadcaster Software (OBS), iOS/Android GoCoder app for rtmp live broadcasting.

In example, if a broadcaster connects directly with an external encoder application, the website scripts can be notified about this to show his channel as LIVE.
Also web scripts can communicate back to rtmp server to disconnect a client when necessary.