diff --git a/src/room/GroupCallView.tsx b/src/room/GroupCallView.tsx index e7807bda..6a8c9333 100644 --- a/src/room/GroupCallView.tsx +++ b/src/room/GroupCallView.tsx @@ -17,7 +17,6 @@ limitations under the License. import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import { useHistory } from "react-router-dom"; import { MatrixClient } from "matrix-js-sdk/src/client"; -import { useTranslation } from "react-i18next"; import { Room } from "livekit-client"; import { logger } from "matrix-js-sdk/src/logger"; import { MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession"; @@ -25,7 +24,7 @@ import { JoinRule, RoomMember } from "matrix-js-sdk/src/matrix"; import type { IWidgetApiRequest } from "matrix-widget-api"; import { widget, ElementWidgetActions, JoinCallData } from "../widget"; -import { ErrorView, FullScreenView } from "../FullScreenView"; +import { ErrorView } from "../FullScreenView"; import { LobbyView } from "./LobbyView"; import { MatrixInfo } from "./VideoPreview"; import { CallEndedView } from "./CallEndedView"; @@ -77,8 +76,6 @@ export function GroupCallView({ const e2eeSharedKey = useManageRoomSharedKey(rtcSession.room.roomId); const isRoomE2EE = useIsRoomE2EE(rtcSession.room.roomId); - const { t } = useTranslation(); - useEffect(() => { window.rtcSession = rtcSession; return () => { @@ -207,17 +204,6 @@ export function GroupCallView({ } }, [rtcSession, preload]); - useEffect(() => { - if (isEmbedded && !preload) { - // In embedded mode, bypass the lobby and just enter the call straight away - enterRTCSession(rtcSession); - - PosthogAnalytics.instance.eventCallEnded.cacheStartCall(new Date()); - // use the room ID as above - PosthogAnalytics.instance.eventCallStarted.track(rtcSession.room.roomId); - } - }, [rtcSession, isEmbedded, preload]); - const [left, setLeft] = useState(false); const [leaveError, setLeaveError] = useState(undefined); const history = useHistory(); @@ -368,12 +354,6 @@ export function GroupCallView({ } } else if (preload) { return null; - } else if (isEmbedded) { - return ( - -

{t("Loading…")}

-
- ); } else { return ( <>