Jitsi Meet Electron

repository·master·Indexed 23 days ago

https://github.com/jitsi/jitsi-meet-electron

An Electron-based desktop application for Jitsi Meet (version 2026.7.0) providing a dedicated interface with support for End-to-End Encryption (E2EE), screen sharing, and deep linking via custom protocols. The documentation covers the App component lifecycle, IPC communication between the renderer and main processes, Electron SDK handler configuration for meeting windows, and development setup requirements including Node.js 22.

Tokens
2.8K
Snippets
7
Records
13
Agent score
82%

What's inside jitsi-meet-electron

  1. Set up a development environment for Jitsi Meet Electron

    master

    To develop on this project, follow these steps to install dependencies and run the application in development mode.

    Prerequisites

    • Node.js: Version 22 is required.

    Install Dependencies

    1. Windows: Install build tools globally:
      npm install --global --production windows-build-tools
    2. GNU/Linux: Install X11, PNG, and zlib development packages:
      sudo apt install libx11-dev zlib1g-dev libpng-dev libxtst-dev
    3. All Platforms: Install project packages:
      npm install

    Running in Development Mode

    Start the application with:

    npm start

    To automatically display developer tools on startup, use the SHOW_DEV_TOOLS environment variable:

    SHOW_DEV_TOOLS=true npm start
    npm install
    # then
    SHOW_DEV_TOOLS=true npm start
  2. Add translations to Jitsi Meet Electron

    master

    To add support for a new language, follow these steps:

    1. Add Strings: Add your translations to the JSON files located in /app/i18n/lang.
    2. Register Language: Add a new line to /app/i18n/index.js to include the new translation.
    3. Linux Desktop File: If localizing the desktop file for Linux, add a line to package.json. Search for Comment[hu] in package.json to use as a template for adding your translation of Jitsi Meet Desktop App.
  3. Install Jitsi Meet Electron

    master

    You can install the Jitsi Meet Electron desktop application via direct download or package managers depending on your operating system.

    Direct Downloads

    • Windows: .exe installer.
    • macOS: .dmg installer.
    • GNU/Linux: Available as .AppImage (x64_64 and arm64) or .deb (x86_64 and arm64).

    Package Managers

    • macOS (Homebrew): Use the --cask flag.
    • GNU/Linux (Flathub): Available via Flathub for Flatpak users.
    brew install --cask jitsi-meet
  4. Handle protocol messages via IPC

    master

    The application uses the window.jitsiNodeAPI.ipc interface to communicate with the Electron main process.

    To handle incoming protocol URLs (e.g., when a user clicks a Jitsi link), the App component listens for the protocol-data-msg event. When a message is received, it follows this workflow:

    1. Cleans the input URL.
    2. Creates a conference object using createConferenceObjectFromURL.
    3. Dispatches an action to add the conference to the recent list.
    4. Sends the open-meeting-window command to the main process with the conference details.

    Available IPC methods used by App:

    • window.jitsiNodeAPI.ipc.addListener('protocol-data-msg', callback): Registers a listener for protocol data.
    • window.jitsiNodeAPI.ipc.send('renderer-ready'): Notifies the main process that the renderer is initialized.
    • window.jitsiNodeAPI.ipc.send('open-meeting-window', conference): Commands the main process to open the meeting window.
  5. Handle application protocol links (e.g., jitsi-meet://)

    master

    The application registers a custom protocol (defined by config.appProtocolPrefix) to allow deep-linking into conferences.

    When a protocol link like jitsi-meet://room-name is triggered:

    1. If the app is closed: The handleProtocolCall function is invoked. If the main window doesn't exist, it creates it. The protocol data is stored and sent to the renderer once it is ready.
    2. If the app is open: The protocol data is sent to the existing meetingWindow via the protocol-data-msg IPC message.
    3. On macOS: The open-url event is used to capture the data.
    4. On Windows/Linux: The second-instance event or command line arguments are used to capture the data.
  6. Troubleshoot Jitsi Meet Electron issues

    master

    GNU/Linux

    • Permission Denied: If an AppImage won't execute, grant execution permissions:
      chmod u+x ./jitsi-meet-x86_64.AppImage
    • Blank Page after Server Upgrade: Clear the local application cache:
      rm -rf ~/.config/Jitsi\ Meet/

    Windows

    • Unsigned App Warning: You may see a warning that the app is unsigned upon first installation; this is expected behavior.
  7. Configure application metadata and default server settings

    master

    The default configuration object provides metadata for the application (names, URLs) and default connection settings for Jitsi Meet deployments.

    Key configuration properties include:

    • appName: The display name of the application.
    • appProtocolPrefix: The prefix used for the application's custom protocol (e.g., jitsi-meet://). Note that this must also be updated in package.json to ensure consistency.
    • defaultServerURL: The fallback Jitsi Meet deployment URL used if no other server is specified.
    • defaultServerTimeout: The timeout duration in seconds for server connections.
    • aboutURL, sourceURL, feedbackURL, privacyPolicyURL, and termsAndConditionsURL: URLs for informational and support pages.
    export default {
        aboutURL: 'https://jitsi.org/what-is-jitsi/',
        sourceURL: 'https://github.com/jitsi/jitsi-meet-electron',
        appName: 'Jitsi Meet',
        appProtocolPrefix: 'jitsi-meet',
        defaultServerURL: 'https://meet.jit.si',
        defaultServerTimeout: 30,
        feedbackURL: 'https://github.com/jitsi/jitsi-meet-electron/issues',
        privacyPolicyURL: 'https://jitsi.org/meet/privacy',
        termsAndConditionsURL: 'https://jitsi.org/meet/terms'
    };
  8. Configure Electron SDK handlers in the main process

    master

    When managing a meeting window (the window hosting the Jitsi Meet iframe), you must initialize several SDK handlers from @jitsi/electron-sdk to enable core features. These handlers should be called on the meetingWindow instance.

    Key handlers include:

    • initPopupsConfigurationMain(window, windowOpenHandler): Configures how popups are handled. The windowOpenHandler determines if a URL should be opened in the Electron app or an external browser.
    • setupPictureInPictureMain(window): Enables Picture-in-Picture functionality.
    • setupPowerMonitorMain(window): Monitors power states.
    • setupScreenSharingMain(window, appName, appId): Sets up screen sharing capabilities. Requires the application name and the build's appId.
    • setupRemoteControlMain(window): Enables remote control (requires ENABLE_REMOTE_CONTROL to be true in the source configuration).
    // Example setup for a meeting window
    initPopupsConfigurationMain(meetingWindow, windowOpenHandler);
    setupPictureInPictureMain(meetingWindow);
    setupPowerMonitorMain(meetingWindow);
    setupScreenSharingMain(meetingWindow, config.appName, pkgJson.build.appId);
    if (ENABLE_REMOTE_CONTROL) {
        setupRemoteControlMain(meetingWindow);
    }
  9. Render an entry point using window.renderEntryPoint

    master

    The application exposes a global window.renderEntryPoint function that allows you to mount specific application entry points into a DOM element with the ID app. This function automatically wraps the chosen component with the Redux store, PersistGate for state persistence, and a Suspense boundary with a Spinner fallback.

    Available entry point keys:

    • APP: Renders the main App component.
    • MEETING: Renders the MeetingApp component.
  10. Implement a window open handler for popups

    master

    When using initPopupsConfigurationMain, you must provide a windowOpenHandler to decide how new windows/popups are treated. This prevents unauthorized external navigation and ensures Jitsi-specific popups stay within the Electron environment.

    Logic pattern:

    1. Use getPopupTarget(url, frameName) from @jitsi/electron-sdk to identify the target.
    2. If the target is 'electron', return { action: 'allow' }.
    3. If the target is 'browser' or undefined, return { action: 'deny' } and manually open the link using openExternalLink(url) to handle it in the user's default browser.
    const windowOpenHandler = ({ url, frameName }: { frameName: string; url: string; }) => {
        const target = getPopupTarget(url, frameName);
    
        if (!target || target === 'browser') {
            openExternalLink(url);
            return { action: 'deny' };
        }
    
        if (target === 'electron') {
            return { action: 'allow' };
        }
    
        return { action: 'deny' };
    };
  11. Use IPC messages to control the meeting window

    master

    The main process listens for specific IPC messages from the renderer process to manage the lifecycle of the meeting window:

    • open-meeting-window: Creates a new meetingWindow (if one doesn't exist) or focuses the existing one and sends a navigate-to-conference message with the provided conference string.
    • close-meeting-window: Closes the meetingWindow. Note that closing the meeting window does not quit the entire application; the launcher (mainWindow) remains open.
    • restore-meeting-window: Restores and focuses the meetingWindow (useful when returning from Picture-in-Picture).
    • jitsi-open-url: Triggers the opening of an external URL via openExternalLink.
    // Example of the IPC listeners in main.ts
    ipcMain.on('open-meeting-window', (event, conference) => {
        // ... logic to create or focus meetingWindow
    });
    
    ipcMain.on('close-meeting-window', () => {
        if (meetingWindow) {
            meetingWindow.close();
        }
    });