feat: implement remote homeserver handling for LiveKit calls

This commit is contained in:
2026-04-20 21:09:22 +10:00
parent a3dac17b7c
commit 9161c4bde2
5 changed files with 216 additions and 16 deletions

View File

@@ -381,6 +381,7 @@ function RoomCallButtons({ roomId }: RoomCallButtonsProps) {
isInCall,
callState,
activeCall,
isUsingRemoteHomeserver,
startVoiceCall,
startVideoCall,
endCall,
@@ -433,7 +434,10 @@ function RoomCallButtons({ roomId }: RoomCallButtonsProps) {
offset={4}
tooltip={
<Tooltip>
<Text>{isInCall ? 'End Call' : 'Voice Call'}</Text>
<Text>
{isInCall ? 'End Call' : 'Voice Call'}
{isUsingRemoteHomeserver && !isInCall && ' (Remote Server)'}
</Text>
</Tooltip>
}
>
@@ -446,7 +450,12 @@ function RoomCallButtons({ roomId }: RoomCallButtonsProps) {
{isConnecting ? (
<Spinner size="100" variant="Secondary" />
) : (
<Icon size="400" src={Icons.Phone} filled={isActive && activeCall?.callType === CallType.Voice} />
<Box direction="Row" gap="100" alignItems="Center">
<Icon size="400" src={Icons.Phone} filled={isActive && activeCall?.callType === CallType.Voice} />
{isUsingRemoteHomeserver && (
<Icon size="50" src={Icons.HashGlobe} style={{ opacity: 0.7 }} />
)}
</Box>
)}
</IconButton>
)}
@@ -456,7 +465,10 @@ function RoomCallButtons({ roomId }: RoomCallButtonsProps) {
offset={4}
tooltip={
<Tooltip>
<Text>{isInCall ? 'End Call' : 'Video Call'}</Text>
<Text>
{isInCall ? 'End Call' : 'Video Call'}
{isUsingRemoteHomeserver && !isInCall && ' (Remote Server)'}
</Text>
</Tooltip>
}
>
@@ -469,7 +481,12 @@ function RoomCallButtons({ roomId }: RoomCallButtonsProps) {
{isConnecting ? (
<Spinner size="100" variant="Secondary" />
) : (
<Icon size="400" src={Icons.VideoCamera} filled={isActive && activeCall?.callType === CallType.Video} />
<Box direction="Row" gap="100" alignItems="Center">
<Icon size="400" src={Icons.VideoCamera} filled={isActive && activeCall?.callType === CallType.Video} />
{isUsingRemoteHomeserver && (
<Icon size="50" src={Icons.HashGlobe} style={{ opacity: 0.7 }} />
)}
</Box>
)}
</IconButton>
)}