Jitsi-meet: Screen sharing fail on Firefox with config startScreenSharing = true

Created on 9 Mar 2020  Â·  6Comments  Â·  Source: jitsi/jitsi-meet

From here : https://community.jitsi.org/t/screen-sharing-fail-on-firefox-desktop-until-user-click-at-least-once-on-the-jitsi-iframe/22384

Description

Screen sharing fails to start when doing a call from Firefox with startScreenSharing = true in the config

Current behavior

The call is establish, but the screen sharing doesn't start. (browser doesn't even ask for permission). Video doesn't start either, only the mic is on.
Error message from the console:

2020-03-05T10:36:38.338Z [modules/RTC/RTCUtils.js] : Using the new gUM flow Logger.js:154:22

2020-03-05T10:36:38.338Z [modules/RTC/ScreenObtainer.js] : Using getDisplayMedia for screen sharing Logger.js:154:22

2020-03-05T10:36:38.339Z [features/base/tracks] <E/</<>: Failed to create local tracks

Array [ “desktop” ]

Object { name: “gum.chrome_extension_user_canceled”, message: “User canceled Chrome’s screen sharing prompt”, stack: “a@https://jitsi.-----------.com/libs/lib-jitsi-meet.min.js?v=3863:6:114711\nobtainScreenFromGetDisplayMedia/<@https://jitsi.-----------.com/libs/lib-jitsi-meet.min.js?v=3863:6:175762\n” }

Logger.js:154:22

2020-03-05T10:36:38.342Z [conference.js] : Failed to switch to screensharingObject { name: “gum.chrome_extension_user_canceled”, message: “User canceled Chrome’s screen sharing prompt”, stack: “a@https://jitsi.-----------.com/libs/lib-jitsi-meet.min.js?v=3863:6:114711\nobtainScreenFromGetDisplayMedia/<@https://jitsi.-----------.com/libs/lib-jitsi-meet.min.js?v=3863:6:175762\n” }

Note : Almost the same bug can be reproduce without starting with screen sharingstartScreenSharing = true. Start a normal call, with video by default. Wait for the call to be establish, and just give permission for the webcam to start to the browser, but don't click anywhere in the iframe. Then send a command api.executeCommand('toggleShareScreen'). If no interaction took place with the iframe until now (no click, no tab into), then the screen sharing fail with exactly the same error message as above.

Expected Behavior

Screen sharing starts properly when the call start.

## Possible Solution

Steps to reproduce

Toggle startScreenSharing = true in the config and start a call on Firefox, using external api

const options = {
        roomName: `${support_id}${myInfo.jroom_pw}`,
        parentNode: document.querySelector('#panelarea'),
    };
    api = new JitsiMeetExternalAPI(myInfo.server, options);

Environment details

Jitsi-meet trunk with external api and custom server Ubuntu 18.04.4 LTS.
Firefox 73.0.1 (64-bit)

Most helpful comment

And after a bit more research it appears it's a change in the w3c spec itself:
https://bugzilla.mozilla.org/show_bug.cgi?id=1580944
https://github.com/w3c/mediacapture-screen-share/pull/106
So yes, nothing we can do.

All 6 comments

@jallamsetty1 can you please look at this when you have a chance?

Starting from firefox 74, screen sharing now always fails, whatever startScreenSharing is true or not. Same error message as above.

Sorry the screensharing failure for Firefox 74 was a different issue. I made a pull request here:
https://github.com/jitsi/jitsi-meet/pull/5180

With this fix, we are back to the same situation. Screensharing fail on Firefox with startScreenSharing = true, or if no interaction at all with the iframe before sending command 'toggleShareScreen'.

I think there is nothing we can do here, if Firefox now requires a user interaction, that's that. I'm tentatively closing. Holler if you find a solution!

And after a bit more research it appears it's a change in the w3c spec itself:
https://bugzilla.mozilla.org/show_bug.cgi?id=1580944
https://github.com/w3c/mediacapture-screen-share/pull/106
So yes, nothing we can do.

And after a bit more research it appears it's a change in the w3c spec itself:
https://bugzilla.mozilla.org/show_bug.cgi?id=1580944
w3c/mediacapture-screen-share#106
So yes, nothing we can do.

https://www.w3.org/TR/screen-capture/#mediadevices-additions

Was this page helpful?
0 / 5 - 0 ratings

Related issues

532910 picture 532910  Â·  3Comments

eceforge picture eceforge  Â·  3Comments

jidanni picture jidanni  Â·  3Comments

wilddylan picture wilddylan  Â·  4Comments

mlelyakan picture mlelyakan  Â·  4Comments