AgoraIO-Community / AgoraWebSDK-NG

The Next Generation of Agora Web SDK
https://agoraio-community.github.io/AgoraWebSDK-NG/
161 stars 75 forks source link

Known issue about `SEND_AUDIO_BITRATE_TO_LOW` #39

Closed disoul closed 4 years ago

disoul commented 4 years ago

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

disoul commented 4 years ago

fixed in v4.1.0