From 0cd365937ed7b2fc986c6038dca8b96a1f2bdf4c Mon Sep 17 00:00:00 2001 From: eug-vs Date: Thu, 12 Nov 2020 17:52:22 +0300 Subject: feat: add CONFERENCE_DURATION --- src/attendConference.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/attendConference.js b/src/attendConference.js index c2a3de6..54d6479 100644 --- a/src/attendConference.js +++ b/src/attendConference.js @@ -1,5 +1,7 @@ const { clickElementByXPath } = require('./utils.js'); +const CONFERENCE_DURATION = 1000 * 60 * 80; // 80 minutes + const attendConference = async (page, onJoin) => { // Join as "Listen only" @@ -8,7 +10,7 @@ const attendConference = async (page, onJoin) => { console.log('Joined the conference'); // Wait 5 seconds - await page.waitForTimeout(5000); + await page.waitForTimeout(CONFERENCE_DURATION); console.log('Time to leave!') // Leave audio and close the tab -- cgit v1.2.3