Merge pull request #514 from vector-im/SimonBrandner/fix/name-11

This commit is contained in:
Šimon Brandner 2022-08-12 15:03:06 +02:00 committed by GitHub
commit 2608f9558c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 19 deletions

View file

@ -197,7 +197,6 @@ export function InCallView({
key={item.id} key={item.id}
item={item} item={item}
getAvatar={renderAvatar} getAvatar={renderAvatar}
showName={items.length > 2 || item.focused}
audioOutputDevice={audioOutput} audioOutputDevice={audioOutput}
audioContext={audioContext} audioContext={audioContext}
audioDestination={audioDestination} audioDestination={audioDestination}

View file

@ -29,12 +29,10 @@ export const VideoTile = forwardRef(
isLocal, isLocal,
speaking, speaking,
audioMuted, audioMuted,
noVideo,
videoMuted, videoMuted,
screenshare, screenshare,
avatar, avatar,
name, name,
showName,
mediaRef, mediaRef,
onOptionsPress, onOptionsPress,
showOptions, showOptions,
@ -75,7 +73,7 @@ export const VideoTile = forwardRef(
)} )}
</div> </div>
)} )}
{(videoMuted || noVideo) && ( {videoMuted && (
<> <>
<div className={styles.videoMutedOverlay} /> <div className={styles.videoMutedOverlay} />
{avatar} {avatar}
@ -86,15 +84,12 @@ export const VideoTile = forwardRef(
<span>{`${name} is presenting`}</span> <span>{`${name} is presenting`}</span>
</div> </div>
) : ( ) : (
(showName || audioMuted || (videoMuted && !noVideo)) && ( <div className={classNames(styles.infoBubble, styles.memberName)}>
<div className={classNames(styles.infoBubble, styles.memberName)}> {audioMuted && !videoMuted && <MicMutedIcon />}
{audioMuted && !(videoMuted && !noVideo) && <MicMutedIcon />} {videoMuted && <VideoMutedIcon />}
{videoMuted && !noVideo && <VideoMutedIcon />} <span title={name}>{name}</span>
{showName && <span title={name}>{name}</span>} </div>
</div>
)
)} )}
<video ref={mediaRef} playsInline disablePictureInPicture /> <video ref={mediaRef} playsInline disablePictureInPicture />
</animated.div> </animated.div>
); );

View file

@ -29,7 +29,6 @@ export function VideoTileContainer({
width, width,
height, height,
getAvatar, getAvatar,
showName,
audioOutputDevice, audioOutputDevice,
audioContext, audioContext,
audioDestination, audioDestination,
@ -43,7 +42,6 @@ export function VideoTileContainer({
audioMuted, audioMuted,
videoMuted, videoMuted,
localVolume, localVolume,
noVideo,
speaking, speaking,
stream, stream,
purpose, purpose,
@ -79,11 +77,9 @@ export function VideoTileContainer({
isLocal={isLocal} isLocal={isLocal}
speaking={speaking && !disableSpeakingIndicator} speaking={speaking && !disableSpeakingIndicator}
audioMuted={audioMuted} audioMuted={audioMuted}
noVideo={noVideo}
videoMuted={videoMuted} videoMuted={videoMuted}
screenshare={purpose === SDPStreamMetadataPurpose.Screenshare} screenshare={purpose === SDPStreamMetadataPurpose.Screenshare}
name={rawDisplayName} name={rawDisplayName}
showName={showName}
ref={tileRef} ref={tileRef}
mediaRef={mediaRef} mediaRef={mediaRef}
avatar={getAvatar && getAvatar(member, width, height)} avatar={getAvatar && getAvatar(member, width, height)}

View file

@ -22,9 +22,6 @@ function getCallFeedState(callFeed) {
member: callFeed ? callFeed.getMember() : null, member: callFeed ? callFeed.getMember() : null,
isLocal: callFeed ? callFeed.isLocal() : false, isLocal: callFeed ? callFeed.isLocal() : false,
speaking: callFeed ? callFeed.isSpeaking() : false, speaking: callFeed ? callFeed.isSpeaking() : false,
noVideo: callFeed
? !callFeed.stream || callFeed.stream.getVideoTracks().length === 0
: true,
videoMuted: callFeed ? callFeed.isVideoMuted() : true, videoMuted: callFeed ? callFeed.isVideoMuted() : true,
audioMuted: callFeed ? callFeed.isAudioMuted() : true, audioMuted: callFeed ? callFeed.isAudioMuted() : true,
localVolume: callFeed ? callFeed.getLocalVolume() : 0, localVolume: callFeed ? callFeed.getLocalVolume() : 0,