Support & information center

rtcSetNetwork()

Change the network configuration during a test run dynamically to simulate changing network conditions. Also see rtcSetNetworkProfile().

Arguments

NameTypeDescription
profileJSON objectA JSON object describing the network configuration to use.

JSON object

The JSON object is defined as:

client.rtcSetNetwork({ outgoing: { packetloss: [%], jitter: [milliseconds], latency: [milliseconds], bitrate: [Kbps] }, incoming: { packetloss: [%], jitter: [milliseconds], latency: [milliseconds], bitrate: [Kbps] } });
Code language: CSS (css)

Code examples

client.rtcSetNetwork({ outgoing: { packetloss: 0.01, jitter: 0, latency: 0, bitrate: 5000 }, incoming: { packetloss: 0.01, jitter: 0, latency: 0, bitrate: 5000 } });
Code language: CSS (css)

The script above will change the network configuration to allow up to 5mbps of bitrate with 0.01% packet loss on both incoming and outgoing direction.

Was this article helpful?

Related Articles