jitsi / jitsi-meet-electron

Jitsi Meet desktop application powered by :electron:
Apache License 2.0
1.5k stars 460 forks source link

Does not handle HTTPS meeting URLs #509

Open aniqueta opened 3 years ago

aniqueta commented 3 years ago

Description:

If Jitsi-Meet is sent an https:// link it does not handle it appropriately.

Since the use of jitsi-meet:// protocol links is rare, I was trying to use another utility to detect and pass https://meet.jit.si/* links from any app to the Jitsi.meet app. This works to open the Jitsi Meet Electron app, but the app does nothing and does not open the meeting link, as it would if the protocol was jitsi-meet://.

Unfortunately, I'm not aware of a utility that can rewrite the link to use the protocol handler instead.

I do not believe this is an issue with the utility that detects and passes these links, since this approach works with other Electron apps.

Thanks for considering.

Steps to reproduce:

  1. On macOS, setup Choosy to detect https://meet.jit.si/* URLs and set Jitsi Meet Electron app as the target to send these URLs
  2. Click on a https://meet.jit.si/meetingname link

Expected behavior:

Jitsi Meet Electron app opens and navigates to the meeting named in the link.

Actual behavior:

Jitsi Meet Electron app opens but does nothing and does not navigate to the meeting named in the link.

Client information:

saghul commented 3 years ago

How is the app launched, with the URL as a parameter?

sonnyp commented 3 years ago

Same problem here. The URL is passed as an immediate parameter.

The URI handler just does not support http links and will return if the string does not contain jitsi-meet

https://github.com/jitsi/jitsi-meet-electron/blob/77a203e4b1cb7671e309f9e560fef73b59260a97/main.js#L274

I use the flatpak but the test case to reproduce is simpler with the AppImage:

Loads the meeting:

./jitsi-meet-x86_64.AppImage jitsi-meet://VerbalSelvesTipRound

Loads the home page:

./jitsi-meet-x86_64.AppImage https://meet.jit.si/VerbalSelvesTipRound

Fedora 34 Jitsi Meet 2.8.6

aniqueta commented 3 years ago

How is the app launched, with the URL as a parameter?

Sorry about not getting back. I was not able to determine this and the dev for Choosy never replied.

georgebrock commented 3 years ago

Choosy is my app. The low-level mechanism for how Choosy sends URLs to applications is an Apple Event, but from the receiving app's perspective you don't need to worry too much about the events themselves as long as you do two things:

  1. Include https in the list of CFBundleURLTypes in your application's Info.plist file. Presumably this is handled in electron by the protocols entry in package.json.
  2. Handle requests to open URLs. In a native macOS app that would involve implementing the application(_:open:) function in your application delegate. I'm not as familiar with Electron, but form a quick look at the docs it appears you need to handle the open-uri event.
SignFinder commented 8 months ago

The same situation in WIndows with browsers. Jitsi-electron redirects the external authorization URL to the browser and after successful authorization the meeting opens in browser.

saghul commented 8 months ago

We redirect using the custom URL scheme. Are you using the latest Electron app and connecting to meet.jit.si or is your setup different?

SignFinder commented 7 months ago

We redirect using the custom URL scheme. Are you using the latest Electron app and connecting to meet.jit.si or is your setup different?

Hi saghul, My setup is selfhosted Jitsi Meet with openid authorization. I run Jitsi meet electron, version 2024.1.0 on Windows 11. The problem is that when I am trying to connect to meeting, there is redirect to the browser for authorization is appearing and meeting opens in browser too. And I have not found the way to return the meeting to the application from browser.

saghul commented 7 months ago

The redirection needs to happen in your auth app. For meet.jit.si we use Firebase auth for example, and there we redirect to the custom scheme, so the app opens.

That is really not something this app can or should solve.

SignFinder commented 7 months ago

saghul, thank you very much for explanation. Mighty someone will find the solution how to handle url in browser and open it after successfull authorization in jitsi-electron. I have tried to read about current state how browsers redirect urls to apps, but did not found anything helpful yet.

saghul commented 7 months ago

If you redirect to jitsi-meet://your-domain.tld/your-meeting the Electron app should take over.