This commit is contained in:
parent
c15fcb9d19
commit
9c19b41e2e
|
|
@ -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,22 +677,26 @@ const AudioComponents = () => {
|
||||||
})
|
})
|
||||||
agora.setRecordingDevice(e)
|
agora.setRecordingDevice(e)
|
||||||
}} />;
|
}} />;
|
||||||
{audioDeviceManager.ecordingActive ? <div onClick={() => {
|
{(meetingUserInfo &&
|
||||||
agora.stopRecordingDeviceTest()
|
(role.ID.includes(meetingUserInfo.roleId) || meetingUserInfo.isRoomManager) &&
|
||||||
setAudioDeviceManager({
|
meetingUserInfo.enableMicr) ||
|
||||||
...audioDeviceManager,
|
location.hash.indexOf('/meeting') === -1
|
||||||
playBackActive: false,
|
? audioDeviceManager.ecordingActive ? <div onClick={() => {
|
||||||
ecordingActive: false,
|
agora.stopRecordingDeviceTest()
|
||||||
})
|
setAudioDeviceManager({
|
||||||
}}>结束</div> : <div onClick={() => {
|
...audioDeviceManager,
|
||||||
agora.stopPlaybackDeviceTest()
|
playBackActive: false,
|
||||||
agora.startRecordingDeviceTest(100)
|
ecordingActive: false,
|
||||||
setAudioDeviceManager({
|
})
|
||||||
...audioDeviceManager,
|
}}>结束</div> : <div onClick={() => {
|
||||||
playBackActive: false,
|
agora.stopPlaybackDeviceTest()
|
||||||
ecordingActive: true,
|
agora.startRecordingDeviceTest(100)
|
||||||
})
|
setAudioDeviceManager({
|
||||||
}}>测试</div>}
|
...audioDeviceManager,
|
||||||
|
playBackActive: false,
|
||||||
|
ecordingActive: true,
|
||||||
|
})
|
||||||
|
}}>测试</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="" />
|
||||||
|
|
|
||||||
|
|
@ -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) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue