If you create and publish your microphone audio track without any user interaction, the remote user may not hear you. In this case, the console will print some logs like SEND_AUDIO_BITRATE_TO_LOW and AUDIO_INPUT_LEVEL_TOO_LOW.
And once you interact with the webpage, the remote user will hear you.
Root cause
Agora Web SDK NG uses the AudioContext API to do some audio pre-processing by default. However, the AudioContext is restricted by the browser's autoplay policy. If user has not interacted with your webpage, the AudioContext will not run. So there is no audio data produced from the SDK's pre-processing module in this case.
How to avoid
We will fix this issue in v4.0.2, and it will be released next month.
For now, we recommend that you should ensure that the user has interacted with the webpage before the audio track is published. For example, the user is required to click the accpet or confirm button to start a call.
How to reproduce
If you create and publish your microphone audio track without any user interaction, the remote user may not hear you. In this case, the console will print some logs like
SEND_AUDIO_BITRATE_TO_LOW
andAUDIO_INPUT_LEVEL_TOO_LOW
.And once you interact with the webpage, the remote user will hear you.
Root cause
Agora Web SDK NG uses the
AudioContext API
to do some audio pre-processing by default. However, theAudioContext
is restricted by the browser's autoplay policy. If user has not interacted with your webpage, theAudioContext
will not run. So there is no audio data produced from the SDK's pre-processing module in this case.How to avoid
For now, we recommend that you should ensure that the user has interacted with the webpage before the audio track is published. For example, the user is required to click the accpet or confirm button to start a call.