yangjie #51

Open
yangqiang wants to merge 34 commits from yangjie into master
3 changed files with 6 additions and 15 deletions
Showing only changes of commit 8cfff96431 - Show all commits

View File

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

View File

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

View File

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