mirror of
https://github.com/vector-im/element-call.git
synced 2026-05-13 10:34:37 +00:00
bugfix: When starting muted, have to click twice to unmute in call
This commit is contained in:
@@ -58,3 +58,38 @@ test("Start a new call then leave and show the feedback screen", async ({
|
||||
page.getByRole("link", { name: "Not now, return to home screen" }),
|
||||
).toBeVisible();
|
||||
});
|
||||
|
||||
test("BugFix: When unmuting in lobby, you had to click twice to unmute in call", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/");
|
||||
|
||||
await page.getByTestId("home_callName").click();
|
||||
await page.getByTestId("home_callName").fill("DoubleUnMute");
|
||||
await page.getByTestId("home_displayName").click();
|
||||
await page.getByTestId("home_displayName").fill("me");
|
||||
await page.getByTestId("home_go").click();
|
||||
|
||||
const microphoneButton = page.getByTestId("incall_mute");
|
||||
const cameraButton = page.getByTestId("incall_videomute");
|
||||
|
||||
await microphoneButton.click();
|
||||
await cameraButton.click();
|
||||
|
||||
// Should be muted now
|
||||
await expect(microphoneButton).toHaveAccessibleName("Unmute microphone");
|
||||
await expect(cameraButton).toHaveAccessibleName("Start video");
|
||||
|
||||
// Create the call and join
|
||||
await page.getByTestId("lobby_joinCall").click();
|
||||
|
||||
// Give sometime for the all to be connected
|
||||
// Check the number of participants
|
||||
await expect(page.locator("div").filter({ hasText: /^1$/ })).toBeVisible();
|
||||
|
||||
// Click again on the mute button. it should unmute
|
||||
await microphoneButton.click();
|
||||
await expect(microphoneButton).toHaveAccessibleName("Mute microphone");
|
||||
await cameraButton.click();
|
||||
await expect(cameraButton).toHaveAccessibleName("Stop video");
|
||||
});
|
||||
|
||||
@@ -379,10 +379,11 @@ export class Publisher {
|
||||
if (!this.shouldPublish && enable) {
|
||||
await this.pauseUpstreams(lkRoom, [Track.Source.Microphone]);
|
||||
}
|
||||
return enable;
|
||||
} catch (e) {
|
||||
this.logger.error("Failed to update LiveKit audio input mute state", e);
|
||||
return lkRoom.localParticipant.isMicrophoneEnabled;
|
||||
}
|
||||
return lkRoom.localParticipant.isMicrophoneEnabled;
|
||||
});
|
||||
this.muteStates.video.setHandler(async (enable) => {
|
||||
try {
|
||||
@@ -393,10 +394,11 @@ export class Publisher {
|
||||
if (!this.shouldPublish && enable) {
|
||||
await this.pauseUpstreams(lkRoom, [Track.Source.Camera]);
|
||||
}
|
||||
return enable;
|
||||
} catch (e) {
|
||||
this.logger.error("Failed to update LiveKit video input mute state", e);
|
||||
return lkRoom.localParticipant.isCameraEnabled;
|
||||
}
|
||||
return lkRoom.localParticipant.isCameraEnabled;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user