Agora supports the media device test and selection feature, allowing you to check if an audio device (a headset, microphone, or speaker) works or connects properly to the SD-RTN. For example, in an audio device test, if a user's recorded voice is replayed in 10 seconds, then the system's audio device works and is connected properly to the SD-RTN.

You can use the media device test and selection feature in the following scenarios:

  • A host self-checks before starting a live broadcast.
  • An online user checks if the media device works.


    // Start the echo test. 

    // Wait and check if you can hear your voice.

    // Stop the echo test. 

API Reference


  • After calling the startEchoTest method to start the test, you must call the stopEchoTest method to stop the test. Otherwise, you cannot proceed with a second test or call the joinChannel method to make a call.
  • In the Live Broadcast profile, only the host (BROADCASTER) can call the startEchoTest method. If you swtiched your profile from Communication to Live Broadcast, ensure that you call the setClientRole method to switch your role to BROADCASTER before calling the startEchoTest method.