Skip to main content

How to ignore WebRTC pre-call traffic or unimportant peer connections?

By default, watchRTC is an “all you can eat” attitude. This means it will try to collect as much telemetry and metric data from as many useful source as possible. This is great for the most part, but there are times when you wouldn’t want it to collect specific peer connections in your application. This can be when:

  1. The peer connections are used for pre-call tests
    • These tests are meant to check network connectivity and quality prior to making a call
    • They are short lived and “noisy” when it comes to WebRTC metrics collection
    • They offer little value for understanding the user experience of the actual session itself (which is what watchRTC is interested in)
  2. “Unimportant” peer connections
    • At times, some of the peer connections may be of less value to you but too chatty in nature. This can be for example a peer connection used for signaling on its data channel (though you might want to see it)
    • Lower priority peer connections, for example small video windows in a cloud gaming platform, where you are most interested in monitoring the peer connection of the game itself

watchRTC SDK offers two different solutions for such cases:

  1. Provide the roomId and peerId only on the RTCPeerConnection call itself, and don’t pass it in the Init() or SetConfig(). This will give you total control over which peer connections to collect and which to ignore
  2. Make use of watchRTC.disableDataCollection() for times when you don’t want to collect telemetry and watchRTC.enableDataCollection() when you do. Remember that by default, the watchRTC SDK collection is enabled

To learn more about the APIs available via the SDK, check out our watchRTC SDK guide.

Was this article helpful?

0 out of 0 found this helpful