matrix-org / matrix-js-sdk

Matrix Client-Server SDK for JavaScript
Apache License 2.0
1.49k stars 578 forks source link

Fix screen sharing in recent Chrome #4241

Closed dbkr closed 2 weeks ago

dbkr commented 2 weeks ago

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 (https://github.com/livekit/client-sdk-js/pull/1088) so that's also an option.

This will probably want backporting to the release.

Fixes https://github.com/element-hq/element-desktop/issues/1703

Checklist