Skip to main content
abortTestNetworkConnectivity() Stops an in-progress testNetworkConnectivity() test before it completes. The original testNetworkConnectivity() Promise resolves immediately with { result: 'aborted' }, and a test-completed event fires with the same result. If no test is in progress, this method does nothing.

Return value

void

Example

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

// Start the test
const resultPromise = call.testNetworkConnectivity(videoTrack);

// Abort early if the user cancels
call.abortTestNetworkConnectivity();

const { result } = await resultPromise;
console.log(result); // 'aborted'

See also