startEchoTest abstract method

Future<int?> startEchoTest({
  1. required EchoTestConfig config,
  2. required int delayTime,
})

Starts a call test.

Before entering the room, you can call this API to test whether your local audio/video equipment as well as the upstream and downstream networks are working correctly.
Once the test starts, SDK will record your sound or video. If you receive the playback within the delay range you set, the test is considered normal.

delayTime: Delayed audio/video playback time specifying how long you expect to receive the playback after starting the. The range of the value is [2,10] in seconds and the default value is 2.

API call result:

  • 0: Success.
  • -1: Failure, testing in progress.
  • -2: Failure, the user us already in the room.
  • -3: Failure, neither video nor audio is captured.
  • -4: Failure, parameter exception.
  • -5: Failure, the roomID is already used.

Notes:

  • Once you start the test, you can either call RTCVideo.stopEchoTest or wait until the test stops automatically after 60s, to start the next test or enter the room.
  • All APIs related to device control and stream control called before this API are invalidated during the test and are restored after the test.
  • All the calls to APIs related to device control, stream control, and room entry called during the test do not take effect, and will triggered RTCVideoEventHandler.onWarning.
  • The result of the audio/video loop detection is notified via the RTCVideoEventHandler.onEchoTestResult callback.

Implementation

Future<int?> startEchoTest({
  required EchoTestConfig config,
  required int delayTime,
});