Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jitsi/jitsi-meet-electron-sdk
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v.0.6.3
Choose a base ref
...
head repository: jitsi/jitsi-meet-electron-sdk
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on May 7, 2019

  1. chore(deps): update robotjs fork to d870ddb

    Leonard Kim authored and virtuacoplenny committed May 7, 2019
    Copy the full SHA
    9c08bee View commit details

Commits on Jul 4, 2019

  1. Copy the full SHA
    526c755 View commit details

Commits on Jul 11, 2019

  1. Adds sending power monitor events to the jitsi-meet iframe. (#48)

    * Adds sending power monitor events to the jitsi-meet iframe.
    
    * Fixes comments.
    
    * Fixes comments, removing not needed variables.
    damencho authored Jul 11, 2019
    Copy the full SHA
    24e5974 View commit details

Commits on Jul 12, 2019

  1. release: v0.6.4

    damencho committed Jul 12, 2019
    Copy the full SHA
    1cf8882 View commit details

Commits on Jul 19, 2019

  1. Copy the full SHA
    109b135 View commit details
  2. Copy the full SHA
    3ced6f1 View commit details

Commits on Jul 24, 2019

  1. Make AOT window resizable

    - preserve aspect ratio on resize
    - reset to default size on leave meeting
    horymury authored and hristoterezov committed Jul 24, 2019
    Copy the full SHA
    3cf9959 View commit details
  2. Copy the full SHA
    d0ad0a4 View commit details
  3. Copy the full SHA
    a5e1f14 View commit details

Commits on Aug 8, 2019

  1. Copy the full SHA
    692cdc4 View commit details

Commits on Oct 3, 2019

  1. Copy the full SHA
    0566dfb View commit details
  2. fix(node12): support

    hristoterezov committed Oct 3, 2019
    Copy the full SHA
    67a8a9b View commit details
  3. Copy the full SHA
    53756cf View commit details

Commits on Oct 4, 2019

  1. Copy the full SHA
    06d7484 View commit details

Commits on Oct 16, 2019

  1. Copy the full SHA
    c5e2a0d View commit details

Commits on Oct 23, 2019

  1. Copy the full SHA
    74dd71a View commit details

Commits on Jan 15, 2020

  1. fix: electron 7

    hristoterezov committed Jan 15, 2020
    Copy the full SHA
    cfa14d0 View commit details

Commits on Feb 3, 2020

  1. Copy the full SHA
    82377d2 View commit details
  2. Copy the full SHA
    3b6562f View commit details

Commits on Feb 20, 2020

  1. Copy the full SHA
    0635f3e View commit details
  2. Copy the full SHA
    58c5204 View commit details
  3. addressed code review

    andrei-gavrilescu authored and hristoterezov committed Feb 20, 2020
    Copy the full SHA
    32843bb View commit details
  4. address code review p2

    andrei-gavrilescu authored and hristoterezov committed Feb 20, 2020
    Copy the full SHA
    93b3297 View commit details
  5. bump version

    andrei-gavrilescu authored and hristoterezov committed Feb 20, 2020
    Copy the full SHA
    601f2af View commit details
  6. update version to 2.0.0

    andrei-gavrilescu authored and hristoterezov committed Feb 20, 2020
    Copy the full SHA
    19f3c34 View commit details
  7. Copy the full SHA
    fcdcc57 View commit details

Commits on Mar 6, 2020

  1. Copy the full SHA
    83fd972 View commit details

Commits on Mar 26, 2020

  1. Copy the full SHA
    8dc9506 View commit details

Commits on Mar 30, 2020

  1. Copy the full SHA
    364d6ad View commit details

Commits on Apr 9, 2020

  1. fix(screenshare): reset permissions for screen capturer on osx >= 10.15

    Co-authored-by: Tudor-Ovidiu Avram <tudor.potecaru@8x8.com>
    quitrk and quitrk authored Apr 9, 2020
    Copy the full SHA
    406ad1f View commit details

Commits on Apr 16, 2020

  1. fix(screenshare): Windows screenshare tracker crash

    * fix windows screen-share tracker crash
    
    * Bump version
    andrei-gavrilescu authored Apr 16, 2020
    Copy the full SHA
    fd05a9b View commit details

Commits on Apr 24, 2020

  1. Copy the full SHA
    42ae5f5 View commit details
  2. Copy the full SHA
    0425a34 View commit details

Commits on May 4, 2020

  1. Copy the full SHA
    988e893 View commit details

Commits on May 20, 2020

  1. Fix for missing browserWindow after closing the windows on macOS

    Daniel Trierweiler authored May 20, 2020
    Copy the full SHA
    f24fbc1 View commit details
  2. Copy the full SHA
    57fed63 View commit details
  3. Bump version to 2.0.7

    andrei-gavrilescu authored and saghul committed May 20, 2020
    Copy the full SHA
    eec4411 View commit details

Commits on Jun 3, 2020

  1. fix(screenshare): Fix screen capture permissions lib not being bundled

    * Fix screen capture permissions lib not being bundled
    
    * Bump version to 2.0.8
    
    Co-authored-by: Tudor-Ovidiu Avram <tudor.potecaru@8x8.com>
    quitrk and quitrk authored Jun 3, 2020
    Copy the full SHA
    e907e06 View commit details

Commits on Jun 17, 2020

  1. AoT close race condition

    ilazar authored and saghul committed Jun 17, 2020
    Copy the full SHA
    ea74f19 View commit details
  2. chore(deps): bump acorn from 7.1.0 to 7.2.0

    Bumps [acorn](https://github.com/acornjs/acorn) from 7.1.0 to 7.2.0.
    - [Release notes](https://github.com/acornjs/acorn/releases)
    - [Commits](acornjs/acorn@7.1.0...7.2.0)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and saghul committed Jun 17, 2020
    Copy the full SHA
    97a7456 View commit details
  3. fix(AOT) uncaught webContents error

    egm0121 authored and saghul committed Jun 17, 2020
    Copy the full SHA
    ba851e7 View commit details

Commits on Aug 10, 2020

  1. fix(AOT): will close event.

    hristoterezov authored and saghul committed Aug 10, 2020
    Copy the full SHA
    4f57cc5 View commit details
  2. Copy the full SHA
    5a22a6a View commit details

Commits on Aug 31, 2020

  1. Revert "fix(screenshare): Fix screen capture permissions lib not bein…

    …g bundled" (#90)
    
    This reverts commit e907e06.
    
    Update version to 2.0.10
    
    Co-authored-by: Tudor-Ovidiu Avram <tudor.potecaru@8x8.com>
    quitrk and quitrk authored Aug 31, 2020
    Copy the full SHA
    30131a4 View commit details

Commits on Sep 25, 2020

  1. feat(AOT): Add logger

    horymury authored and hristoterezov committed Sep 25, 2020
    Copy the full SHA
    22b3946 View commit details

Commits on Nov 26, 2020

  1. fix(popups): Tighten security and checks on popups

    Mihai-Andrei Uscat authored and saghul committed Nov 26, 2020
    Copy the full SHA
    a20f168 View commit details
  2. Bump version to 2.0.11

    Mihai-Andrei Uscat authored and saghul committed Nov 26, 2020
    Copy the full SHA
    62d1fd3 View commit details
  3. chore(deps) update

    saghul committed Nov 26, 2020
    Copy the full SHA
    d8b8574 View commit details
  4. chore(logger): Version bump

    Mihai-Andrei Uscat authored and muscat1 committed Nov 26, 2020
    Copy the full SHA
    ab646ec View commit details
  5. Bump version to 2.0.12

    Mihai-Andrei Uscat authored and muscat1 committed Nov 26, 2020
    Copy the full SHA
    d606da6 View commit details
Showing with 6,641 additions and 4,281 deletions.
  1. +1 −0 .eslintrc.js
  2. +10 −0 .github/dependabot.yml
  3. +67 −0 .github/workflows/ci.yml
  4. +3 −0 .gitignore
  5. +10 −0 .husky/pre-push
  6. +0 −74 .travis.yml
  7. +90 −18 README.md
  8. +0 −19 alwaysontop/alwaysontop.css
  9. +31 −1 alwaysontop/constants.js
  10. +5 −12 alwaysontop/index.js
  11. +0 −179 alwaysontop/main.js
  12. +20 −0 alwaysontop/main/config.js
  13. +323 −0 alwaysontop/main/index.js
  14. +246 −0 alwaysontop/main/utils.js
  15. +0 −357 alwaysontop/render.js
  16. +56 −0 alwaysontop/render/alwaysontop.css
  17. +24 −16 alwaysontop/{ → render}/alwaysontop.js
  18. +338 −0 alwaysontop/render/index.js
  19. +39 −0 alwaysontop/render/utils.js
  20. +0 −38 appveyor.yml
  21. +10 −19 binding.gyp
  22. +42 −0 helpers/functions.js
  23. +15 −6 index.js
  24. +10 −0 install.js
  25. +2 −3 node_addons/sourceId2Coordinates/index.js
  26. +14 −22 node_addons/sourceId2Coordinates/src/index.cc
  27. +0 −7 node_addons/sourceId2Coordinates/src/sourceId2Coordinates.cc
  28. +3,948 −2,412 package-lock.json
  29. +22 −11 package.json
  30. +18 −0 popupsconfig/constants.js
  31. +7 −32 popupsconfig/main.js
  32. +2 −39 popupsconfig/render.js
  33. +53 −0 powermonitor/constants.js
  34. +8 −0 powermonitor/index.js
  35. +106 −0 powermonitor/main.js
  36. +104 −0 powermonitor/render.js
  37. +10 −0 remotecontrol/constants.js
  38. +6 −282 remotecontrol/index.js
  39. +136 −0 remotecontrol/main.js
  40. +236 −0 remotecontrol/render.js
  41. +39 −0 screensharing/constants.js
  42. +5 −33 screensharing/index.js
  43. +235 −0 screensharing/main.js
  44. +16 −0 screensharing/preload.js
  45. +163 −0 screensharing/render.js
  46. +73 −0 screensharing/screenSharingTracker.html
  47. +22 −0 screensharing/screenSharingTracker.js
  48. +60 −0 screensharing/utils.js
  49. +0 −52 test/airport.test.js
  50. +0 −92 test/netsh.test.js
  51. +0 −40 test/procwireless.test.js
  52. +16 −0 test/sourceId2Coordinates.test.js
  53. +0 −122 wifistats/airport.js
  54. +0 −95 wifistats/index.js
  55. +0 −150 wifistats/netsh.js
  56. +0 −150 wifistats/procwireless.js
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@ module.exports = {
'__filename': false
},
'parserOptions': {
'ecmaVersion': 9,
'sourceType': 'module'
},
'rules': {
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "monthly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
67 changes: 67 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: CI

on:
pull_request:
push:
branches:
- master

jobs:
build:
name: Build ${{ matrix.build-group }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-2019
arch: x86
build-group: win32-x86
- os: windows-2019
arch: x64
build-group: win32-x64
env:
BUILD_GROUP: ${{ matrix.build-group }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
architecture: ${{ matrix.arch }}
- run: npm ci
- run: npm run lint
- run: npm test
- name: Prebuildify
run: npm run prebuild-$BUILD_GROUP
shell: bash
- uses: actions/upload-artifact@v4
with:
name: prebuilds-${{ matrix.build-group }}
path: prebuilds/
publish:
name: Publish to npm
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-22.04
needs: build
concurrency:
group: ${{ github.ref }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: prebuilds
pattern: prebuilds-*
merge-multiple: true
- uses: phips28/gh-action-bump-version@fdad52b3b3bbe8fad96b8ca18c56127a96f603db
with:
tag-prefix: 'v'
version-type: 'patch'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -59,3 +59,6 @@ typings/

build/
.jshint*

# vscode settings files
.vscode/
10 changes: 10 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

branch="$(git rev-parse --abbrev-ref HEAD)"

if [ "$branch" = "master" ]; then
echo "You can't commit directly to master branch"
exit 1
fi

74 changes: 0 additions & 74 deletions .travis.yml

This file was deleted.

108 changes: 90 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# jitsi-meet-electron-utils
Utilities for jitsi-meet-electron project.
# Jitsi Meet Electron SDK

SDK for integrating Jitsi Meet into Electron applications.

Supported Electron versions: >= 16.

## Installation
jitsi-meet-electron-utils contains native code for some utilities. You'll need [node-gyp](https://github.com/nodejs/node-gyp) to build it and also you'll need to rebuild the package for Electron. For more information see [Using Native Node Modules](https://github.com/electron/electron/blob/master/docs/tutorial/using-native-node-modules.md) and [electron-rebuild](https://github.com/electron/electron-rebuild).

NOTE: For Linux install libxtst-dev and libpng++-dev (`sudo apt-get install libxtst-dev libpng++-dev`). This dependancies are related to RobotJS which is a dependency of jitsi-meet-electron-utils. You can see the build instructions for RobotJS [here](https://github.com/jitsi/robotjs/tree/jitsi#building)
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
@@ -13,10 +19,13 @@ NOTE: For Linux install libxtst-dev and libpng++-dev (`sudo apt-get install libx
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:

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

// iframe - the Jitsi Meet iframe
const remoteControl = new RemoteControl(iframe);
@@ -29,37 +38,64 @@ remoteControl.dispose();

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

In the **main** electron process:

```Javascript
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:

```Javascript
const {
setupScreenSharingForWindow
} = require("jitsi-meet-electron-utils");
setupScreenSharingRender
} = require("@jitsi/electron-sdk");

// iframe - the Jitsi Meet iframe
setupScreenSharingForWindow(iframe);
// api - The Jitsi Meet iframe api object.
setupScreenSharingRender(api);
```
In the **main** electron process:

```Javascript
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](https://github.com/jitsi/jitsi-meet/blob/master/doc/api.md)
2. The `BrowserWindow` instance where Jitsi Meet is displayed should use the [Chrome's window.open implementation](https://github.com/electron/electron/blob/master/docs/api/window-open.md#using-chromes-windowopen-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`.
4. Electron version `>=1.7.x`.

**Enable the aways on top:**

In the **main** electron process:
```Javascript
const {
setupAlwaysOnTopMain
} = require("jitsi-meet-electron-utils");
} = require("@jitsi/electron-sdk");

// jitsiMeetWindow - The BrowserWindow instance
// of the window where Jitsi Meet is loaded.
@@ -70,7 +106,7 @@ In the **render** electron process of the window where Jitsi Meet is displayed:
```Javascript
const {
setupAlwaysOnTopRender
} = require("jitsi-meet-electron-utils");
} = require("@jitsi/electron-sdk");

const api = new JitsiMeetExternalAPI(...);
const alwaysOnTop = setupAlwaysOnTopRender(api);
@@ -80,23 +116,59 @@ 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

#### WiFi Stats
Provides a function to query for wifi stats on the host computer. Returns information like interface name, addresses, signal quality, noise (not available on all OS).

**WiFi Stats:**
#### Power Monitor

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

**enable power monitor:**
In the **main** electron process:
```Javascript
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:
```Javascript
const {
setupWiFiStats
} = require("jitsi-meet-electron-utils");
setupPowerMonitorRender
} = require("@jitsi/electron-sdk");

const api = new JitsiMeetExternalAPI(...);
setupWiFiStats(api.getIFrame());
setupPowerMonitorRender(api);
```

### NOTE:
You'll need to add 'disable-site-isolation-trials' switch because of [https://github.com/electron/electron/issues/18214](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](https://github.com/jitsi/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
19 changes: 0 additions & 19 deletions alwaysontop/alwaysontop.css

This file was deleted.

Loading