|
|
|
@ -35,17 +35,10 @@ const initClient = async (
|
|
|
|
|
logger.debug("Ensure that we are not muted...");
|
|
|
|
|
// Wait for the toolbar to appear
|
|
|
|
|
await page.waitForSelector('[aria-label="Mute"],[aria-label="Unmute"]');
|
|
|
|
|
// In any case, click on the mute button
|
|
|
|
|
// (even if we are muted, the "Mute" button shows up when joining a conference)
|
|
|
|
|
logger.debug("First click on Mute button to check our real mute status");
|
|
|
|
|
const muteButton = await page.$('[aria-label="Mute"]');
|
|
|
|
|
if (muteButton !== null) {
|
|
|
|
|
await muteButton.click();
|
|
|
|
|
}
|
|
|
|
|
// If we are muted, click on Unmute
|
|
|
|
|
const unmuteButton = await page.$('[aria-label="Unmute"]');
|
|
|
|
|
if (unmuteButton !== null) {
|
|
|
|
|
logger.debug("Click on Unmute");
|
|
|
|
|
logger.debug("clicking on unmute button");
|
|
|
|
|
await unmuteButton.click();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|