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

Improve default screen sharing FPS, limiting capturing surface #972

Merged
merged 5 commits into from
Jan 10, 2024

Conversation

davidzhao
Copy link
Member

Previously when we didn't constrain screen share resolution, screen share tracks weren't resized to a reasonable size prior to publishing. Having to encode a huge frame caused FPS to be very low (often just 1-5 fps).

Because that's rather confusing behavior, we are now defaulting to 1080p when capturing

@davidzhao davidzhao requested a review from lukasIO December 22, 2023 02:18
Copy link

changeset-bot bot commented Dec 22, 2023

🦋 Changeset detected

Latest commit: db025ce

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
livekit-client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Dec 22, 2023

size-limit report 📦

Path Size
dist/livekit-client.esm.mjs 78.93 KB (+0.2% 🔺)
dist/livekit-client.umd.js 84.5 KB (+0.16% 🔺)

@lukasIO
Copy link
Contributor

lukasIO commented Dec 23, 2023

When removing the default resolution other than fixing the Safari bug we also did so in order to enable users to capture at native screen sizes. When applying a default like this, that won't be possible anymore.

I think both makes sense: having a reasonable default, but also allowing users to capture uncapped resolution if they wish to do so. Maybe a ScreenSharePreset.Uncapped or something similar would allow for that? Not sure

@davidzhao
Copy link
Member Author

@lukasIO I've added original. lmk what you think.

@lukasIO
Copy link
Contributor

lukasIO commented Jan 10, 2024

nice! was thinking whether explicitly passing null would be an option, too, but I somehow prefer the original preset!

@@ -40,7 +40,7 @@
"build:watch": "rollup --watch --config rollup.config.js",
"build-docs": "typedoc",
"proto": "protoc --es_out src/proto --es_opt target=ts -I./protocol ./protocol/livekit_rtc.proto ./protocol/livekit_models.proto",
"sample": "vite example -c vite.config.js",
"sample": "vite example -c vite.config.mjs",
Copy link
Contributor

Choose a reason for hiding this comment

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

thanks 🙏

@lukasIO lukasIO merged commit ef228a7 into main Jan 10, 2024
3 checks passed
@lukasIO lukasIO deleted the screenshare branch January 10, 2024 08:13
@github-actions github-actions bot mentioned this pull request Jan 10, 2024
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