-
Notifications
You must be signed in to change notification settings - Fork 29
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
Nadro/3079/screenshot improvements #3917
base: main
Are you sure you want to change the base?
Conversation
QA Wolf here! As you write new code it's important that your test coverage is keeping up. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
src/main.ts
Outdated
}) | ||
|
||
for (const source of sources) { | ||
if (source.name === 'Zoo Modeling App') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be a constant so that we refer to the same title that is used when creating the window?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated this to use the productName
from package.json
since that is what is used in electron-builder
.
I think this patter is okay.
We do not use the API defined in Browser-Window to set the title
of the browser window. So we don't have another reference within the code base. It is only defined in the package.json
.
…CAD/modeling-app into nadro/3079/screenshot-improvements
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3917 +/- ##
==========================================
- Coverage 87.15% 87.14% -0.02%
==========================================
Files 69 69
Lines 25121 25124 +3
==========================================
Hits 21894 21894
- Misses 3227 3230 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I read that MacOS can prevent screenshots by default. I can get access to see if it is enabled or not. I cannot ask for one time permissions for a screenshot though since the ask API does not allow My new plan: Table based on the documentation of operating systems when asking for media
We can always come back to how to improve the MacOS workflow. If a user wants to enable it manually they will get native screenshot support otherwise it will default to the video canvas stream. I've updated the github bug ticket to have an HTML comment that says
|
closes #3079
Documentation https://www.electronjs.org/docs/latest/api/desktop-capturer
Issue
html2canvas
orhtml2canvas-pro
work but are fragile and not robust enough. Overtime with libraries being updated or new components we create the "screenshot" feature with this library will break.Proof of breaking
html2canvas-pro
is broken in electron, chrome browser, and edge browser while using linux OS.Solution
If users are using the browser based application the screenshot tool will default to taking a snapshot from the
video
element.If users are using the desktop application in electron it will default to the native desktop solution in electron to take a screenshot. If the electron desktop screenshot fails, it will fall back to
video
element stream.I added an extra comment to the github issue to indicate that browser screenshots are limited.
I removed the
html2canvas-pro
package.Example from browser
Example from electron