Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

屏幕分辨率175%的时候截图唤不起,调整到150%及以下就可以 #98

Closed
crystalHan1 opened this issue Sep 7, 2021 · 3 comments

Comments

@crystalHan1
Copy link

No description provided.

@nashaofu
Copy link
Owner

windows对吗?

@bruceauyeung
Copy link

bruceauyeung commented Nov 26, 2021

@nashaofu 这个可能是下面两个原因导致的:
1,在不同的屏幕缩放比下,getDisplayNearestPoint 返回的bound里面的宽高不是整数,会导致错误:
Error occurred in handler for 'ELECTRON_BROWSER_DESKTOP_CAPTURER_GET_SOURCES': TypeError: Error processing argument at index 2, conversion failure from导致的。用math.floor处理下即可。
2,我们在使用过程中发现,如果直接把thumbnail返回出去,会出现错误:Error: An object could not be cloned
我的理解:the possible cause is that NativeImage can not be cloned despite that it should be.(see electron/electron#23759)
所以我们改成了返回thumbnail的dataurl,而不是thumbnail本身
不急的话,过几天我提个PR

@crystalHan1
Copy link
Author

@nashaofu 这是由于在不同的屏幕缩放比下,getDisplayNearestPoint 返回的bound里面的宽高不是整数导致的。用math.floor处理下即可。我们在使用过程中也遇到了,是这么分析解决的。有空我提个pr吧。

感谢解答,问题已解决。

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants