Send screnshare even in an audio call

This commit is contained in:
Peter Thatcher 2021-06-02 11:42:41 -06:00 committed by GitHub
parent 23b0a5698f
commit 94f3f208d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -284,6 +284,7 @@ export const CallScreen: React.FC<PropsType> = ({
} else { } else {
presentingButtonType = CallingButtonType.PRESENTING_OFF; presentingButtonType = CallingButtonType.PRESENTING_OFF;
} }
const isSendingVideo = hasLocalVideo || presentingSource;
return ( return (
<div <div
@ -327,7 +328,7 @@ export const CallScreen: React.FC<PropsType> = ({
/> />
</div> </div>
{remoteParticipantsElement} {remoteParticipantsElement}
{hasLocalVideo && isLonelyInGroup ? ( {isSendingVideo && isLonelyInGroup ? (
<div className="module-ongoing-call__local-preview-fullsize"> <div className="module-ongoing-call__local-preview-fullsize">
<video <video
className={localPreviewVideoClass} className={localPreviewVideoClass}
@ -336,7 +337,7 @@ export const CallScreen: React.FC<PropsType> = ({
/> />
</div> </div>
) : null} ) : null}
{!hasLocalVideo && isLonelyInGroup ? ( {!isSendingVideo && isLonelyInGroup ? (
<div className="module-ongoing-call__local-preview-fullsize"> <div className="module-ongoing-call__local-preview-fullsize">
<CallBackgroundBlur avatarPath={me.avatarPath} color={me.color}> <CallBackgroundBlur avatarPath={me.avatarPath} color={me.color}>
<Avatar <Avatar
@ -405,14 +406,14 @@ export const CallScreen: React.FC<PropsType> = ({
'module-ongoing-call__footer__local-preview--audio-muted': !hasLocalAudio, 'module-ongoing-call__footer__local-preview--audio-muted': !hasLocalAudio,
})} })}
> >
{hasLocalVideo && !isLonelyInGroup ? ( {isSendingVideo && !isLonelyInGroup ? (
<video <video
className={localPreviewVideoClass} className={localPreviewVideoClass}
ref={localVideoRef} ref={localVideoRef}
autoPlay autoPlay
/> />
) : null} ) : null}
{!hasLocalVideo && !isLonelyInGroup ? ( {!isSendingVideo && !isLonelyInGroup ? (
<CallBackgroundBlur avatarPath={me.avatarPath} color={me.color}> <CallBackgroundBlur avatarPath={me.avatarPath} color={me.color}>
<Avatar <Avatar
acceptedMessageRequest acceptedMessageRequest