Skip to main content
stopTestPeerToPeerCallQuality() Interrupts an in-progress testPeerToPeerCallQuality() 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.

Return value

Returns void.

Example

await call.startCamera();
const videoTrack = call.participants().local.tracks.video.persistentTrack;

const testResultsPromise = call.testPeerToPeerCallQuality({
  videoTrack,
  duration: 250000,
});

// Stop early before joining
call.stopTestPeerToPeerCallQuality();
const results = await testResultsPromise;

if (results.result === 'bad') {
  console.warn('Poor network detected before joining.');
}
await call.join({ url: 'https://your-domain.daily.co/room' });

See also