All Projects → nplab → WebRTC-Data-Channel-Playground

nplab / WebRTC-Data-Channel-Playground

Licence: other
A collection of tools for WebRTC Data Channel testing

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

WebRTC Data Channel Playground

This playground contains testing tools for WebRTC Data Channels. Some are useful for measurements, some are demos and some may not work.

Our Tools

Netperfmeter

Netperfmeter is a performance measurement tool for the WebRTC Data Channels. It simultaneously transmits unidirectional data via Data Channels to a peer and measures the resulting bandwidth for each Data Channel.

Each Data Channel can be configured separately.

This tool is port of Thomas Dreibholz's Netperfmeter.

Browsertests

Browsertests checks the implementation of WebRTC Data Channels via a collection of tests according to the W3C Specification.

Stresstest

Stresstest to create multiple local Peer-Connections containing multiple Data Channels which are sending messages.

Gyrocolor

The two peers exchange the values of their gyro sensors. A local peer changes its background color (R,G,B) in relation to the peers sensor values.

Speedtest

Speedtest - runtime and message size are configurable.

Trace with Wireshark

You can trace and analyze WebRTC by using Wireshark.

1. Prerequisite

Get Wireshark with text2pcap (included by default).

2.a - Log with Mozilla Firefox

Set environment variables

NSPR_LOG_MODULES to SCTP:5,DataChannel:5 NSPR_LOG_FILE to /Users/username/logfile << change path

A tutorial for setting variables on different platforms is here.

2.b - Log with Chrome (darkest nightly with patch)

Start Chrome with additional parameters: --enable-logging --v=4 Chrome will log file. For example chrome_debug.log

3. Extract SCTP information from logfile

grep SCTP_PACKET logfile > sctp.log

4. text2pcap

text2pcap -n -l 248 -D -t '%H:%M:%S.' sctp.log sctp.pcapng

5. Wireshark

Open sctp.pcapng in Wireshark.

6. Sample Script

#!/bin/sh
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
echo $SCRIPTPATH

export NSPR_LOG_MODULES=SCTP:5,DataChannel:5
export NSPR_LOG_FILE=$SCRIPTPATH/firefoxlog

/Applications/Firefox.app/Contents/MacOS/firefox-bin
grep SCTP_PACKET firefoxlog.child-1 > sctp.log
text2pcap -n -l 248 -D -t '%H:%M:%S.' sctp.log sctp.pcapng

Turnserver

To start a WebRTC compatible turn server:

turnserver -L <listening-ip-addr> -a -v -n -r realm -u user:password -p <port>

Contact & Feedback

We like feedback! :) Feel free to report bugs or ideas to us!

Project maintainer:
Felix Weinrank - [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].