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

启动截图插件很慢 #178

Closed
favour1025 opened this issue Feb 11, 2025 · 7 comments
Closed

启动截图插件很慢 #178

favour1025 opened this issue Feb 11, 2025 · 7 comments
Labels
bug Something isn't working

Comments

@favour1025
Copy link

Version of js-screen-shot

1.9.9-rc.18

Operating system and its version

MacOS, Windows

Browser and its version

No response

Sandbox to reproduce

No response

What happened?

electron使用js-web-screen-shot做截图功能,在windows系统上每次启用都很慢,macos系统就更慢了

报错信息

@favour1025 favour1025 added the bug Something isn't working label Feb 11, 2025
@likaia
Copy link
Owner

likaia commented Feb 11, 2025

Hello @favour1025. Your feedback has been received, and you will be notified in the issue area when the problem is resolved.
你好 @favour1025,已收到你反馈的问题,问题解决后将在issue区域通知你。

@favour1025
Copy link
Author

Hello @favour1025. Your feedback has been received, and you will be notified in the issue area when the problem is resolved. 你好 @favour1025,已收到你反馈的问题,问题解决后将在issue区域通知你。

大佬还有个问题,为什么在苹果电脑上启用后截图就变得很模糊(系统大概是14左右)

@likaia
Copy link
Owner

likaia commented Feb 11, 2025

Version of js-screen-shot

1.9.9-rc.18

Operating system and its version

MacOS, Windows

Browser and its version

No response

Sandbox to reproduce

No response

What happened?

electron使用js-web-screen-shot做截图功能,在windows系统上每次启用都很慢,macos系统就更慢了

报错信息

你的截图数据怎么来的?用的是webrtc吧?

@favour1025
Copy link
Author

Version of js-screen-shot

1.9.9-rc.18

Operating system and its version

MacOS, Windows

Browser and its version

No response

Sandbox to reproduce

No response

What happened?

electron使用js-web-screen-shot做截图功能,在windows系统上每次启用都很慢,macos系统就更慢了

报错信息

你的截图数据怎么来的?用的是webrtc吧?

// electron node主进程
const handleHhumbnailSize = () => {
let { scaleFactor, bounds: { width, height } } = screen.getPrimaryDisplay();
return {
width: Math.floor(scaleFactor * width),
height: Math.floor(scaleFactor * height)
}
}
let sources = await desktopCapturer.getSources({ types: ["screen"], thumbnailSize: handleHhumbnailSize() });

// vue渲染进程
new ScreenShot({
imgSrc: sources.thumbnail.toDataURL(),
enableWebRtc: false,
screenFlow: sources, // stream
level: 999,
toolPosition: 'right',
closeCallback: handleCloseCallback,
saveCallback: handleSaveCallback,
completeCallback: handleTranslateCallback
})

@favour1025
Copy link
Author

Version of js-screen-shot

1.9.9-rc.18

Operating system and its version

MacOS, Windows

Browser and its version

No response

Sandbox to reproduce

No response

What happened?

electron使用js-web-screen-shot做截图功能,在windows系统上每次启用都很慢,macos系统就更慢了

报错信息

你的截图数据怎么来的?用的是webrtc吧?

9d8c8f88986753a497fc8a397afdb534.mp4

@likaia
Copy link
Owner

likaia commented Feb 12, 2025

Version of js-screen-shot

1.9.9-rc.18

Operating system and its version

MacOS, Windows

Browser and its version

No response

Sandbox to reproduce

No response

What happened?

electron使用js-web-screen-shot做截图功能,在windows系统上每次启用都很慢,macos系统就更慢了

报错信息

你的截图数据怎么来的?用的是webrtc吧?

9d8c8f88986753a497fc8a397afdb534.mp4

你这个使用方式不对,应该是传入流。按照这个来吧。http://localhost:3000/js-screen-shot/docs/use-electron/

@favour1025
Copy link
Author

Version of js-screen-shot

1.9.9-rc.18

Operating system and its version

MacOS, Windows

Browser and its version

No response

Sandbox to reproduce

No response

What happened?

electron使用js-web-screen-shot做截图功能,在windows系统上每次启用都很慢,macos系统就更慢了

报错信息

你的截图数据怎么来的?用的是webrtc吧?

9d8c8f88986753a497fc8a397afdb534.mp4

你这个使用方式不对,应该是传入流。按照这个来吧。http://localhost:3000/js-screen-shot/docs/use-electron

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants