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