This commit is contained in:
parent
c41feb67a5
commit
1d8b5bb2ee
|
|
@ -457,8 +457,19 @@ const Meeting: React.FC = () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 渲染视频
|
// 渲染视频
|
||||||
const renderVideo = async (uid: string | number): Promise<void> => {
|
const renderVideo = async (uid: string): Promise<void> => {
|
||||||
|
if (currentVideoId === uid) {
|
||||||
|
message.error('您已经在看这个视频了。')
|
||||||
|
return
|
||||||
|
}
|
||||||
setCurrentLookUserStatus(0)
|
setCurrentLookUserStatus(0)
|
||||||
|
setRoomUserList((res: any) => {
|
||||||
|
let item = res.find((item: any) => item.uid === uid || item.screenShareId === uid)
|
||||||
|
if (item) {
|
||||||
|
setCurrentVideoId(item.uid)
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (uid === userInfo.uid || uid === userInfo.screenShareId) {
|
if (uid === userInfo.uid || uid === userInfo.screenShareId) {
|
||||||
if (String(uid).length === 9) {
|
if (String(uid).length === 9) {
|
||||||
|
|
@ -513,7 +524,6 @@ const Meeting: React.FC = () => {
|
||||||
const getShowUser = async (): Promise<void> => {
|
const getShowUser = async (): Promise<void> => {
|
||||||
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) {
|
||||||
setCurrentVideoId(res.data)
|
|
||||||
renderVideo(res.data)
|
renderVideo(res.data)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -952,7 +962,6 @@ const Meeting: React.FC = () => {
|
||||||
className={`${styles.meetingContentSwiperCard}`}
|
className={`${styles.meetingContentSwiperCard}`}
|
||||||
key={index}
|
key={index}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setCurrentVideoId(item.uid)
|
|
||||||
if (String(isShare) === item.screenShareId) {
|
if (String(isShare) === item.screenShareId) {
|
||||||
renderVideo(item.screenShareId)
|
renderVideo(item.screenShareId)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue