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

[feat] Electron's win.setContentProtection(true); equivalent in Tauri? #550

Closed
tauri-bot opened this issue Sep 3, 2022 · 2 comments · Fixed by #551 or #532
Closed

[feat] Electron's win.setContentProtection(true); equivalent in Tauri? #550

tauri-bot opened this issue Sep 3, 2022 · 2 comments · Fixed by #551 or #532

Comments

@tauri-bot
Copy link

This issue has been upstreamed from tauri-apps/tauri#5132

Describe the problem

Is there any solution in Tauri to prevent screen recording of contents inside the App like Electron's win.setContentProtection(true); equivalent

Describe the solution you'd like

An option that allows apps to protect contents and prevent screen capture and recording!

Alternatives considered

No response

Additional context

No response

@JonasKruckenberg
Copy link
Contributor

Seems to be easy enough to implement especially since it's already implemented by electron.
We're very much stripped for time though, so if you need this feature urgently I'd advise you to help us out and implement it yourself @blue-range. You can hit us up on discord if you need any help!

@blue-range
Copy link

blue-range commented Sep 4, 2022

Unfortunately, I don't know much about rust, but I think that for Windows, the only thing we have to do to protect the contents of the window is setting WindowDisplayAffinity to WDA_MONITOR;
SetWindowDisplayAffinity(winForm.Handle, WDA_MONITOR);

@JonasKruckenberg JonasKruckenberg linked a pull request Sep 4, 2022 that will close this issue
13 tasks
amrbashir pushed a commit that referenced this issue Sep 4, 2022
* feat: implement set_content_protection

* fmt

* Update content_protection.rs

* add changefile

* Apply suggestions from code review

* remove dedicated example

* Update src/platform_impl/windows/window.rs

* fmt

* Delete content_protection.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants