initial commit
This commit is contained in:
commit
ab1a45730d
3 changed files with 1254 additions and 0 deletions
29
index.mts
Normal file
29
index.mts
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
import puppeteer from "puppeteer";
|
||||||
|
|
||||||
|
const browser = await puppeteer.launch({
|
||||||
|
headless: false, // Show the browser window
|
||||||
|
defaultViewport: null, // Don't limit the viewport
|
||||||
|
args: ["--use-fake-ui-for-media-stream"], // Avoid asking for microphone and camera permissions
|
||||||
|
});
|
||||||
|
|
||||||
|
const page = await browser
|
||||||
|
.pages()
|
||||||
|
.then((pages) => pages[0] || browser.newPage());
|
||||||
|
await page.goto("https://meet.vpsfree.cz");
|
||||||
|
await page.locator("#enter_room_field").fill("parsifal-parsifal-parsifal");
|
||||||
|
await page.locator("#enter_room_button").click();
|
||||||
|
|
||||||
|
await page.waitForSelector("body");
|
||||||
|
await page.evaluate(() => {
|
||||||
|
document.querySelector("body")!.requestFullscreen();
|
||||||
|
});
|
||||||
|
|
||||||
|
browser.on("disconnected", () => {
|
||||||
|
process.exit(0);
|
||||||
|
});
|
||||||
|
|
||||||
|
setInterval(async () => {
|
||||||
|
if ((await browser.pages()).length === 0) {
|
||||||
|
process.exit(0);
|
||||||
|
}
|
||||||
|
}, 1000);
|
6
package.json
Normal file
6
package.json
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"dependencies": {
|
||||||
|
"puppeteer": "^23.3.0",
|
||||||
|
"tsx": "^4.19.1"
|
||||||
|
}
|
||||||
|
}
|
1219
pnpm-lock.yaml
Normal file
1219
pnpm-lock.yaml
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue