Closed artths closed 1 year ago
@artsemionov you could find the answer here https://github.com/robmikh/Win32CaptureSample
But it's for using API for Win32, I need UWP
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.
@leonardoblanco-ms - Is monitor capture without picker now available for UWP applications? Is there a fully working sample and documentation available somewhere? Thank you
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
Closing the issue since these APIs are now documented. If you run into any issues, let us know!
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.