Screen sharing fails to start when doing a call from Firefox with startScreenSharing = true in the config
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.
Screen sharing starts properly when the call start.
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);
Jitsi-meet trunk with external api and custom server Ubuntu 18.04.4 LTS.
Firefox 73.0.1 (64-bit)
@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
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.