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

feat(ScreenObtainer) add fallback option for Electron #2632

Merged
merged 2 commits into from
Feb 6, 2025

Conversation

saghul
Copy link
Member

@saghul saghul commented Feb 6, 2025

If the enclosing Jitsi Meet app declares gDM in Electron is supported, ignore the electronUseGetDisplayMedia config flag and use the gDM flow. This facilitates having backwards compatibility since the Electron app won't know if the deployment it's about to join has the gDM flow support or not.

If the enclosing Jitsi Meet app declares gDM in Electron is supported,
ignore the `electronUseGetDisplayMedia` config flag and use the gDM
flow. This facilitates having backwards compatibility since the Electron
app won't know if the deployment it's about to join has the gDM flow
support or not.
- Lower logger level to warning
- Use nested conditions
@saghul saghul marked this pull request as ready for review February 6, 2025 12:47
if (typeof window.JitsiMeetScreenObtainer?.openDesktopPicker === 'function') {
// Detect if we have the fallback option.
if (window.JitsiMeetScreenObtainer?.gDMSupported) {
return this.obtainScreenFromGetDisplayMedia(onSuccess, onFailure);
Copy link
Member

Choose a reason for hiding this comment

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

I just remembered that we apply the min fps constraint on the stream returned by obtainScreenFromGetDisplayMedia so that the 0 Hz mode for SS doesn't kick in automatically for browser. Do you think we need to run that on Electron clients as well? I am not sure if that will cause any issues in Electron though.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd expect not to cause issues since it will be the same code path than for chrome.

@saghul saghul merged commit 31897f9 into jitsi:master Feb 6, 2025
1 of 2 checks passed
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.

2 participants