6.0.47 • Published 2 months ago

@jitsi/electron-sdk v6.0.47

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 months ago

Jitsi Meet Electron SDK

SDK for integrating Jitsi Meet into Electron applications.

Supported Electron versions: >= 16.

Installation

Install from npm:

npm install @jitsi/electron-sdk

Note: This package contains native code on Windows for the remote control module. Binary prebuilds are packaged with prebuildify as part of the npm package.

Usage

Remote Control

Requirements: The remote control utility requires iframe HTML Element that will load Jitsi Meet.

Enable the remote control:

In the render electron process of the window where Jitsi Meet is displayed:

const {
    RemoteControl
} = require("@jitsi/electron-sdk");

// iframe - the Jitsi Meet iframe
const remoteControl = new RemoteControl(iframe);

To disable the remote control:

remoteControl.dispose();

NOTE: dispose method will be called automatically when the Jitsi Meet iframe unload.

In the main electron process:

const {
    RemoteControlMain
} = require("@jitsi/electron-sdk");

// jitsiMeetWindow - The BrowserWindow instance of the window where Jitsi Meet is loaded.
const remoteControl = new RemoteControlMain(mainWindow);

Screen Sharing

Requirements: The screen sharing utility requires iframe HTML Element that will load Jitsi Meet.

Enable the screen sharing:

In the render electron process of the window where Jitsi Meet is displayed:

const {
    setupScreenSharingRender
} = require("@jitsi/electron-sdk");

// api - The Jitsi Meet iframe api object.
setupScreenSharingRender(api);

In the main electron process:

const {
    setupScreenSharingMain
} = require("@jitsi/electron-sdk");

// jitsiMeetWindow - The BrowserWindow instance of the window where Jitsi Meet is loaded.
// appName - Application name which will be displayed inside the content sharing tracking window
// i.e. [appName] is sharing your screen.
// osxBundleId - Mac Application bundleId for which screen capturer permissions will be reset if user denied them.  
setupScreenSharingMain(mainWindow, appName, osxBundleId);

Always On Top

Displays a small window with the current active speaker video when the main Jitsi Meet window is not focused.

Requirements: 1. Jitsi Meet should be initialized through our iframe API 2. The BrowserWindow instance where Jitsi Meet is displayed should use the Chrome's window.open implementation (set nativeWindowOpen option of BrowserWindow's constructor to true). 3. If you have a custom handler for opening windows you have to filter the always on top window. You can do this by its frameName argument which will be set to AlwaysOnTop.

Enable the aways on top:

In the main electron process:

const {
    setupAlwaysOnTopMain
} = require("@jitsi/electron-sdk");

// jitsiMeetWindow - The BrowserWindow instance
// of the window where Jitsi Meet is loaded.
setupAlwaysOnTopMain(jitsiMeetWindow);

In the render electron process of the window where Jitsi Meet is displayed:

const {
    setupAlwaysOnTopRender
} = require("@jitsi/electron-sdk");

const api = new JitsiMeetExternalAPI(...);
const alwaysOnTop = setupAlwaysOnTopRender(api);

alwaysOnTop.on('will-close', handleAlwaysOnTopClose);

setupAlwaysOnTopRender return an instance of EventEmitter with the following events:

  • dismissed - emitted when the always on top window is explicitly dismissed via its close button

  • will-close - emitted right before the always on top window is going to close

Power Monitor

Provides a way to query electron for system idle and receive power monitor events.

enable power monitor: In the main electron process:

const {
    setupPowerMonitorMain
} = require("@jitsi/electron-sdk");

// jitsiMeetWindow - The BrowserWindow instance
// of the window where Jitsi Meet is loaded.
setupPowerMonitorMain(jitsiMeetWindow);

In the render electron process of the window where Jitsi Meet is displayed:

const {
    setupPowerMonitorRender
} = require("@jitsi/electron-sdk");

const api = new JitsiMeetExternalAPI(...);
setupPowerMonitorRender(api);

NOTE:

You'll need to add 'disable-site-isolation-trials' switch because of https://github.com/electron/electron/issues/18214:

app.commandLine.appendSwitch('disable-site-isolation-trials')

Example

For examples of installation and usage checkout the Jitsi Meet Electron project.

Development

Enable husky to avoid accidental pushes to the main branch:

npx husky install

To rebuild the native code, use:

npx node-gyp rebuild

Publishing

On every push to main branch, the .github/workflows/ci.yml will create a new version and publish to npm.

If a major or minor release is required, use respective key words in the commit message, see https://github.com/phips28/gh-action-bump-version#workflow

6.0.47

2 months ago

6.0.46

3 months ago

6.0.45

3 months ago

6.0.41

4 months ago

6.0.40

6 months ago

6.0.44

4 months ago

6.0.43

4 months ago

6.0.42

4 months ago

6.0.38

7 months ago

6.0.37

7 months ago

6.0.39

7 months ago

6.0.36

7 months ago

6.0.35

7 months ago

6.0.34

7 months ago

6.0.30

8 months ago

6.0.33

8 months ago

6.0.32

8 months ago

6.0.31

8 months ago

6.0.27

9 months ago

6.0.29

9 months ago

6.0.28

9 months ago

6.0.26

9 months ago

6.0.25

9 months ago

6.0.24

10 months ago

6.0.23

10 months ago

6.0.22

10 months ago

6.0.21

10 months ago

6.0.20

10 months ago

6.0.7

1 year ago

6.0.6

1 year ago

6.0.9

1 year ago

6.0.8

1 year ago

5.0.7

1 year ago

5.0.6

1 year ago

6.0.1

1 year ago

6.0.0

1 year ago

6.0.3

1 year ago

6.0.2

1 year ago

6.0.5

1 year ago

6.0.4

1 year ago

6.0.16

1 year ago

6.0.15

1 year ago

6.0.14

1 year ago

6.0.13

1 year ago

6.0.19

12 months ago

6.0.18

12 months ago

6.0.17

1 year ago

6.0.12

1 year ago

6.0.11

1 year ago

6.0.10

1 year ago

5.0.5

2 years ago

5.0.4

2 years ago

5.0.3

2 years ago

5.0.2

2 years ago

5.0.1

2 years ago

5.0.0

2 years ago

3.4.0

2 years ago

3.5.0

2 years ago

3.4.1

2 years ago

3.3.6

2 years ago

3.3.5

2 years ago

3.3.4

2 years ago

3.3.3

2 years ago

3.0.20

2 years ago

3.3.1

2 years ago

3.3.0

2 years ago

3.2.1

2 years ago

3.2.0

2 years ago

3.1.0

2 years ago

3.3.2

2 years ago

3.2.3

2 years ago

3.0.10

2 years ago

3.0.11

2 years ago

3.0.16

2 years ago

3.0.17

2 years ago

3.0.14

2 years ago

3.0.15

2 years ago

3.0.18

2 years ago

3.0.19

2 years ago

3.0.9

2 years ago

3.0.8

3 years ago

3.0.7

3 years ago

3.0.6

3 years ago

3.0.4

3 years ago

3.0.3

3 years ago

3.0.5

3 years ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago