Viewport resolution scale parameter #740
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relevant components:
Problem statement:
When connecting from an iPhone or small screen device with MatchViewportRes set to true, the rendered resolution appears quite low, causing the visuals to look slightly pixelated.
More info here: #721
Solution
Added a new numeric parameter ViewportResolutionScale that multiplies the resolution dimensions sent to the onMatchViewportResolutionCallback when MatchViewportResolution is enabled. The scale factor is applied to both width and height in VideoPlayer.updateVideoStreamSize(), allowing users to request higher resolution streams (e.g., 1.5x or 2.0x) to improve visual quality on small screens.
Documentation
The new ViewportResolutionScale parameter is documented in Frontend/Docs/Settings Panel.md under the UI section.
Test Plan and Compatibility
Existing unit tests: Config.test.ts automatically covers the new parameter via the "should populate initial values for all settings" test (line 42-49), which validates all numeric parameters are registered