diff --git a/src/page/Meeting/index.tsx b/src/page/Meeting/index.tsx index 0786db1..fd64671 100644 --- a/src/page/Meeting/index.tsx +++ b/src/page/Meeting/index.tsx @@ -174,22 +174,13 @@ const Meeting: React.FC = () => { }) }, onAudioVolumeIndication: async (speakers: any) => { - setRoomUserList((res: any) => { - speakers.forEach((item: any) => { - if (item.uid) { - let itemUser = res.find((row: any) => row.uid === String(item.uid)) - if (itemUser) { - itemUser.volumeNumber = (item.volume / 255) * 100; - } - } else { - let me = res.find((row: any) => row.uid === userInfo.uid) - if (me) { - me.volumeNumber = (item.volume / 255) * 100; - } - } - }); - return res - }) + speakers.forEach((item: any) => { + let dom = document.getElementById(`micr-${item.uid ? item.uid : userInfo.uid}`); + if (dom) { + const percentage = (item.volume / 255) * 100 + dom.style.width = `${percentage}%` + } + }); } }) agora.startCameraCapture() @@ -988,7 +979,7 @@ const Meeting: React.FC = () => {