Skip to main content
stopTestCallQuality() Prebuilt Custom Interrupts an in-progress testCallQuality() test. The original Promise resolves immediately with whatever data has been collected so far. Also emits test-completed. If called before data gathering has started, the result is 'aborted' with an empty data object. If data has been gathered, the result reflects the collected stats up to that point.
There is no need to call stopTestCallQuality() before join() — the test is stopped automatically when you join.

Return value

Returns void.

Example

const testResultsPromise = call.testCallQuality();

// Stop early
call.stopTestCallQuality();

const results = await testResultsPromise;
// If stopped before data gathering:
// { result: 'aborted', secondsElapsed: 0 }
//
// If stopped after data gathering:
// { result: 'good', secondsElapsed: 8, data: { ... }, id: '...' }

See also