Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: desktopCapturer in electron 17+ (fixes #59) #61

Merged
merged 1 commit into from
Apr 29, 2022

Conversation

kris7t
Copy link
Member

@kris7t kris7t commented Apr 29, 2022

Pre-flight Checklist

  1. Please remember that if you are logging a bug for some service that has stopped working or is working incorrectly, please log the bug here
  2. If you are requesting support for a new service in Ferdium, please log it here
  3. Please remember to read the self-help documentation - in case it helps you unblock yourself for issues related to older versions of recipes that were installed on your machine. (These will get automatically upgraded when you upgrade to the newer versions of Ferdium, but to get new recipes between Ferdium releases, this documentation is quite useful.)
  4. Please ensure you've completed all of the following.

Description of Change

This patch adds a new IPC message from the service renderer to the main process so it can still invoke desktopCapturer.getSources as per https://www.electronjs.org/docs/latest/breaking-changes#removed-desktopcapturergetsources-in-the-renderer

Motivation and Context

Since electron 17, desktopCapturer is only available in the main process: https://www.electronjs.org/blog/electron-17-0#desktopcapturergetsources-in-the-renderer

This should fix #59 and maybe also #32.

Checklist

  • My pull request is properly named
  • The changes respect the code style of the project (npm run prepare-code)
  • npm test passes
  • I tested/previewed my changes locally

Release Notes

Fixed screen sharing in services

Since electron 17, desktopCapturer is only available in the main
process:
https://www.electronjs.org/blog/electron-17-0#desktopcapturergetsources-in-the-renderer

This patch adds a new IPC message from the service renderer to the main
process so it can still invoke desktopCapturer.getSources

Signed-off-by: Kristóf Marussy <kristof@marussy.com>
@kris7t kris7t requested review from vraravam and Gaboris April 29, 2022 11:45
@vraravam
Copy link
Contributor

vraravam commented Apr 29, 2022

I have verified that this works for MS Teams on a mac! Great job @kris7t !

Copy link
Contributor

@vraravam vraravam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@cedricroijakkers
Copy link
Contributor

cedricroijakkers commented Apr 29, 2022

I've built the PR in Linux, tested screen sharing in Jitsi and Teams: working!
Update: Selecting a window instead of a screen also works

@vraravam vraravam merged commit f6d086b into ferdium:develop Apr 29, 2022
@kris7t kris7t mentioned this pull request Apr 29, 2022
3 tasks
@SpecialAro
Copy link
Member

Tested on Windows 11 with Teams and Jitsi: working!

@kris7t kris7t deleted the linux-screensharing-fix branch July 10, 2022 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Screen sharing doesn't work (Linux, Gnome, X11)
4 participants