summaryrefslogtreecommitdiff
path: root/liveJoin.js
diff options
context:
space:
mode:
authorJibon Costa <jiboncosta57@gmail.com>2020-03-28 00:37:45 +0600
committerJibon Costa <jiboncosta57@gmail.com>2020-03-28 00:37:45 +0600
commit720dab56fdc734fe4b8fc710ee72b161dc4d135a (patch)
tree474c9fe7bec067324997684d4d9c606b0500c890 /liveJoin.js
parent3227ab16a20dc263ee04e4f39fc2da75e7256c22 (diff)
downloadbbb-recorder-720dab56fdc734fe4b8fc710ee72b161dc4d135a.tar.gz
bbb-recorder-720dab56fdc734fe4b8fc710ee72b161dc4d135a.zip
better to use display none
Diffstat (limited to 'liveJoin.js')
-rw-r--r--liveJoin.js20
1 files changed, 13 insertions, 7 deletions
diff --git a/liveJoin.js b/liveJoin.js
index ece1b03..f8114a6 100644
--- a/liveJoin.js
+++ b/liveJoin.js
@@ -25,7 +25,7 @@ var options = {
async function main() {
try{
- xvfb.startSync()
+ //xvfb.startSync()
var url = process.argv[2],
exportname = process.argv[3],
duration = process.argv[4],
@@ -33,7 +33,7 @@ async function main() {
if(!url){ url = 'http://tobiasahlin.com/spinkit/' }
if(!exportname){ exportname = 'spinner.webm' }
- if(!duration){ duration = 10 }
+ //if(!duration){ duration = 10 }
if(!convert){ convert = false }
const browser = await puppeteer.launch(options)
@@ -56,18 +56,24 @@ async function main() {
await page.waitForSelector('[id="chat-toggle-button"]');
await page.click('[id="chat-toggle-button"]', {waitUntil: 'domcontentloaded'});
await page.click('button[aria-label="Users and messages toggle"]', {waitUntil: 'domcontentloaded'});
+ await page.$eval('[class^=navbar]', element => element.style.display = "none");
- await page.$eval('.Toastify', element => element.parentNode.removeChild(element));
+ await page.$eval('.Toastify', element => element.style.display = "none");
await page.waitForSelector('button[aria-label="Leave audio"]');
- await page.$eval('[class^=actionsbar] > [class^=center]', element => element.parentNode.removeChild(element));
+ await page.$eval('[class^=actionsbar] > [class^=center]', element => element.style.display = "none");
await page.evaluate((x) => {
console.log("REC_START");
window.postMessage({type: 'REC_START'}, '*')
})
- // Perform any actions that have to be captured in the exported video
- await page.waitFor((duration * 1000))
+ if(duration){
+ await page.waitFor((duration * 1000))
+ }else{
+ await page.waitForSelector('[class^=modal] > [class^=content] > button[description="Logs you out of the meeting"]', {
+ timeout: 0
+ });
+ }
await page.evaluate(filename=>{
window.postMessage({type: 'SET_EXPORT_PATH', filename: filename}, '*')
@@ -78,7 +84,7 @@ async function main() {
await page.waitForSelector('html.downloadComplete', {timeout: 0})
await page.close()
await browser.close()
- xvfb.stopSync()
+ //xvfb.stopSync()
if(convert){
convertAndCopy(exportname)