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)
|
||||
setRoomUserList((res: any) => {
|
||||
let item = res.find((item: any) => item.uid === uid || item.screenShareId === uid)
|
||||
if (item) {
|
||||
setCurrentVideoId(item.uid)
|
||||
}
|
||||
return res
|
||||
})
|
||||
setTimeout(() => {
|
||||
if (uid === userInfo.uid || uid === userInfo.screenShareId) {
|
||||
if (String(uid).length === 9) {
|
||||
|
|
@ -513,7 +524,6 @@ const Meeting: React.FC = () => {
|
|||
const getShowUser = async (): Promise<void> => {
|
||||
await GetShowUser(state.channelId).then(async (res) => {
|
||||
if (res.code === 200 && res.data) {
|
||||
setCurrentVideoId(res.data)
|
||||
renderVideo(res.data)
|
||||
}
|
||||
})
|
||||
|
|
@ -952,7 +962,6 @@ const Meeting: React.FC = () => {
|
|||
className={`${styles.meetingContentSwiperCard}`}
|
||||
key={index}
|
||||
onClick={() => {
|
||||
setCurrentVideoId(item.uid)
|
||||
if (String(isShare) === item.screenShareId) {
|
||||
renderVideo(item.screenShareId)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue