Compare commits

..

No commits in common. "6d98f0fc0f3c132d870d0be3fd8305992672f295" and "36e1bda4414b5ec2dc02a699dcf1908733ea9bff" have entirely different histories.

3 changed files with 30 additions and 34 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "WGShare.Metting", "name": "WGShare.Metting",
"private": true, "private": true,
"version": "0.6.5", "version": "0.6.3",
"main": "main.js", "main": "main.js",
"authors": "yj", "authors": "yj",
"description": "智汇享", "description": "智汇享",

View File

@ -1766,35 +1766,31 @@ const Meeting: React.FC = () => {
agora.setSubscribeVideoBlocklist([Number(user.screenShareId)], 1) agora.setSubscribeVideoBlocklist([Number(user.screenShareId)], 1)
} }
if (data) { if (data) {
GetRoomRtcToken(state.channelId).then(async res => { const footerListTemplate = [...footerList]
if (res.code === 200) { footerListTemplate[footerListIndex.itemIndex][footerListIndex.rowIndex].title = '停止共享'
const footerListTemplate = [...footerList] setIsSharedScreenModal(false)
footerListTemplate[footerListIndex.itemIndex][footerListIndex.rowIndex].title = '停止共享' await agora.setDesktopCapturerVideo(sharedScreenItem, isComputerAudio, isFluencyPriority)
setIsSharedScreenModal(false) await allUserLook(user.screenShareId, user.userName)
await agora.setDesktopCapturerVideo(sharedScreenItem, isComputerAudio, isFluencyPriority, res.data) const isOpen = await getKeyOpenChildWindow('shareScreenWindow')
await allUserLook(user.screenShareId, user.userName) setIsScreenCapture(true)
const isOpen = await getKeyOpenChildWindow('shareScreenWindow') if (!isOpen) {
setIsScreenCapture(true) window.electron.createChildWindow('show')
if (!isOpen) { setKeyOpenChildWindow('shareScreenWindow', true)
window.electron.createChildWindow('show') window.electron.setMainWindowSize({
setKeyOpenChildWindow('shareScreenWindow', true) width: 250,
window.electron.setMainWindowSize({ height: 160,
width: 250, })
height: 160, window.electron.setPosition('right')
}) setTimeout(() => {
window.electron.setPosition('right') agora.setupLocalVideo({
setTimeout(() => { uid: Number(user.uid),
agora.setupLocalVideo({ view: document.getElementById(`meetingAbsoluteVideo`) as HTMLElement,
uid: Number(user.uid), channelId: state.channelId,
view: document.getElementById(`meetingAbsoluteVideo`) as HTMLElement, sourceType: VideoSourceType.VideoSourceCameraPrimary,
channelId: state.channelId, type: true
sourceType: VideoSourceType.VideoSourceCameraPrimary, })
type: true }, 1500);
}) }
}, 1500);
}
}
})
} else { } else {
message.error('请选择应用!') message.error('请选择应用!')
} }

View File

@ -329,10 +329,10 @@ export const agora = {
) )
}, },
// 共享屏幕单独用户 // 共享屏幕单独用户
joinChannelEx: async (uid: any, token: string) => { joinChannelEx: async (uid: any) => {
await agora.leaveChannelEx(uid) await agora.leaveChannelEx(uid)
await rtcEngine.joinChannelEx( await rtcEngine.joinChannelEx(
token, option.token,
{ channelId: option.channelId, localUid: Number(uid) }, { channelId: option.channelId, localUid: Number(uid) },
{ {
autoSubscribeAudio: false,//设置是否自动订阅所有音频流 autoSubscribeAudio: false,//设置是否自动订阅所有音频流
@ -465,7 +465,7 @@ export const agora = {
return await rtcEngine.getScreenCaptureSources(thumbSize, iconSize, includeScreen) return await rtcEngine.getScreenCaptureSources(thumbSize, iconSize, includeScreen)
}, },
// 共享屏幕采集 // 共享屏幕采集
setDesktopCapturerVideo: async (targetSource: any, isComputerAudio: boolean, isFluencyPriority: boolean, token:string) => { setDesktopCapturerVideo: async (targetSource: any, isComputerAudio: boolean, isFluencyPriority: boolean) => {
const user = JSON.parse(storage.getItem('user') as string) const user = JSON.parse(storage.getItem('user') as string)
agora.stopScreenCapture(); agora.stopScreenCapture();
if (isComputerAudio) { if (isComputerAudio) {
@ -501,7 +501,7 @@ export const agora = {
} }
); );
} }
await agora.joinChannelEx(user.screenShareId, token) await agora.joinChannelEx(user.screenShareId)
}, },
// 获取系统中所有的视频设备列表。 // 获取系统中所有的视频设备列表。
getVideoDeviceManager: async (): Promise<any> => { getVideoDeviceManager: async (): Promise<any> => {