This commit is contained in:
parent
47c4626171
commit
308eef3704
|
|
@ -65,7 +65,7 @@
|
||||||
height: 0;
|
height: 0;
|
||||||
|
|
||||||
.userVideoContentListItem {
|
.userVideoContentListItem {
|
||||||
height: 20%;
|
height: 10%;
|
||||||
width: calc(100% / 3 - 20px);
|
width: calc(100% / 3 - 20px);
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,13 @@
|
||||||
|
|
||||||
import styles from '@/components/UserVideo/index.module.scss'
|
import styles from '@/components/UserVideo/index.module.scss'
|
||||||
import { GetPolling } from '@/api/Meeting';
|
import { GetPolling } from '@/api/Meeting';
|
||||||
import { storage } from '@/utils';
|
|
||||||
import { agora } from '@/utils/package/agora';
|
import { agora } from '@/utils/package/agora';
|
||||||
import { Button, Empty, Select, message } from 'antd';
|
import { Button, Empty, Select, message } from 'antd';
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { useLocation } from 'react-router';
|
import { useLocation } from 'react-router';
|
||||||
|
import Avatar from '../Avatar';
|
||||||
const UserVideo: React.FC = () => {
|
const UserVideo: React.FC = () => {
|
||||||
let userInfo = JSON.parse(storage.getItem('user') as string)
|
|
||||||
const { state } = useLocation();
|
const { state } = useLocation();
|
||||||
const [user, setUser] = useState<any>({});
|
|
||||||
const [from, setFrom] = useState<any>({
|
const [from, setFrom] = useState<any>({
|
||||||
cycleIntervalList: [
|
cycleIntervalList: [
|
||||||
{ value: 30, label: '30秒' },
|
{ value: 30, label: '30秒' },
|
||||||
|
|
@ -31,7 +29,6 @@ const UserVideo: React.FC = () => {
|
||||||
const [timeStatus, setTimeStatus] = useState(false);
|
const [timeStatus, setTimeStatus] = useState(false);
|
||||||
const [userList, setUserList] = useState([]);
|
const [userList, setUserList] = useState([]);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setUser(userInfo)
|
|
||||||
window.addEventListener('customStorageChange', handleCustomStorageChange);
|
window.addEventListener('customStorageChange', handleCustomStorageChange);
|
||||||
return () => {
|
return () => {
|
||||||
window.removeEventListener('customStorageChange', handleCustomStorageChange);
|
window.removeEventListener('customStorageChange', handleCustomStorageChange);
|
||||||
|
|
@ -65,11 +62,11 @@ const UserVideo: React.FC = () => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
userList.forEach((item: any) => {
|
userList.forEach((item: any) => {
|
||||||
// agora.meetingMonitoringSetupRemoteVideoJoin({
|
agora.setupRemoteVideoJoin({
|
||||||
// uid: Number('1' + item.screenShareId),
|
uid: Number('1' + item.screenShareId),
|
||||||
// view: document.getElementById(`video-${item.uid}`),
|
view: document.getElementById(`video-${item.screenShareId}`),
|
||||||
// channelId: getQueryParameterRegex('channelId'),
|
channelId: state.channelId,
|
||||||
// })
|
})
|
||||||
})
|
})
|
||||||
}, [userList])
|
}, [userList])
|
||||||
// 监听缓存变化
|
// 监听缓存变化
|
||||||
|
|
@ -138,8 +135,8 @@ const UserVideo: React.FC = () => {
|
||||||
{
|
{
|
||||||
userList.map((item: any, index: number) => {
|
userList.map((item: any, index: number) => {
|
||||||
return <div className={styles.userVideoContentListItem} key={index}>
|
return <div className={styles.userVideoContentListItem} key={index}>
|
||||||
<div className={styles.userVideoContentListItemVideo} id={`video-${item.uid}`}>
|
<div className={styles.userVideoContentListItemVideo} id={`video-${item.screenShareId}`}>
|
||||||
|
<Avatar name={item.userName} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue