This commit is contained in:
yj 2024-10-15 11:32:31 +08:00
parent eee14c037d
commit fe67cf1d0f
1 changed files with 4 additions and 1 deletions

View File

@ -153,6 +153,7 @@ const Meeting: React.FC = () => {
}) })
const [networkOther, setNetworkOther] = useState<RtcStats>({}) const [networkOther, setNetworkOther] = useState<RtcStats>({})
const [isComputerAudio, setIsComputerAudio] = useState(true) const [isComputerAudio, setIsComputerAudio] = useState(true)
const [isScreenCapture, setIsScreenCapture] = useState(true)
const [isFluencyPriority, setIsFluencyPriority] = useState(false) const [isFluencyPriority, setIsFluencyPriority] = useState(false)
const [open, setOpen] = useState(false) const [open, setOpen] = useState(false)
const [modeOpen, setModeOpen] = useState(false) const [modeOpen, setModeOpen] = useState(false)
@ -1428,6 +1429,7 @@ const Meeting: React.FC = () => {
await agora.setDesktopCapturerVideo(sharedScreenItem, isComputerAudio, isFluencyPriority) await agora.setDesktopCapturerVideo(sharedScreenItem, isComputerAudio, isFluencyPriority)
await allUserLook(user.screenShareId, user.userName) await allUserLook(user.screenShareId, user.userName)
const isOpen = await getKeyOpenChildWindow('shareScreenWindow') const isOpen = await getKeyOpenChildWindow('shareScreenWindow')
setIsScreenCapture(true)
if (!isOpen) { if (!isOpen) {
window.electron.createChildWindow({ window.electron.createChildWindow({
url: location.origin + `/#/shareScreenWindow`, url: location.origin + `/#/shareScreenWindow`,
@ -1507,7 +1509,8 @@ const Meeting: React.FC = () => {
setFooterList(footerListTemplate) setFooterList(footerListTemplate)
window.electron.closeChildWindow('shareScreenWindow') window.electron.closeChildWindow('shareScreenWindow')
setKeyOpenChildWindow('shareScreenWindow', false) setKeyOpenChildWindow('shareScreenWindow', false)
if (isShare === userInfo.screenShareId) { if (isScreenCapture) {
setIsScreenCapture(false)
window.electron.getWindowSize().then((res: any) => { window.electron.getWindowSize().then((res: any) => {
window.electron.setMainWindowSize({ window.electron.setMainWindowSize({
width: Math.ceil(res.width / 1.5), width: Math.ceil(res.width / 1.5),