Skip to content

Instantly share code, notes, and snippets.

Last active Dec 23, 2020
What would you like to do?
Headless jitsi meet on Raspberry pi
const puppeteer = require('puppeteer-core');
const readline = require('readline-sync');
// Streams the first webcam in the system to the specified Jitsi Meet room. Audio is currently
// not sent, but it can be easily enabled by disabling the corresponding setting in `meetArgs`.
// - Detect end of call to gracefully exit
// - Send button press notification using Signal, Telegram...
// NOTE: only tested on GNU/Linux.
async function main(room, baseUrl='') {
const chromeArgs = [
// Disable sandboxing, gives an error on Linux
// Automatically give permission to use media devices
// You may need to play with these options to get proper input and output
const meetArgs = [
// Disable receiving of video
// Unmute our audio
// Don't use simulcast to save resources on the sender (our) side
// Disable P2P mode due to a bug in Jitsi Meet
// Disable prejoin page
const url = `${baseUrl}/${room}#${meetArgs.join('&')}`;
console.log(`Loading ${url}`);
const browser = await puppeteer.launch({
args: chromeArgs,
handleSIGINT: false,
executablePath: '/usr/bin/chromium-browser',
ignoreDefaultArgs: ['--mute-audio'],
const page = await browser.newPage();
// Manual handling on SIGINT to gracefully hangup and exit
process.on('SIGINT', async () => {
await page.evaluate('APP.conference.hangup();');
await page.close();
await page.goto(url);
// Set some friendly display name
await page.evaluate('APP.conference.changeLocalDisplayName("Doorbell");');
main(process.argv[2] || 'VideoDoorbellTest');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment