diff --git a/src/app/components/CallEmbedProvider.tsx b/src/app/components/CallEmbedProvider.tsx index 67f95dbac..9c42a455d 100644 --- a/src/app/components/CallEmbedProvider.tsx +++ b/src/app/components/CallEmbedProvider.tsx @@ -7,6 +7,7 @@ import { Avatar, Box, Button, + color, config, Dialog, Icon, @@ -52,6 +53,7 @@ import { StateEvent } from '../../types/matrix/room'; import { getPowersLevelFromMatrixEvent } from '../hooks/usePowerLevels'; import { getRoomCreatorsForRoomId } from '../hooks/useRoomCreators'; import { getRoomPermissionsAPI } from '../hooks/useRoomPermissions'; +import { useLivekitSupport } from '../hooks/useLivekitSupport'; type IncomingCallInfo = { room: Room; @@ -72,6 +74,7 @@ type IncomingCallProps = { function IncomingCall({ dm, info, onIgnore, onAnswer, onReject }: IncomingCallProps) { const mx = useMatrixClient(); const useAuthentication = useMediaAuthentication(); + const livekitSupported = useLivekitSupport(); const { room } = info; const audioRef = useRef(null); @@ -176,12 +179,22 @@ function IncomingCall({ dm, info, onIgnore, onAnswer, onReject }: IncomingCallPr radii="400" onClick={() => onAnswer(room, info.intent === 'video')} before={} + disabled={!livekitSupported} > Answer + {!livekitSupported && ( + + Your homeserver does not support calling. + + )}