diff --git a/locales/en/app.json b/locales/en/app.json index 543942e2..f3d568bb 100644 --- a/locales/en/app.json +++ b/locales/en/app.json @@ -116,6 +116,7 @@ "peer_connection_timeout_description": "Connection to the media server timed out. Try switching to a different network or disabling your VPN. If the problem persists, see our <0>troubleshooting guide or contact your server administrator.", "room_creation_restricted": "Failed to create call", "room_creation_restricted_description": "Call creation might be restricted to authorized users only. Try again later, or contact your server admin if the problem persists.", + "screen_share_failed": "Could not start screen sharing", "sticky_events_required": "Homeserver does not support Matrix 2.0 calls", "sticky_events_required_description": "This deployment is configured to use Matrix 2.0 call mode, but the homeserver does not advertise support for sticky events (MSC4354). Ask your server admin to upgrade, or switch the deployment to a compatible mode.", "unexpected_ec_error": "An unexpected error occurred (<0>Error Code: <1>{{ errorCode }}). Please contact your server admin." diff --git a/src/room/InCallView.tsx b/src/room/InCallView.tsx index a57dcce2..3ea88f81 100644 --- a/src/room/InCallView.tsx +++ b/src/room/InCallView.tsx @@ -270,6 +270,7 @@ export const InCallView: FC = ({ const audioParticipants = useBehavior(vm.livekitRoomItems$); const participantCount = useBehavior(vm.participantCount$); const reconnecting = useBehavior(vm.reconnecting$); + const screenShareError = useBehavior(vm.screenShareError$); const layout = useBehavior(vm.layout$); const edgeToEdge = useBehavior(vm.edgeToEdge$); const overflowing = useBehavior(vm.overflowing$); @@ -399,6 +400,21 @@ export const InCallView: FC = ({ ); } + const onDismissScreenShareToast = useCallback( + () => vm.dismissScreenShareError(), + [vm], + ); + const screenShareToast = ( + + {t("error.screen_share_failed")} + + ); + // The reconnecting toast cannot be dismissed const onDismissReconnectingToast = useCallback(() => {}, []); // We need to use a non-modal toast to avoid trapping focus within the toast. @@ -634,6 +650,7 @@ export const InCallView: FC = ({ {reconnectingToast} + {screenShareToast} {earpieceOverlay} {footer} diff --git a/src/room/__snapshots__/InCallView.test.tsx.snap b/src/room/__snapshots__/InCallView.test.tsx.snap index 984e2b12..7cd044bf 100644 --- a/src/room/__snapshots__/InCallView.test.tsx.snap +++ b/src/room/__snapshots__/InCallView.test.tsx.snap @@ -171,7 +171,7 @@ exports[`InCallView > rendering > renders 1`] = ` class="_settingsLogoContainer_20b7b4" >