This commit is contained in:
parent
01c642c0e9
commit
dece2d8418
|
|
@ -174,22 +174,13 @@ const Meeting: React.FC = () => {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onAudioVolumeIndication: async (speakers: any) => {
|
onAudioVolumeIndication: async (speakers: any) => {
|
||||||
setRoomUserList((res: any) => {
|
|
||||||
speakers.forEach((item: any) => {
|
speakers.forEach((item: any) => {
|
||||||
if (item.uid) {
|
let dom = document.getElementById(`micr-${item.uid ? item.uid : userInfo.uid}`);
|
||||||
let itemUser = res.find((row: any) => row.uid === String(item.uid))
|
if (dom) {
|
||||||
if (itemUser) {
|
const percentage = (item.volume / 255) * 100
|
||||||
itemUser.volumeNumber = (item.volume / 255) * 100;
|
dom.style.width = `${percentage}%`
|
||||||
}
|
|
||||||
} else {
|
|
||||||
let me = res.find((row: any) => row.uid === userInfo.uid)
|
|
||||||
if (me) {
|
|
||||||
me.volumeNumber = (item.volume / 255) * 100;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return res
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
agora.startCameraCapture()
|
agora.startCameraCapture()
|
||||||
|
|
@ -988,7 +979,7 @@ const Meeting: React.FC = () => {
|
||||||
</div>
|
</div>
|
||||||
</Popover>
|
</Popover>
|
||||||
<div className={styles.meetingContentSwiperCardBorder}>
|
<div className={styles.meetingContentSwiperCardBorder}>
|
||||||
{item.enableMicr ? <div style={{ width: `${item.volumeNumber}%` }}></div> : null}
|
{item.enableMicr ? <div id={`micr-${item.uid}`}></div> : null}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,7 @@ const agora = {
|
||||||
if (setting.playBackVolume) agora.setPlaybackDeviceVolume(setting.playBackVolume) // 设置播放设备音量
|
if (setting.playBackVolume) agora.setPlaybackDeviceVolume(setting.playBackVolume) // 设置播放设备音量
|
||||||
if (setting.ecordingDeviceId) agora.setRecordingDevice(setting.ecordingDeviceId) // 设置音频采集设备
|
if (setting.ecordingDeviceId) agora.setRecordingDevice(setting.ecordingDeviceId) // 设置音频采集设备
|
||||||
if (setting.ecordingVolume) agora.setRecordingDeviceVolume(setting.ecordingVolume) // 设置音频设备音量
|
if (setting.ecordingVolume) agora.setRecordingDeviceVolume(setting.ecordingVolume) // 设置音频设备音量
|
||||||
|
rtcEngine.enableAudioVolumeIndication(100, 1, true)
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
},
|
},
|
||||||
|
|
@ -186,7 +187,6 @@ const agora = {
|
||||||
},
|
},
|
||||||
// 加入频道
|
// 加入频道
|
||||||
joinChannel: () => {
|
joinChannel: () => {
|
||||||
// rtcEngine.enableAudioVolumeIndication(200, 10, true)
|
|
||||||
rtcEngine.joinChannel(option.token, option.channelId, option.uid, {
|
rtcEngine.joinChannel(option.token, option.channelId, option.uid, {
|
||||||
autoSubscribeAudio: true,//设置是否自动订阅所有音频流
|
autoSubscribeAudio: true,//设置是否自动订阅所有音频流
|
||||||
autoSubscribeVideo: true,//设置是否自动订阅所有视频流
|
autoSubscribeVideo: true,//设置是否自动订阅所有视频流
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue