Skip to content

Commit

Permalink
Merge pull request #72 from freifunkMUC/ffmuc_v2023.11.3
Browse files Browse the repository at this point in the history
Update to v2023.11.3
  • Loading branch information
krombel authored Jan 13, 2024
2 parents a31ed18 + 40ba1bd commit 1c66c5e
Show file tree
Hide file tree
Showing 12 changed files with 4,290 additions and 2,414 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ jobs:
path: |
dist/ffmuc-meet-amd64.deb
dist/ffmuc-meet-x86_64.AppImage
dist/ffmuc-meet-arm64.deb
dist/ffmuc-meet-arm64.AppImage
dist/latest-linux.yml
dist/latest-linux-arm64.yml
build-mac:
name: macOS
runs-on: macos-11
Expand All @@ -50,6 +53,7 @@ jobs:
echo '${{ secrets.api_key }}' > ~/private_keys/AuthKey_${{ secrets.api_key_id }}.p8
echo "CSC_LINK=${{ secrets.mac_certs }}" >> $GITHUB_ENV
echo "CSC_KEY_PASSWORD=${{ secrets.mac_certs_password }}" >> $GITHUB_ENV
echo "CSC_FOR_PULL_REQUEST=true" >> $GITHUB_ENV
echo "API_KEY_FILE=~/private_keys/AuthKey_${{ secrets.api_key_id }}.p8" >> $GITHUB_ENV
echo "API_KEY_ID=${{ secrets.api_key_id }}" >> $GITHUB_ENV
echo "API_KEY_ISSUER_ID=${{ secrets.api_key_issuer_id }}" >> $GITHUB_ENV
Expand Down
88 changes: 42 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Desktop application for [Jitsi] built with [Electron].
- [End-to-End Encryption](https://jitsi.org/blog/e2ee/) support (BETA)
- Works with any Jitsi Meet deployment
- Builtin auto-updates
- Screensharing (Windows, Mac, X11 only. Not supported under Wayland, see known issues below)
- ~Remote control~ (currently [disabled](https://github.com/jitsi/jitsi-meet-electron/issues/483) due to [security issues](https://github.com/jitsi/security-advisories/blob/master/advisories/JSA-2020-0001.md))
- Always-On-Top window
- Support for deeplinks such as `jitsi-meet://myroom` (will open `myroom` on the configured Jitsi instance) or `jitsi-meet://jitsi.mycompany.com/myroom` (will open `myroom` on the Jitsi instance running on `jitsi.mycompany.com`)
Expand All @@ -17,9 +18,11 @@ Desktop application for [Jitsi] built with [Electron].

Download our latest release and you're off to the races!

| Windows | macOS | GNU/Linux (64-bit only) |
| -- | -- | -- |
| [Download](https://github.com/freifunkMUC/jitsi-meet-electron/releases/latest/download/ffmuc-meet.exe) | [Download](https://github.com/freifunkMUC/jitsi-meet-electron/releases/latest/download/ffmuc-meet.dmg) | [Download](https://github.com/freifunkMUC/jitsi-meet-electron/releases/latest/download/ffmuc-meet-x86_64.AppImage) |
| Windows | macOS | GNU/Linux (AppImage) | GNU/Linux (Deb) |
| -- | -- | -- | -- |
| [Download](https://github.com/freifunkMUC/jitsi-meet-electron/releases/latest/download/ffmuc-meet.exe) | [Download](https://github.com/freifunkMUC/jitsi-meet-electron/releases/latest/download/ffmuc-meet.dmg) | [x64_64](https://github.com/freifunkMUC/jitsi-meet-electron/releases/latest/download/ffmuc-meet-x86_64.AppImage) [arm64](https://github.com/freifunkMUC/jitsi-meet-electron/releases/latest/download/ffmuc-meet-arm64.AppImage) | [x86_64](https://github.com/jitsi/jitsi-meet-electron/releases/latest/download/ffmuc-meet-amd64.deb) [arm64](https://github.com/freifunkMUC/jitsi-meet-electron/releases/latest/download/ffmuc-meet-arm64.deb) |

NOTE: The GNU/Linux builds are 64-bit only.

### Homebrew

Expand Down Expand Up @@ -48,7 +51,7 @@ npm install --global --production windows-build-tools

<details><summary>Extra dependencies for GNU/Linux</summary>

X11, PNG and zlib development packages are necessary. On Debian-like systems then can be installed as follows:
X11, PNG, and zlib development packages are necessary. On Debian-like systems, they can be installed as follows:

```bash
sudo apt install libx11-dev zlib1g-dev libpng-dev libxtst-dev
Expand All @@ -67,58 +70,55 @@ npm install
npm start
```

The debugger tools are available when running in dev mode and can be activated with keyboard shortcuts as defined here https://github.com/sindresorhus/electron-debug#features.
The debugger tools are available when running in dev mode, and can be activated with keyboard shortcuts as [defined here](https://github.com/sindresorhus/electron-debug#features).

It can also be displayed automatically from the `SHOW_DEV_TOOLS` environment variable such as:
They can also be displayed automatically with the application `--show-dev-tools` command line flag, or with the `SHOW_DEV_TOOLS` environment variable as shown:

```bash
SHOW_DEV_TOOLS=true npm start
```

or from the application `--show-dev-tools` command line flag.

#### Building the production distribution

```bash
npm run dist
```

#### Working with jitsi-meet-electron-sdk
#### Working with `jitsi-meet-electron-sdk`

[jitsi-meet-electron-sdk] is a helper package which implements many features
[`jitsi-meet-electron-sdk`] is a helper package which implements many features
such as remote control and the always-on-top window. If new features are to be
added / tested, running with a local version of these utils is very handy, here
is how to do that.
added or tested, running with a local version of these utils is very handy.

By default the @jitsi/electron-sdk is build from npm. The default dependency path in package.json is:
By default, the @jitsi/electron-sdk is build from `npm`. The default dependency path in `package.json` is:

```json
"@jitsi/electron-sdk": "^3.0.0"
```

To work with local copy you must change the path to:
To work with a local copy, you must change the path to:

```json
"@jitsi/electron-sdk": "file:///Users/name/jitsi-meet-electron-sdk-copy",
```

To build the project you must force it to take the sources as `npm update` will
To build the project, you must force it to take the sources, as `npm update` will
not do it.

```bash
npm install @jitsi/electron-sdk --force
```

NOTE: Also check the [jitsi-meet-electron-sdk README] to see how to configure
NOTE: Also check the [`jitsi-meet-electron-sdk` `README`] to see how to configure
your environment.

#### Publishing

1. Create release branch: `git checkout -b release-1-2-3`, replacing 1-2-3 with the desired release version
1. Create release branch: `git checkout -b release-1-2-3`, replacing `1-2-3` with the desired release version
2. Increment the version: `npm version patch`, replacing `patch` with `minor` or `major` as required
3. Push release branch to github: `git push -u origin release-1-2-3`
4. Create PR: `gh pr create`
5. Once PR is reviewed and ready to merge, create draft Github release: `gh release create v1.2.3 --draft --title 1.2.3`, replacing v1.2.3 and 1.2.3 with the desired release version
5. Once PR is reviewed and ready to merge, create draft Github release: `gh release create v1.2.3 --draft --title 1.2.3`, replacing `v1.2.3` and `1.2.3` with the desired release version
6. Merge PR
7. Github action will build binaries and attach to the draft release
8. Test binaries from draft release
Expand All @@ -130,41 +130,37 @@ your environment.

### Windows

A warning will show up mentioning the app is unsigned upon first install. This is expected.
A warning that the app is unsigned will show up upon first install. This is expected.

### macOS

On macOS Catalina a warning will be displayed on first install. The app won't open unless "open" is pressed. This dialog is only shown once.
On macOS Catalina, a warning will be displayed on first install. The app won't open unless "open" is pressed. This dialog is only shown once.

### GNU/Linux

If after downloading it, you can't execute the file directly, try running `chmod u+x ./jitsi-meet-x86_64.AppImage`

On Ubuntu 22.04 the AppImage will fail with a fuse error (as AppImage uses libfuse2, while 22.04 already comes with libfuse3 by default):

```
dlopen(): error loading libfuse.so.2
```
* If you can't execute the file directly after downloading it, try running `chmod u+x ./jitsi-meet-x86_64.AppImage`

To fix this, install libfuse2 as follows:
* Under wayland, screensharing is currently buggy:
* Sharing a full screen is not possible
* When trying to start screensharing under wayland, 2 permission popups will show up. First a pipewire based system selector, then a jitsi internal selector. Select an application window in the first selector and then the same in the jitsi internal selector. Sharing application windows works via this, sharing a full screen unfortunately not.

```
sudo apt install libfuse2
```
* On Ubuntu 22.04, the AppImage will fail with a fuse error (as the AppImage uses `libfuse2`, while 22.04 comes with `libfuse3` by default):

Under wayland, experimental native wayland support can be enabled with the command-line switch `--ozone-platform-hint` set to `auto`:
```
dlopen(): error loading libfuse.so.2
```

```
./jitsi-meet-x86_64.AppImage --ozone-platform-hint=auto
```
To fix this, install libfuse2 as follows:

Note that screen-sharing is currently not supported under wayland, eg. the permissions prompt may loop endlessly.
```
sudo apt install libfuse2
```

In case you experience a blank page after jitsi server upgrades, try removing the local cache files:
* If you experience a blank page after jitsi server upgrades, try removing the local cache files:

```
rm -rf ~/.config/Jitsi\ Meet/
```
```
rm -rf ~/.config/Jitsi\ Meet/
```

<details><summary>NOTE for old GNU/Linux distributions</summary>

Expand All @@ -176,7 +172,7 @@ Please upgrade to the latest NSS, and if you still get this error, contact your
distribution maintainer.
```

If you do, please install NSS (example for Debian / Ubuntu):
If you do, please install NSS (example for Debian or Ubuntu):

```bash
sudo apt-get install libnss3
Expand All @@ -186,7 +182,7 @@ sudo apt-get install libnss3

## Translations

The json files are for all the strings inside the application and can be translated [here](/app/i18n/lang).
The JSON files are for all the strings inside the application, and can be translated [here](/app/i18n/lang).

New translations require the addition of a line in [index.js](/app/i18n/index.js).

Expand All @@ -199,13 +195,13 @@ Apache 2. See the [LICENSE] file.

## Community

Jitsi is built by a large community of developers, if you want to participate,
please join them!
Jitsi is built by a large community of developers. If you want to participate,
please join the [community forum].

[FreifunkMeet]: https://github.com/FreifunkMUC/jitsi-meet
[Electron]: https://electronjs.org/
[latest release]: https://github.com/FreifunkMUC/jitsi-meet-electron/releases/latest
[jitsi-meet-electron-utils]: https://github.com/jitsi/jitsi-meet-electron-utils
[jitsi-meet-electron-utils README]: https://github.com/FreifunkMUC/jitsi-meet-electron-utils/blob/master/README.md
[`jitsi-meet-electron-sdk`]: https://github.com/jitsi/jitsi-meet-electron-sdk
[`jitsi-meet-electron-sdk` `README`]: https://github.com/jitsi/jitsi-meet-electron-sdk/blob/master/README.md
[community forum]: https://community.jitsi.org/
[LICENSE]: LICENSE
38 changes: 36 additions & 2 deletions app/features/conference/components/Conference.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ class Conference extends Component<Props, State> {
*/
_conference: Object;

/**
* Whether the iframe was loaded or not.
*/
_iframeLoaded: boolean;

/**
* Timer to cancel the joining if it takes too long.
*/
Expand Down Expand Up @@ -149,6 +154,22 @@ class Conference extends Component<Props, State> {
}
}

/**
* Handle joining another another meeing while in one.
*
* @param {Object} prevProps - The previous props.
* @returns {void}
*/
componentDidUpdate(prevProps) {
if (prevProps.location.key !== this.props.location.key) {

// Simulate a re-mount so the new meeting is joined.
this._iframeLoaded = false;
this.componentWillUnmount();
this.componentDidMount();
}
}

/**
* Implements React's {@link Component#render()}.
*
Expand Down Expand Up @@ -209,16 +230,20 @@ class Conference extends Component<Props, State> {

const options = {
configOverwrite,
onload: this._onIframeLoad,
parentNode: this._ref.current,
roomName
roomName,
sandbox: 'allow-scripts allow-same-origin allow-popups allow-forms'
};

this._api = new JitsiMeetExternalAPI(host, {
...options,
...urlParameters
});

// This event is fired really early, at the same time as 'ready', but has been
// around for longer.
// TODO: remove after a while. -saghul
this._api.on('browserSupport', this._onIframeLoad);

this._api.on('suspendDetected', this._onVideoConferenceEnded);
this._api.on('readyToClose', this._onVideoConferenceEnded);
Expand Down Expand Up @@ -288,6 +313,15 @@ class Conference extends Component<Props, State> {
* @returns {void}
*/
_onIframeLoad() {
if (this._iframeLoaded) {
// Skip spurious event after meeting close.
return;
}

console.log('IFrame loaded');

this._iframeLoaded = true;

if (this._loadTimer) {
clearTimeout(this._loadTimer);
this._loadTimer = null;
Expand Down
2 changes: 1 addition & 1 deletion app/features/conference/external_api.js

Large diffs are not rendered by default.

24 changes: 20 additions & 4 deletions app/features/recent-list/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,19 @@ export default (state: State = DEFAULT_STATE, action: Object) => {
}
};

/**
* Cleans a room name of all parameters.
*
* @param {string} roomName - The room name to be cleaned.
* @returns {string} - The cleaned up room name.
*/
function _cleanRoomName(roomName: string) {
const [ noQuery ] = roomName.split('?', 2);
const [ noParams ] = noQuery.split('#', 2);

return noParams;
}

/**
* Insert Conference details in the recent list array.
*
Expand All @@ -61,9 +74,11 @@ function _insertConference(
// Add start time to conference.
newConference.startTime = Date.now();

newConference.room = _cleanRoomName(newConference.room);

// Remove same conference.
const newRecentList: Array<RecentListItem> = recentList.filter(
(conference: RecentListItem) => conference.room !== newConference.room
(conference: RecentListItem) => _cleanRoomName(conference.room) !== newConference.room
|| conference.serverURL !== newConference.serverURL);

// Add the conference at the beginning.
Expand Down Expand Up @@ -99,11 +114,12 @@ function _updateEndtimeOfConference(
recentList: Array<RecentListItem>,
conference: RecentListItem
) {
for (const item of recentList) {
if (item.room === conference.room
for (const item of recentList.slice()) {
item.room = _cleanRoomName(item.room);

if (item.room === _cleanRoomName(conference.room)
&& item.serverURL === conference.serverURL) {
item.endTime = Date.now();
break;
}
}

Expand Down
9 changes: 5 additions & 4 deletions app/features/utils/openExternalLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const { shell } = require('electron');
const url = require('url');


const protocolRegex = /^(https?|mailto):/i;

/**
* Opens the given link in an external browser.
*
Expand All @@ -19,7 +17,10 @@ export function openExternalLink(link) {
return;
}

if (protocolRegex.test(u.protocol)) {
shell.openExternal(link);
const proto = u.protocol;
const href = u.href;

if (proto === 'http:' || proto === 'https:' || proto === 'mailto:') {
shell.openExternal(href);
}
}
1 change: 1 addition & 0 deletions app/i18n/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const languages = {
es: { translation: require('./lang/es.json') },
fr: { translation: require('./lang/fr.json') },
gl: { translation: require('./lang/gl.json') },
hi: { translation: require('./lang/hi.json') },
hr: { translation: require('./lang/hr.json') },
hu: { translation: require('./lang/hu.json') },
it: { translation: require('./lang/it.json') },
Expand Down
Loading

0 comments on commit 1c66c5e

Please sign in to comment.