chore: updates for voice

This commit is contained in:
Tristan Yang
2023-03-31 13:29:02 +08:00
parent c35a7d211b
commit 9f5e876a66
6 changed files with 14 additions and 15 deletions
+5 -5
View File
@@ -43,11 +43,11 @@ const Voice = () => {
if (mediaType == "audio") {
// 播放远端音频
user.audioTrack?.play();
const level = user.audioTrack?.getVolumeLevel();
if (level === 0) {
// 远端静音
dispatch(updateVoicingMember({ uid: +user.uid, info: { muted: true } }));
}
// const level = user.audioTrack?.getVolumeLevel();
// if (level === 0) {
// // 远端静音
// dispatch(updateVoicingMember({ uid: +user.uid, info: { muted: true } }));
// }
window.VOICE_TRACK_MAP[+user.uid] = user.audioTrack;
}
agoraEngine.on("user-unpublished", (user) => {