How to take a screenshot of a Jitsi call using puppeteer

Hi all,

we have been trying to bring in a feature where a user can take a screenshot of the call with a single button click. There were suggestions to use puppeteer to join the call as a bot and take the screenshot and return the image to the initiator. All of this works fine except there are occasions where the camera stream is not visible [cameras are on] in the screenshot as shown below.

Does anyone have any ideas how to get around this and is there any other way I can do this?
Ps: tried using html2canvas, facing cross origin security issues there

Thanks in advance

EDIT

Adding the image again

I cannot see the image you attached, can you try that again?

done

Do the users have their camera on? How long did you wait before taking the screenshot after joining? Are you running in headless mode?

yes the users have their camera on and I made puppeteer wait for like 15 seconds before taking the screenshot. and yes Im running the chrome driver on headless mode. Could it be the fact that the connection is not strong enough of the users that the stream is not available for the puppeteer when taking a screenshot?

Can you try disabling headless mode?

did try that before… kept getting an error in puppeteer when headless was turned off

Sorry I have no other ideas, I have never attempted this myself.

Thank you for the support. Appreciate it