Agora supports the media device test and selection, allowing you to check if a camera or an audio device (a headeset, microphone, or speaker) functions well or connects properly to the SD-RTN. For example, in an audio device test, if a user's speech can be replayed in 10 seconds, then the system's audio device is properly connected to the SD-RTN.

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

  • As a host in a live broadcast, do a self-check before airing the broadcast.
  • As an online user, check if the media device works well.


    // 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.