mattermost-plugin-jitsi icon indicating copy to clipboard operation
mattermost-plugin-jitsi copied to clipboard

Unable to share screen when using Jitsi embedded in desktop app

Open DHaussermann opened this issue 4 years ago • 26 comments

When using Jitsi in desktop, the app is unable to find any screens to share. The app just continues to show a spinner while looking for desktops or apps to share. This only repros when using Jisti embed into desktop with Embed Jitsi video inside Mattermost

I reproduced this on the latest desktop release v4.5.0 on Windows 10 and Mac OS

Steps:

  • Setup Jisti
  • Enable Embed Jitsi video inside Mattermost
  • Connect to server from desktop
  • Join a meeting
  • Attempt to share your screen
  • Wait for several minutes

Observed: Screen Shot 2020-06-24 at 2 31 01 PM

DHaussermann avatar Jun 24 '20 19:06 DHaussermann

@DHaussermann this is probably due security restrictions of the desktop app. @Willyfrog can you verify that? Is there a way that we can open that from a plugin? Can we trigger somehow asking the user for permission like the browser does? @jupenur from the security point of view, should we allow this from the desktop app?

jespino avatar Jun 24 '20 20:06 jespino

Are there any errors in the console?

Plugins are expected to be load in a pop-up window, while the main window only expects to load resources related to the team (/api is excluded for example)

Regarding permissions, that are already granted. On Mac there might be some tweaks needed as it needs a manifest file for mic and video permissions and we are not shipping it currently, but permissions should work on windows and Linux without any extra work

Willyfrog avatar Jun 24 '20 20:06 Willyfrog

That is failing for me in Linux too in desktop 4.4.0/Linux

jespino avatar Jun 24 '20 20:06 jespino

Is there a public instance where I can take a look? Or dm the details if it's not public

Willyfrog avatar Jun 24 '20 20:06 Willyfrog

@Willyfrog this is the UA string bug again, right? We patched the popup window, but the main window still uses the custom UA string that breaks Jitsi?

jupenur avatar Jun 24 '20 20:06 jupenur

I thought about it, and that's one thing I want to test, but the main window only adds two elements to the UA, the chrome part is the one passed from electron. In the other issue, jitsi was using the popup window which removes chrome's version string to trick oauth

Willyfrog avatar Jun 24 '20 20:06 Willyfrog

I can have a look tomorrow if you like, since I've already worked on both this plugin and Jitsi stuff in the desktop app.

jupenur avatar Jun 24 '20 21:06 jupenur

This would be the cause: https://github.com/electron/electron/issues/16513

jupenur avatar Jun 25 '20 06:06 jupenur

if that is the case, we could try creating a build adding this to the preload screen and see if that fixes it

Willyfrog avatar Jun 25 '20 08:06 Willyfrog

also, I don't see the tag for v8, does that mean it is fixed in later versions? if so, I have this branch which is the upgrade to v8. Bear in mind that the upgrade is not yet completed, so something might break, but if someone wants to try it, let me know.

Willyfrog avatar Jun 25 '20 09:06 Willyfrog

I don't think it's fixed in v8 either. As for the preload polyfill, that won't work in an iframe unless you set nodeIntegrationInSubFrames to true and that doesn't seem like something we'd want to do.

jupenur avatar Jun 25 '20 09:06 jupenur

i did a quick test with the electron8 branch and looks promising, but I didn't have anyone to talk to... Screenshot 2020-06-25 at 12 09 48 it asked me for permissions to access video and audio, which it didn't in 4.5 (electron v7)

Willyfrog avatar Jun 25 '20 10:06 Willyfrog

Hello, I experience the same using the desktop app on Linux. The developer console shows this: [features/desktop-picker] Called JitsiMeetElectron.obtainDesktopStreams but it is not defined I hope it helps.

marietta avatar Jul 14 '20 22:07 marietta

Is there any progress towards resolving this? It's kind of unintuitive to tell users that there's a share screen button, but you can't use it unless you hit another button to open the conference in a browser first.

mhamiltonj avatar Oct 01 '20 15:10 mhamiltonj

we are currently working on a major architectural change on the desktop to allow native modules, which will make possible to add https://github.com/jitsi/jitsi-meet-electron which might help with the jitsi experience

Willyfrog avatar Oct 02 '20 09:10 Willyfrog

we are currently working on a major architectural change on the desktop to allow native modules, which will make possible to add https://github.com/jitsi/jitsi-meet-electron which might help with the jitsi experience

OK, thank's for the update.

mhamiltonj avatar Oct 05 '20 08:10 mhamiltonj

Tracked here: https://mattermost.atlassian.net/browse/MM-27253

larkox avatar Jan 13 '21 16:01 larkox

@larkox is this issue resolved or can I work on it?

maisnamrajusingh avatar Aug 31 '21 02:08 maisnamrajusingh

@maisnamrajusingh This is still open. Please sync with @Willyfrog , since he was the last one to look into this.

larkox avatar Aug 31 '21 07:08 larkox

For this to work we need to have native modules being able to be shipped with the app. We have attempted a few times and seems we get closer each time but no luck yet.

Willyfrog avatar Aug 31 '21 14:08 Willyfrog

So the linked Atlassian issue has been closed with "Don't see any immediate need for this". OK, here is my pitch for why this should be fixed in the nearish future: This is one of the things that makes Mattermost appear not competitive to Microsoft Teams. I know, I know, users can just open the meeting in their browser, but guess what, most users want stuff to just work, they don't like meetings in their browser, because there are all sorts of things that broswers do that break meetings (like bad audio device permissions). Users want to be able to start a meeting from a chat channel and share their screen, just like they can in Teams. This bug makes it very hard for me to advocate convincingly for our continued use of both Mattermost and Jitsi. As a better than nothing solution, is there a way to have the plugin launch meetings in the Jitsi desktop app, instead of the browser?

mhamiltonj avatar Dec 01 '22 10:12 mhamiltonj

Can confirm, in 2023 this bug is bugging me out, hot damn potatoes, jeesles christ, well if yall dont want to fix the jistsi stuff then maybe add video camera support to integrated calls plugin? I like the calls plugin because you can comment on it during the call and the comments are saved right then and there in the call thread, unlike in the jitsi meet, if you comment on the call its saved in the jitsi lib, unless you specifically opened a thread on mm post with the jitsi call ID. Discord has it done quite well, the only problem with that is that i cant have it on my own server, and there is always a possibility that my delicious data will be licked by some boomer-esque sasquatch.

andzejsp avatar Jan 10 '23 07:01 andzejsp

Can confirm, in 2023 this bug is bugging me out, hot damn potatoes, jeesles christ, well if yall dont want to fix the jistsi stuff then maybe add video camera support to integrated calls plugin? I like the calls plugin because you can comment on it during the call and the comments are saved right then and there in the call thread, unlike in the jitsi meet, if you comment on the call its saved in the jitsi lib, unless you specifically opened a thread on mm post with the jitsi call ID. Discord has it done quite well, the only problem with that is that i cant have it on my own server, and there is always a possibility that my delicious data will be licked by some boomer-esque sasquatch.

I believe I saw that the video option bundled with Mattermost is a premium feature. No idea how it works, since I am running the free license, so I feel your pain. It'll come around, though...

megamaiku avatar Feb 01 '23 10:02 megamaiku

Same loading image for me on Linux and Macos up-to-date desktop clients. No asking of permissions, silently spins indicator only. Working good in Chrome and bad in Safari.

dreyTee avatar Mar 13 '23 12:03 dreyTee

@DHaussermann I explored a bit on this issue and also looked at similar issues on Google. Explored how electron works and how the desktop app code can be linked to the Jitsi plugin code. After all this research, i tried some approaches:

  1. In this electron issue someone has mentioned that he was able to fix the issue in electron. So, we tried updating all the electron dependencies to their latest version but the issue still remained the same.

  2. We thought of dispatching an event from the Jitsi plugin when the screen sharing button is clicked and then we can catch the event on the desktop app side and use desktop capturer in some way to show the screens. But Jitsi meets API does not provide any event which is triggered after clicking the screen sharing button.

  3. We thought of using a web view kind of thing for displaying Jitsi meet in embedded mode but we will end up changing the whole logic we are currently using for displaying the Jitsi meet that's why we have not explored much on this approach whether this is possible or not. Let us know your thought and then we can explore further on this.

This was all we were able to do till now and we are kind of stuck now as the issue is still not resolved. Please let us know if you have any other approach in mind and we can look into that.

raghavaggarwal2308 avatar Apr 28 '23 12:04 raghavaggarwal2308

Same issue in Element Matrix desktop client with JItsi. Just loading gif, can't access to Windows or Linus screen recources. Mainbug of all time...

dimkaskv avatar Apr 12 '24 21:04 dimkaskv