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: low-resolution screen sharing for safari 17. #387

Merged
merged 2 commits into from
Oct 18, 2023

Conversation

cloudwebrtc
Copy link
Contributor

@cloudwebrtc cloudwebrtc commented Oct 17, 2023

related fix on js livekit/client-sdk-js#889

// Remove resolution settings to fix low-resolution screen share on Safari 17.
// related bug: https://bugs.webkit.org/show_bug.cgi?id=263015
if (lkBrowser() == BrowserType.safari &&
lkBrowserVersion().major == 17) {
Copy link
Contributor

Choose a reason for hiding this comment

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

good thinking to specifically fix it for this Safari version, too.
I think we should do something similar on the JS side.
The bugreport in webkit only talks about width: { max: constraints. maybe width: { ideal: would be possible as a workaround for Safari 17.
I remember it not being a valid workaround in general because ideal was causing issues in other Safari versions :/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just tested using width: { ideal:, doesn't seem to fix it, I still get the low resolution screen capture :(

        if (lkBrowser() == BrowserType.safari &&
            lkBrowserVersion().major == 17) {
          constraints['video'] = {
            'width': {'ideal': options.params.dimensions.width},
            'height': {'ideal': options.params.dimensions.height},
          };
        }

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks for checking. then your fix seems like the best option :)

Copy link
Member

@davidzhao davidzhao left a comment

Choose a reason for hiding this comment

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

lgtm

@cloudwebrtc cloudwebrtc merged commit 42f4132 into main Oct 18, 2023
7 checks passed
@cloudwebrtc cloudwebrtc deleted the fix/resolution-screenshare-for-safari-17 branch October 18, 2023 01:50
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.

3 participants