Skip to content

Commit 17df0d8

Browse files
committed
Merge branch 'local-remote-confusion' into non-publishing-participants
2 parents ac47bf4 + 87fbbb9 commit 17df0d8

23 files changed

+776
-587
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"@opentelemetry/sdk-trace-base": "^2.0.0",
5555
"@opentelemetry/sdk-trace-web": "^2.0.0",
5656
"@opentelemetry/semantic-conventions": "^1.25.1",
57-
"@playwright/test": "^1.56.1",
57+
"@playwright/test": "^1.57.0",
5858
"@radix-ui/react-dialog": "^1.0.4",
5959
"@radix-ui/react-slider": "^1.1.2",
6060
"@radix-ui/react-visually-hidden": "^1.0.3",

playwright/fixtures/widget-user.ts

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,19 +111,27 @@ async function registerUser(
111111
await page.getByRole("textbox", { name: "Confirm password" }).click();
112112
await page.getByRole("textbox", { name: "Confirm password" }).fill(PASSWORD);
113113
await page.getByRole("button", { name: "Register" }).click();
114-
const continueButton = page.getByRole("button", { name: "Continue" });
115-
try {
116-
await expect(continueButton).toBeVisible({ timeout: 5000 });
117-
await page
118-
.getByRole("textbox", { name: "Password", exact: true })
119-
.fill(PASSWORD);
120-
await continueButton.click();
121-
} catch {
122-
// continueButton not visible, continue as normal
123-
}
114+
124115
await expect(
125116
page.getByRole("heading", { name: `Welcome ${username}` }),
126117
).toBeVisible();
118+
119+
const browserUnsupportedToast = page
120+
.getByText("Element does not support this browser")
121+
.locator("..")
122+
.locator("..");
123+
124+
// Dismiss incompatible browser toast
125+
const dismissButton = browserUnsupportedToast.getByRole("button", {
126+
name: "Dismiss",
127+
});
128+
try {
129+
await expect(dismissButton).toBeVisible({ timeout: 700 });
130+
await dismissButton.click();
131+
} catch {
132+
// dismissButton not visible, continue as normal
133+
}
134+
127135
await setDevToolElementCallDevUrl(page);
128136

129137
const clientHandle = await page.evaluateHandle(() =>

src/room/GroupCallView.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ export const GroupCallView: FC<Props> = ({
160160
}, [rtcSession]);
161161

162162
// TODO move this into the callViewModel LocalMembership.ts
163+
// We might actually not need this at all. Since we get into fatalError on those errors already?
163164
useTypedEventEmitter(
164165
rtcSession,
165166
MatrixRTCSessionEvent.MembershipManagerError,
@@ -313,6 +314,7 @@ export const GroupCallView: FC<Props> = ({
313314

314315
const navigate = useNavigate();
315316

317+
// TODO split this into leave and onDisconnect
316318
const onLeft = useCallback(
317319
(
318320
reason: "timeout" | "user" | "allOthersLeft" | "decline" | "error",

src/room/InCallView.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { type MatrixRTCSession } from "matrix-js-sdk/lib/matrixrtc";
2424
import classNames from "classnames";
2525
import { BehaviorSubject, map } from "rxjs";
2626
import { useObservable } from "observable-hooks";
27-
import { logger } from "matrix-js-sdk/lib/logger";
27+
import { logger as rootLogger } from "matrix-js-sdk/lib/logger";
2828
import {
2929
VoiceCallSolidIcon,
3030
VolumeOnSolidIcon,
@@ -88,6 +88,7 @@ import { ReactionsOverlay } from "./ReactionsOverlay";
8888
import { CallEventAudioRenderer } from "./CallEventAudioRenderer";
8989
import {
9090
debugTileLayout as debugTileLayoutSetting,
91+
matrixRTCMode as matrixRTCModeSetting,
9192
useSetting,
9293
} from "../settings/settings";
9394
import { ReactionsReader } from "../reactions/ReactionsReader";
@@ -109,6 +110,8 @@ import { useTrackProcessorObservable$ } from "../livekit/TrackProcessorContext.t
109110
import { type Layout } from "../state/layout-types.ts";
110111
import { ObservableScope } from "../state/ObservableScope.ts";
111112

113+
const logger = rootLogger.getChild("[InCallView]");
114+
112115
const maxTapDurationMs = 400;
113116

114117
export interface ActiveCallProps
@@ -127,6 +130,7 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
127130
const mediaDevices = useMediaDevices();
128131
const trackProcessorState$ = useTrackProcessorObservable$();
129132
useEffect(() => {
133+
logger.info("START CALL VIEW SCOPE");
130134
const scope = new ObservableScope();
131135
const reactionsReader = new ReactionsReader(scope, props.rtcSession);
132136
const { autoLeaveWhenOthersLeft, waitForCallPickup, sendNotificationType } =
@@ -141,6 +145,7 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
141145
encryptionSystem: props.e2eeSystem,
142146
autoLeaveWhenOthersLeft,
143147
waitForCallPickup: waitForCallPickup && sendNotificationType === "ring",
148+
matrixRTCMode$: matrixRTCModeSetting.value$,
144149
},
145150
reactionsReader.raisedHands$,
146151
reactionsReader.reactions$,
@@ -151,7 +156,9 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
151156
setVm(vm);
152157

153158
vm.leave$.pipe(scope.bind()).subscribe(props.onLeft);
159+
154160
return (): void => {
161+
logger.info("END CALL VIEW SCOPE");
155162
scope.end();
156163
};
157164
}, [
@@ -270,7 +277,10 @@ export const InCallView: FC<InCallViewProps> = ({
270277
const ringOverlay = useBehavior(vm.ringOverlay$);
271278
const fatalCallError = useBehavior(vm.fatalError$);
272279
// Stop the rendering and throw for the error boundary
273-
if (fatalCallError) throw fatalCallError;
280+
if (fatalCallError) {
281+
logger.debug("fatalCallError stop rendering", fatalCallError);
282+
throw fatalCallError;
283+
}
274284

275285
// We need to set the proper timings on the animation based upon the sound length.
276286
const ringDuration = pickupPhaseAudio?.soundDuration["waiting"] ?? 1;

src/room/LobbyView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ export const LobbyView: FC<Props> = ({
7979
waitingForInvite,
8080
}) => {
8181
useEffect(() => {
82-
logger.info("[Lifecycle] GroupCallView Component mounted");
82+
logger.info("[Lifecycle] LobbyView Component mounted");
8383
return (): void => {
84-
logger.info("[Lifecycle] GroupCallView Component unmounted");
84+
logger.info("[Lifecycle] LobbyView Component unmounted");
8585
};
8686
}, []);
8787

0 commit comments

Comments
 (0)