Check out Optimize, our new AI-powered product!

Product Update: WebRTC Pre-Call Test Measures Network Quality
By: , ,
23 February 2018

WebRTC Pre-Call Network Test

A new callstats.io tool to test network conditions and expected WebRTC call quality.

Whether your app is using WebRTC to enable remote collaboration or to connect healthcare professionals with their patients, the user experience should be seamless.

Media quality is affected by a number of factors, but is especially susceptible to end-user network environments. Understanding the network conditions for WebRTC calls can ensure higher media quality and predictability. To tackle this issue, we launched a new feature called pre-call test.

The Pre-call Test API

Our Javascript library (callstats.js) runs WebRTC-specific tests to measure the network quality of end users before an actual call or conference begins. It measures the status of the media connectivity, round-trip time (RTT), fraction losses, and throughput available to end-user devices. The pre-call test is run against callstats.io TURN servers using WebRTC data channels.

You can access the pre-call test results using our “on” function, as shown below:

//Usage

callstats.on("preCallTestResults", csPreCallTestResultsCallback);

function preCallTestResultsCallback(status, results) {

//Check the status
  if (status == callstats.callStatsAPIReturnStatus.success) {
    //Results
    var connectivity = results.mediaConnectivity;
    var rtt = results.rtt;
    var loss = results.fractionalLoss;
    var throughput = results.throughput;

  }
  else {
    console.log("Pre-call test could not be run");
  }
}

App developers can use “status” to check if the pre-call test has completed. The test will return success or failure upon completion and will run as long as the callback is not fired. The pre-call test might return partial results if the tests are interrupted or if the call begins while the pre-call test is running. You can disable the pre-call test by setting “disablePrecalltest” to true in configParams.

Please note that callstats.js should be initialized during the page load or early enough for the pre-call test to be completed before the call or conference begins.

Results On The callstats.io Dashboard

WebRTC Pre-Call Network Test Dashboard

The results of the pre-call test are available for each participant under the “More Information” section of the participants table in the conference view. To avoid a poor user experience, it is highly recommended that operators expose these network diagnostics results to end users. This informs end users so they may switch to a better network before starting a call or conference, and updates application developers so they may apply optimal configuration to the application.

Network Test Page

The pre-call test is also publicly available at network.callstats.io.

WebRTC Pre-Call Network Test Webpage

Let us know what you think about this new feature. Please send your feedback to support[at]callstats.io.



comments powered by Disqus