diff --git a/component/index.tsx b/component/index.tsx index 75420d0f1..5a0be5d12 100644 --- a/component/index.tsx +++ b/component/index.tsx @@ -45,11 +45,13 @@ import { logger } from "matrix-js-sdk/lib/logger"; import { MemoryRouter } from "react-router-dom"; import { I18nextProvider } from "react-i18next"; import { TooltipProvider } from "@vector-im/compound-web"; +import { ErrorBoundary } from "@sentry/react"; import { shouldPolyfill as shouldPolyfillSegmenter } from "@formatjs/intl-segmenter/should-polyfill"; import { shouldPolyfill as shouldPolyfillDurationFormat } from "@formatjs/intl-durationformat/should-polyfill.js"; import EN from "../locales/en/app.json"; import { ElementCallView } from "../src/ElementCallView"; +import { ErrorPage } from "../src/FullScreenView"; import { ClientProvider } from "../src/ClientContext"; import { type HostBridge, @@ -265,24 +267,32 @@ export const ElementCall: FC = ({ rtcSession !== null && mediaDevices !== null && ( - - - - - - - - - - - + {/* Whatever goes wrong in here is shown in here. Left to + propagate, an error would unmount the host's own tree. */} + } + // A broken call should not hold the host on screen + onError={() => void hostBridge.setAlwaysOnScreen(false)} + > + + + + + + + + + + + + )}