Skip to content

Commit

Permalink
[android] Fix wrong viewport on player (#4441)
Browse files Browse the repository at this point in the history
Force the device to have scale factor of 1, so that it won't rescale the
webpage, which fixed:
1. wrong viewport on player.
2. wrong x and y positions for Shorts.

b/375224024
b/378156942
  • Loading branch information
borongc authored Nov 16, 2024
1 parent 9b841f4 commit 3c4b5f4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ protected void createContent(final Bundle savedInstanceState) {
// Remove below if Cobalt rebase to m120+.
"--user-level-memory-pressure-signal-params",
// Pass javascript console log to adb log.
"--enable-features=LogJsConsoleMessages"
"--enable-features=LogJsConsoleMessages",
// Disable rescaling Webpage.
"--force-device-scale-factor=1",
};
CommandLine.getInstance().appendSwitchesAndArguments(cobaltCommandLineParams);

Expand Down

0 comments on commit 3c4b5f4

Please sign in to comment.