WebRTC Validator Tool User Guide

Overview

The WebRTC Validator Tool is a web-based tool that aims to emulate the WebRTC player available on the Smart Displays with Google Assistant. This web application leverages the WebRTC API available within modern browsers. More generally, the WebRTC Validator Tool is a WebRTC peer you can stream from or to.

Go to the WebRTC Validator Tool

Overview image of WebRTC Validator Tool.

Customize STUN/TURN Server

The WebRTC Validator Tool by default uses the Google STUN server. The WebRTC Validator Tool can use a user-defined STUN/TURN server.

STUN/TURN server selection box.

Adding a STUN/TURN Server

  1. Place the address of the STUN or TURN server in the STUN or TURN URI text box. Ensure the URI scheme is in the following format scheme:host:[port]. By default the tool uses stun:stun.l.google.com:19302
  2. (Optional) If you are using a TURN server, you will be required to enter the credentials into the TURN Username & Turn Password text box.
  3. Click Add Server to add the server details to the tool.

The STUN/TURN servers will be used in the order they appear in the list.

Removing a STUN/TURN Server

  1. Select the STUN/TURN server you wish to remove.
  2. Click Remove Server.

The tool will use stun:stun.l.google.com:19302 if no other STUN/TURN server(s) are specified.

Enable/Disable Sending of Audio

  1. The tool by default sends audio as part of the WebRTC stream. If you wish to disable the sending of audio, uncheck the Enable Audio check box.
Audio Checkbox

Submit Button

Once you have confirmed you STUN/TURN server(s) and Audio preferences click Submit.

Submit Button
Camrea Permission Dialog

The video input from your webcam will be displayed in the Local Video Element.

Create Offer SDP

  1. Click Create Offer SDP to generate an Offer SDP. The Offer JSON will be formatted in the following format:
    {
    "action": "offer",
    "sdp": "o=- 4611731400430051336 2 IN IP4 127.0.0.1..."
    }
    

2.The Offer SDP can now be passed to a WebRTC peer. This could be your Google Smart Home WebRTC agent or the WebRTC Validator Tool running on another browser.

Submit Answer SDP

  1. Place the Answer JSON in the Answer SDP text box and click Submit Answer SDP. The Answer JSON must be in the following format:

    {
    "action": "answer",
    "sdp": "o=- 4611731400430051336 2 IN IP4 127.0.0.1..."
    }
    
  2. If the Answer SDP is valid then the video (and audio) from the remote source will be visible in the Remote Video Element.

Debugging WebRTC

It is highly recommended that the WebRTC Validator Tool is used with a Chrome browser (ver. 87 or higher). Tools within the Chrome browser will be able to help debug your WebRTC stream.

Webrtc-Internals Page

  1. Open a new tab in your Chrome browser
  2. Visit the following address chrome://webrtc-internals
WebRTC Inspect Window

This page displays all the active on-going WebRTC connections. The statistics and metrics generated on this page are gathered from the getStats() API.

Chrome Developer Tools

The Chrome Developer Tools will also be helpful to troubleshoot any issues with the WebRTC stream. It is highly recommended to open the Console before using the WebRTC Validator Tool.