element-desktop icon indicating copy to clipboard operation
element-desktop copied to clipboard

Jitsi screensharing doesn't work on desktop

Open t3chguy opened this issue 8 years ago • 206 comments

given option to share everything or an application window, the latter sees no application windows and hitting share on either does nothing, video stream remains from webcam

t3chguy avatar Aug 25 '17 08:08 t3chguy

maybe needs something like https://github.com/jitsi/jitsi-meet-electron/

t3chguy avatar Aug 25 '17 08:08 t3chguy

Not strictly speaking voip but it's the tag that's most likely to see this issue picked up by the right people.

lampholder avatar Aug 25 '17 11:08 lampholder

Seems to still not be working even though PR https://github.com/matrix-org/matrix-react-sdk/pull/1355 has landed :( image

t3chguy avatar Oct 21 '17 15:10 t3chguy

image

t3chguy avatar Oct 21 '17 15:10 t3chguy

+1

xmeng1 avatar Jan 25 '18 14:01 xmeng1

Now that I have an NVL hat and can see both sides of the issue I'll take a look at it

t3chguy avatar Jan 29 '18 09:01 t3chguy

This seems to have even further regressed as this never fires: https://github.com/matrix-org/matrix-react-sdk/commit/53574541c3a480ee3fda37b642d2e8d1e82c5183#diff-0e2cb0e79e0d376b964d6d11e52c4c45R150

t3chguy avatar Jan 29 '18 22:01 t3chguy

Seems that this is Chrome engine issue, because Jitsi Screen Sharing works well in Riot-web on Firefox, but in Chrome browser - needs separate extension.

MurzNN avatar May 10 '18 08:05 MurzNN

That's not correct. It's a nested iframe issue as I have pointed out above. For electron the extension would not work as electron exposes screen sharing devices via a native api and not gUM, and you can run screensharing in chrome without extensions if you start it with a command line argument

t3chguy avatar May 10 '18 09:05 t3chguy

I'm trying to do desktop sharing, via jitsi channel widget, with the desktop riot client, and it never ends up presenting options to share. When I try to share whole screen, or per app, just spins circles. :(

BloodyIron avatar May 12 '18 04:05 BloodyIron

Can this https://chrome.google.com/webstore/detail/riotim-screen-sharing/ehgcnaneidbjcmblghjepmamomchgahd extension been integrated in Electron app for solve this issue?

MurzNN avatar Aug 10 '18 10:08 MurzNN

Nope. Electron has special screen sharing apis which that extension does not support.

t3chguy avatar Aug 10 '18 11:08 t3chguy

Developers of Jitsi recommend use https://github.com/jitsi/jitsi-meet-electron-utils for solve this permission problem, did you try this way?

MurzNN avatar Aug 20 '18 19:08 MurzNN

@MurzNN Yup that is already fitted but it doesn't work due to it being an iframe inside an iframe and it not getting passed through because of this.

t3chguy avatar Aug 20 '18 19:08 t3chguy

I really wish we could get this solved. Using riot for screen sharing would be seriously useful! :D

BloodyIron avatar Aug 21 '18 01:08 BloodyIron

Seems permission problem can be fixed using new getDisplayMedia() API in Chromium v70 https://groups.google.com/forum/#!msg/discuss-webrtc/Uf0SrR4uxzk/uO8sLrWuEAAJ

MurzNN avatar Oct 17 '18 07:10 MurzNN

Jisti Meet implement new Chrome API via this commit https://github.com/jitsi/jitsi-meet/issues/2233#issuecomment-441087489 so we can update Jitsi lib + Chromium in Riot electron build, and recheck permission problem.

MurzNN avatar Nov 23 '18 08:11 MurzNN

Just been looking at this after encountering the feature and how it's buggy as above. Agreed the way to go here is to let it use getDisplayMedia() once Electron is using a new enough chromium.

dbkr avatar Dec 18 '18 13:12 dbkr

@dbkr: do we magically get this for free after all the recent electron upgrades then?

ara4n avatar Feb 10 '19 23:02 ara4n

Chrome 70 is the magic milestone with getDisplayMedia. Electron 4.0 is chromium 69 - almost!

dbkr avatar Feb 11 '19 10:02 dbkr

Seems update to Chrome 70 will not be done quickly - only in Electron 5.0 https://github.com/electron/electron/issues/15059 :( Also maybe we need Chrome 72, as described in https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia:

Chrome 70 — 72 Notes: Available as a member of Navigator instead of MediaDevices in Chrome 70 and 71.

MurzNN avatar Feb 11 '19 11:02 MurzNN

Together with screensharing, maybe we also can got Remote control feature to Riot, available in Jitsi Meet, too? https://github.com/jitsi/jitsi-meet/issues/1437

MurzNN avatar Feb 11 '19 12:02 MurzNN

Remote control as in during a conference? That could be super handy!

BloodyIron avatar Feb 11 '19 18:02 BloodyIron

Yes, screensharing works in Chromium 70+. Whole screen sharing does not work in Firefox - only separate window (Jitsi has same problem). Why?

For Riot waiting for next Electron version with Chromium 70+?

akontsevich avatar Feb 21 '19 08:02 akontsevich

Just rebuild riot-web using the electron beta. No change, the screen-sharing window still loads for ever. If you want to try you'll need this patch:

diff --git a/electron_app/src/electron-main.js b/electron_app/src/electron-main.js
index 99ddfbd1..c3aa4f5d 100644
--- a/electron_app/src/electron-main.js
+++ b/electron_app/src/electron-main.js
@@ -206,7 +206,10 @@ const launcher = new AutoLaunch({
 // work.
 // Also mark it as secure (ie. accessing resources from this
 // protocol and HTTPS won't trigger mixed content warnings).
-protocol.registerStandardSchemes(['vector'], {secure: true});
+//protocol.registerStandardSchemes(['vector'], {secure: true});
+protocol.registerSchemesAsPrivileged([{
+    scheme: 'vector', privileges: {standard: true, secure: true, supportFetchAPI: true},
+}]);
 
 app.on('ready', () => {
     if (argv['devtools']) {
diff --git a/electron_app/src/preload.js b/electron_app/src/preload.js
index 3a4f7c9a..f63e19d4 100644
--- a/electron_app/src/preload.js
+++ b/electron_app/src/preload.js
@@ -23,7 +23,7 @@ window.ipcRenderer = ipcRenderer;
 // protocol: this is necessary to load olm.wasm.
 // (Also mark it a secure although we've already
 // done this in the main process).
-webFrame.registerURLSchemeAsPrivileged('vector', {
+/*webFrame.registerURLSchemeAsPrivileged('vector', {
     secure: true,
     supportFetchAPI: true,
-});
+});*/

pinpox avatar Apr 05 '19 15:04 pinpox

Jitsi would have to update to get rid of their electron special case most likely

t3chguy avatar Apr 05 '19 17:04 t3chguy

Since @akontsevich mentions it works in Chromium 70+ but not FIrefox, are we also testing for this as a desktop application? (Win/Mac/Lin). Namely because the web interface being able to do this is awesome, but I think it's also worth keeping in-mind the desktop app facet of it too.

I really hope we can get this sorted because this is something I and others around me would use very regularly!

I can't recall, are we just talking about this for rooms, or for 1on1's too?

BloodyIron avatar Apr 05 '19 20:04 BloodyIron

Orr 1:1 the interface is different and you can't select what to share (unless the browser let's you like Firefox does) or less you fire up a jitsi widget but it does work. (shift click the video call button in a 1:1)

t3chguy avatar Apr 05 '19 23:04 t3chguy

To clarify: I was testing this with the desktop app on Linux (Arch).It works fine in Chromium (not in Firefox though)

pinpox avatar Apr 06 '19 14:04 pinpox

Are there any (working) alternatives for the jitsi video conference widget that support screen sharing? I would consider using something else in matrix rooms as a workaround until this is fixed.

pinpox avatar Apr 08 '19 07:04 pinpox