jibon57 / bbb-recorder

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

liveJoin.js with Greenlight server #85

Closed mkpelletier closed 3 years ago

mkpelletier commented 3 years ago

Perhaps this is not the intended use case, but I cannot seem to get the liveJoin.js script to work at all with my Greenlight server. The export.js script works great and I am saving the result to S3, but suppose I want to use the RTMP or liveJoin.js for alternate recording? I have tried running this from an external server or the BBB server, but nothing quite works. With liveJoin.js specifically, I am getting the following error: { 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' }

Two things stand out to me as fairly obvious: you have not requested the api secret from the user, e.g. in .env, and there does not appear to be anywhere in the code where you calculate the needed checksum to access the api calls in the first place. I also tried doing this manually- calculating the checksum as described in the BBB api documentation. Nothing worked. What would you advise?

All the best, Mathieu

mkpelletier commented 3 years ago

I think I have this one figured out: It seems that the redirect for the Greenlight server was messing up the API calls. Disabling this sorted out the timeout error.

One thing remained unlcear from the documentation for liveJoin.js. The parameter passed after the url appears to be a recording name, but this appears not to be the case, since using something like test.webm yields the result of "file not found". Perhaps the documentation could be made more clear that the parameter following the url is not the output filename.