Replies: 1 comment
-
The default size is 1366 x 768 You can specify the size via the Size property https://github.com/cefsharp/CefSharp/blob/master/CefSharp.OffScreen/ChromiumWebBrowser.cs#L416 You can specify the scale via DeviceScaleFactor property https://github.com/cefsharp/CefSharp/blob/master/CefSharp.OffScreen/ChromiumWebBrowser.cs#L436 It's up to you to configure the values to suit your requirements. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Our app is a background application which records screen using navigator.mediaDevices apis. Since it is a background application, we opted for CefSharp OffScreen. On investigation, I found out that recorded screen resolution is reduced one and with lower quality.
My Windows laptop resolution is 1920 x 1080

I compared below values in CefSharp Minimal Example project (OffScreen vs WinForms)
OffScreen: Here resolution is 1366 x 768

WinForms: Here resolution is 1920 x 1080 (resolution width = 1536 * 1.25 = 1920, resolution height = 864 * 1.25 = 1080) . These values align with chrome and firefox values.

What needs to be done to get correct screen resolution in CefSharp OffScreen similar to CefSharp Winforms ? Anyone please help
Or is there a way to run CefSharp Winforms as a background application without showing any UI ?
Additional note :
Beta Was this translation helpful? Give feedback.
All reactions