This commit is contained in:
yj 2024-10-28 15:34:33 +08:00
parent c15fcb9d19
commit 9c19b41e2e
2 changed files with 28 additions and 19 deletions

View File

@ -6,12 +6,14 @@ import { agora } from '@/utils/package/agora'
import { CloseOutlined, LoadingOutlined, QuestionCircleOutlined } from '@ant-design/icons'; import { CloseOutlined, LoadingOutlined, QuestionCircleOutlined } from '@ant-design/icons';
import { storage } from '@/utils'; import { storage } from '@/utils';
import path from 'path'; import path from 'path';
import { role } from '@/config/role';
let meetingUserInfo = '' as any;
const fs = require('fs').promises; const fs = require('fs').promises;
const { exec } = require('child_process'); const { exec } = require('child_process');
const StupWizard = forwardRef((_props: any, ref: any) => { const StupWizard = forwardRef((_props: any, ref: any) => {
useImperativeHandle(ref, () => ({ useImperativeHandle(ref, () => ({
changeModal: (index: number = 0) => { changeModal: (index: number = 0, data: any) => {
meetingUserInfo = data;
if (location.hash.indexOf('/meeting') === -1) { if (location.hash.indexOf('/meeting') === -1) {
agora.init() agora.init()
} }
@ -675,7 +677,11 @@ const AudioComponents = () => {
}) })
agora.setRecordingDevice(e) agora.setRecordingDevice(e)
}} />; }} />;
{audioDeviceManager.ecordingActive ? <div onClick={() => { {(meetingUserInfo &&
(role.ID.includes(meetingUserInfo.roleId) || meetingUserInfo.isRoomManager) &&
meetingUserInfo.enableMicr) ||
location.hash.indexOf('/meeting') === -1
? audioDeviceManager.ecordingActive ? <div onClick={() => {
agora.stopRecordingDeviceTest() agora.stopRecordingDeviceTest()
setAudioDeviceManager({ setAudioDeviceManager({
...audioDeviceManager, ...audioDeviceManager,
@ -690,7 +696,7 @@ const AudioComponents = () => {
playBackActive: false, playBackActive: false,
ecordingActive: true, ecordingActive: true,
}) })
}}></div>} }}></div> : null}
</div> </div>
{audioDeviceManager.ecordingActive ? <div className={styles.audioComponentsVolume}> {audioDeviceManager.ecordingActive ? <div className={styles.audioComponentsVolume}>
<img src={ImageUrl.icon36} alt="" /> <img src={ImageUrl.icon36} alt="" />

View File

@ -1426,7 +1426,10 @@ const Meeting: React.FC = () => {
}) })
break; break;
case '设置': case '设置':
stupWizardRef.current.changeModal() await getUserRoomInfo().then(async (res) => {
stupWizardRef.current.changeModal(0, res)
})
break; break;
case '邀请人员': case '邀请人员':
await getUserRoomInfo().then(async (res) => { await getUserRoomInfo().then(async (res) => {