jibon57 / bbb-recorder

BigBlueButton recorder using puppeteer to export as webm or mp4 file & Live RTMP broadcasting
MIT License
260 stars 134 forks source link

Timeout on liveJoin when mics are locked #87

Closed mkpelletier closed 3 years ago

mkpelletier commented 3 years ago

In the event that microphones have been locked, the liveJoin.js script timesout waiting for the listen only option:

{ TimeoutError: waiting for selector "[aria-label="Listen only"]" failed: timeout 30000ms exceeded at new WaitTask (/home/ubuntu/bbb-record/node_modules/puppeteer/lib/DOMWorld.js:549:28) at DOMWorld._waitForSelectorOrXPath (/home/ubuntu/bbb-record/node_modules/puppeteer/lib/DOMWorld.js:478:22) at DOMWorld.waitForSelector (/home/ubuntu/bbb-record/node_modules/puppeteer/lib/DOMWorld.js:432:17) at Frame.waitForSelector (/home/ubuntu/bbb-record/node_modules/puppeteer/lib/FrameManager.js:627:47) at Frame.<anonymous> (/home/ubuntu/bbb-record/node_modules/puppeteer/lib/helper.js:112:23) at Page.waitForSelector (/home/ubuntu/bbb-record/node_modules/puppeteer/lib/Page.js:1122:29) at main (/home/ubuntu/bbb-record/liveJoin.js:71:20) at process._tickCallback (internal/process/next_tick.js:68:7) name: 'TimeoutError' }

The javascript here needs to be adapted to accommodate edge cases where listen only does not show up for listeners or the script will fail. In the event that mics are locked when the liveJoin.js script executes, the alternative selector [aria-label="Leave audio"] is shown instead, since in this case one joins the audio as listen only automatically.

jibon57 commented 3 years ago

Listen only mood need to turn on otherwise you'll require to adjust logic here.