Edit

Handle the Windows camera privacy setting

UWP apps must account for the Windows camera privacy setting before they initialize camera capture. Because UWP apps are packaged, you can use the AppCapability class to check access to the webcam capability. You must also handle E_ACCESSDENIED when camera initialization fails.

The camera privacy setting and camera capture APIs are shared across Windows app models. For the current guidance and code examples, see Handle the Windows camera privacy setting.