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

Capture without GraphicsCapturePicker in UWP app #53

Closed
artths opened this issue Apr 11, 2020 · 6 comments
Closed

Capture without GraphicsCapturePicker in UWP app #53

artths opened this issue Apr 11, 2020 · 6 comments

Comments

@artths
Copy link

artths commented Apr 11, 2020

Can we use this API in UWP app without calling GraphicsCapturePicker? What if I want create desktop streaming application, so that the client could connect to host and begin streaming whole screen without the need of calling GraphicsCapturePicker on the host? I see there is CreateForMonitor function in Win32 version of screen capture.

@Tar4s
Copy link

Tar4s commented Apr 11, 2020

@artsemionov you could find the answer here https://github.com/robmikh/Win32CaptureSample

@artths
Copy link
Author

artths commented Apr 11, 2020

But it's for using API for Win32, I need UWP

@leonardoblanco-ms
Copy link

Window and monitor capture without the picker is not yet available for UWP applications, but it is under construction for a future release. We hope to bring it to the community soon.

@unboundin
Copy link

unboundin commented Feb 22, 2023

@leonardoblanco-ms - Is monitor capture without picker now available for UWP applications? Is there a fully working sample and documentation available somewhere? Thank you

@robmikh
Copy link
Member

robmikh commented Feb 22, 2023

You'll want to use GraphicsCaptureItem.TryCreateFromDisplayId. But don't forget to first request access using GraphicsCaptureAccess.RequestAccess.
You also need to specify the graphicsCaptureProgrammatic capability in your manifest. Keep in mind these APIs are available to consumers in Windows 11, and will not run on most Windows 10 builds.

There's a sample you can look at here: https://github.com/robmikh/uwpcapturesample

@robmikh
Copy link
Member

robmikh commented Feb 22, 2023

Closing the issue since these APIs are now documented. If you run into any issues, let us know!

@robmikh robmikh closed this as completed Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants