Change the network configuration during a test run dynamically to simulate changing network conditions. Also see rtcSetNetworkProfile().
Arguments
Name | Type | Description |
---|---|---|
profile | JSON object | A 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.