Test tool features
- WebRTC peer-to-peer connection between two in-page peer connections
- Real-time status indicators (connecting, active, stopped)
- Detailed event log with timestamps
- Local and remote video preview
- Automatic PeerMetrics SDK integration
- Graceful fallback to audio-only, video-only, or data-channel-only when media devices are unavailable
- No build step — pure HTML and JavaScript
Running the test
Start Peermetrics
Start all services with Docker Compose:Both the
api service (port 8081) and the web service (port 8080) must be running before you open the test tool.Get an API key
- Open the dashboard at
http://localhost:8080. - Log in with the default credentials (
admin/admin). - Create an organization and an app.
- Copy the API key from the app dashboard.
Open the test tool
The test tool is served automatically by nginx. Navigate to:No additional setup is required — the file is included in the nginx volume mount.
Configure the test tool
Fill in the configuration fields:
The API Root must end with
| Field | Value |
|---|---|
| API Root | http://localhost:8081/v1 |
| API Key | Paste the key you copied from the dashboard |
| User ID | Any identifier (default: test-user-1) |
| User Name | Any display name (default: Test User) |
| Conference ID | Any identifier (default: test-conference-1) |
| Conference Name | Any name (default: Test Call) |
| App Version | Any version string (default: 1.0.0) |
/v1.Start the test call
Click Start Test Call.When prompted, allow camera and microphone access. The tool will:
- Initialize the PeerMetrics SDK with your configuration.
- Request media from your camera and microphone.
- Create two in-page
RTCPeerConnectionobjects and connect them. - Register the local peer connection with PeerMetrics for monitoring.
- Begin collecting and sending WebRTC stats to the API.
Watch the logs
The log panel at the bottom of the page shows real-time status updates. A successful start produces output similar to:
View metrics in the dashboard
While the call is active, open a new browser tab and go to:Navigate to your app dashboard. You should see the test conference and participant data populating in real time.
Troubleshooting
WebRTC not supported
WebRTC not supported
The test tool requires a browser that supports the WebRTC APIs (
RTCPeerConnection and navigator.mediaDevices.getUserMedia).Use a current version of Chrome, Firefox, Safari, or Edge. The log panel will show WebRTC is not supported in this browser if the APIs are unavailable.Failed to initialize PeerMetrics
Failed to initialize PeerMetrics
This error means the SDK could not reach the API endpoint or rejected the API key. Check the following:
- The API service is running on port 8081. Confirm with:
- The API Root field is set to
http://localhost:8081/v1(it must end with/v1). - The API key is correct. Copy it directly from the app dashboard.
- Open your browser’s developer tools and check the Console tab for CORS errors. A CORS error means the API service is reachable but is rejecting the request origin.
No video
No video
The browser denied access to your camera or microphone. To fix this:
- Click the lock icon in your browser’s address bar and allow camera and microphone access.
- Check your operating system’s privacy settings to confirm the browser is allowed to use media devices.
Connection fails
Connection fails
If the call does not reach the Call Active state:
- Confirm both
apiandwebservices are running: - Check the Docker Compose logs for startup errors:
- Ensure ports 8080 and 8081 are not occupied by another process on your machine.

