This commit is contained in:
yj 2024-08-28 15:44:02 +08:00
parent 5a30d69cc8
commit b9d967365e
2 changed files with 10 additions and 5 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "WGShare.Metting", "name": "WGShare.Metting",
"private": true, "private": true,
"version": "0.0.1", "version": "0.0.2",
"main": "main.js", "main": "main.js",
"authors": "yj", "authors": "yj",
"description": "test", "description": "test",

View File

@ -803,7 +803,9 @@ const Meeting: React.FC = () => {
await GetShowUser(state.channelId).then(async (res) => { await GetShowUser(state.channelId).then(async (res) => {
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
renderVideo(res.data) renderVideo(res.data)
changeVideo() if (res.data.length !== 9) {
changeVideo()
}
} }
}) })
} }
@ -862,7 +864,8 @@ const Meeting: React.FC = () => {
case '停止共享': case '停止共享':
await getUserRoomInfo().then(async (res) => { await getUserRoomInfo().then(async (res) => {
if (res) { if (res) {
await stopScreenCapture() await stopScreenCapture(true)
await allUserLook(userInfo.uid, userInfo.userName)
} else { } else {
message.error(msgTips) message.error(msgTips)
} }
@ -1030,13 +1033,15 @@ const Meeting: React.FC = () => {
} }
} }
// 停止共享 // 停止共享
const stopScreenCapture = async (): Promise<void> => { const stopScreenCapture = async (bool: boolean = true): Promise<void> => {
const footerListTemplate = [...footerList] const footerListTemplate = [...footerList]
await agora.leaveChannelEx(userInfo.screenShareId) await agora.leaveChannelEx(userInfo.screenShareId)
agora.stopScreenCapture() agora.stopScreenCapture()
footerListTemplate[1][0].title = '共享屏幕' footerListTemplate[1][0].title = '共享屏幕'
setFooterList(footerListTemplate) setFooterList(footerListTemplate)
renderVideo() if (bool) {
renderVideo()
}
} }
// 获取房间用户 // 获取房间用户
const getRoomUser = async (): Promise<void> => { const getRoomUser = async (): Promise<void> => {