适配 声网 音量回调

This commit is contained in:
wzq
2023-10-12 11:51:49 +08:00
parent ce4fce319e
commit f8d4601c38
2 changed files with 4 additions and 0 deletions

View File

@@ -105,6 +105,9 @@ public class EngineEventHandler extends IRtcEngineEventHandler {
@Override
public void onAudioVolumeIndication(AudioVolumeInfo[] speakers, int totalVolume) {
super.onAudioVolumeIndication(speakers, totalVolume);
if (totalVolume == 0) {
return;
}
RtcEngineManager manager = RtcEngineManager.get();
Message message = manager.mRtcEngineHandler.obtainMessage();
message.what = RtcEngineHandler.onAudioVolumeIndication;

View File

@@ -183,6 +183,7 @@ public class RtcEngineManager extends BaseEngine {
return;
}
mRtcEngine.muteLocalAudioStream(mute);
mRtcEngine.enableLocalAudio(!mute);
isMute = mute;
}