Skip to main content

getstats() legacy override

tech writers
tech writers
  • Updated

If the test script you executed failed and directed you to this knowledge base article, then this is for you. Otherwise, you can ignore it.

getstats() implementations

getstats() has two modes of operations in Chrome:

  1. Legacy stats, which you get if you call it directly
  2. Spec-compliant stats, which you get if you call it using promises

testRTC has shifted from legacy stats towards the spec-compliant ones, and in the process, made sure to improve our own implementation of statistics collection via getstats().

Why is your test failing?

Some vendors override the getstats() implementation in the browser for their application. While doing that, they alter the statistics returned.

If you are using the legacy statistics, while at the same time overriding getstats(), you might also be overriding the promise based spec-compliant implementation with legacy statistics. This breaks the statistics collection in testRTC, which causes the message you are seeing in the test results.

How to fix it?

Two ways to solve this:

  1. Remove the #getstats run option from your test description (see run options for more information). This should solve the issue by reverting to webrtc-internals dump collection mode
  2. Fix your implementation so that overriding getstats() in promises will return spec-compliant metrics

Was this article helpful?

0 out of 0 found this helpful