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 screen sharing in recent Chrome #4241

Merged
merged 4 commits into from
Jun 13, 2024
Merged

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Jun 13, 2024

Dreadful hack to work around a bug in recent chrome/electron's WebRTC, as explained.

I'm not sure which is the least hideous out of this (ie. repeatedly calling setCodecPreferences and seeing if it crashes each time) or hardcoding the bad codec and skipping it. Opinions welcome. Edit: LiveKit work around this bug by using the receiver codecs (livekit/client-sdk-js#1088) so that's also an option.

This will probably want backporting to the release.

Fixes element-hq/element-desktop#1703

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • Sign-off given on the changes (see CONTRIBUTING.md).

Dreadful hack to work around a bug in recent chrome/electron's
WebRTC, as explained.

I'm not sure which is the least hideous out of this (ie. repeatedly
calling setCodecPreferences and seeing if it crashes each time) or
hardcoding the bad codec and skipping it. Opinions welcome.
@dbkr dbkr added T-Defect backport staging Label to automatically backport PR to staging branch labels Jun 13, 2024
@dbkr dbkr requested a review from a team as a code owner June 13, 2024 13:14
src/webrtc/call.ts Outdated Show resolved Hide resolved
Copy link
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

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

Looks sane otherwise

Copy link

@fkwp fkwp left a comment

Choose a reason for hiding this comment

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

lgtm

@t3chguy t3chguy added this pull request to the merge queue Jun 13, 2024
Merged via the queue into develop with commit 9218f63 Jun 13, 2024
35 checks passed
@t3chguy t3chguy deleted the dbkr/fix_screenshare_1to1 branch June 13, 2024 19:08
RiotRobot pushed a commit that referenced this pull request Jun 13, 2024
* Fix screen sharing in recent Chrome

Dreadful hack to work around a bug in recent chrome/electron's
WebRTC, as explained.

I'm not sure which is the least hideous out of this (ie. repeatedly
calling setCodecPreferences and seeing if it crashes each time) or
hardcoding the bad codec and skipping it. Opinions welcome.

* Unused import

* Remove commented line

(cherry picked from commit 9218f63)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport staging Label to automatically backport PR to staging branch T-Defect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v1.11.68 upgrade causes a disconnection when you attempt to share your screen
3 participants