This commit is contained in:
yj 2025-10-15 12:03:23 +08:00
parent e845ac7a35
commit 8cfff96431
3 changed files with 6 additions and 15 deletions

View File

@ -143,7 +143,6 @@
display: flex;
justify-content: center;
align-items: center;
z-index: 1;
}
}
}

View File

@ -1169,7 +1169,7 @@ const Meeting: React.FC = () => {
if (user.uid === item.uid) {
await agora.setupLocalVideo({
uid: Number(user.uid),
view: document.getElementById(`meetingAbsoluteVideo`) as HTMLElement,
view: document.getElementById(`meeting-absolute-video-${item.uid}`),
channelId: state.channelId,
sourceType: VideoSourceType.VideoSourceCameraPrimary,
type: true
@ -1180,6 +1180,7 @@ const Meeting: React.FC = () => {
view: document.getElementById(`meeting-absolute-video-${item.uid}`),
channelId: state.channelId,
renderMode: RenderModeType.RenderModeHidden,
type: true
})
}
});
@ -1417,6 +1418,7 @@ const Meeting: React.FC = () => {
view: document.getElementById(`meeting-absolute-video-${remoteUid}`),
channelId: connection.channelId,
renderMode: RenderModeType.RenderModeHidden,
type: true
})
}
return bool
@ -2230,7 +2232,6 @@ const Meeting: React.FC = () => {
}
// 停止共享
const stopScreenCapture = async (): Promise<void> => {
await agora.destroyRendererByView(`meetingAbsoluteVideo`)
roomUserList.forEach(async (item: any) => {
await agora.destroyRendererByConfig(Number(item.uid), state.channelId)
});
@ -2730,23 +2731,14 @@ const Meeting: React.FC = () => {
{isScreenCapture ? <div className={`${styles.meetingAbsolute}`}>
<div style={{ top: '0px' }} className={`${styles.meetingAbsoluteText}`}>{currentSpeakUser.length ? '正在说话:' + currentSpeakUser.join(';') : '正在说话:'}</div>
<div className={`${styles.meetingAbsoluteVideoView}`} id='meetingAbsoluteVideoView' style={{ overflowY: roomUserList.filter((item: any) => item.isRoom).length > 4 && isExpand ? 'auto' : 'hidden' }}>
<div id='meetingAbsoluteVideo' style={{
margin: !isExpand ? '0' : '0 auto 5px',
width: !isExpand ? '100%' : '96%',
}}>
{footerList[0][1].active ? <div className={styles.meetingAbsoluteLoading}>
<Avatar name={user.userName} />
</div> : null}
{!footerList[0][1].active && isExpand ? <div className={styles.meetingAbsoluteUser}>{user.userName}</div> : null}
</div>
{roomUserList
.filter((item: any) => item.isRoom && item.isAdmin && item.uid !== user.uid)
.filter((item: any) => item.isRoom && item.isAdmin)
.map((item: any) => (
<div id={`meeting-absolute-video-${item.uid}`} style={{
margin: !isExpand ? '0' : '0 auto 5px',
width: !isExpand ? '100%' : '96%',
}} data-uid={item.uid} className={`intersectionAbsoluteObserver-view`}>
{item.enableCamera && isExpand ? <div className={styles.meetingAbsoluteUser}>{item.userName}</div> : null}
{isExpand ? <div className={styles.meetingAbsoluteUser}>{item.userName}</div> : null}
{item.enableCamera ? null : <div className={styles.meetingAbsoluteLoading}>
<Avatar name={item.userName} />
</div>}

View File

@ -240,7 +240,7 @@ export const agora = {
},
// 远端加入
setupRemoteVideoJoin: async (item: any) => {
if (item.view?.childNodes.length === 1) {
if (item.view?.childNodes.length === 1 || item.type) {
await rtcEngine.setupRemoteVideo(
{
renderMode: item.renderMode || agora.getRrenderMode(item.uid),