Open MinChanSike opened 3 years ago
For the "Ask before accessing camera" issue, you can see if the PermissionRequested event catches it (I'm not sure if it does or not), and then it won't display UI: https://docs.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2.permissionrequested?view=WebView2-dotnet-1.0.664.37
For setting a default camera, we don't currently have a way to do this, so I've added an item on our backlog. Thanks!
Looks like there may be HTML/JS ways to choose the camera: https://stackoverflow.com/questions/21196473/how-to-select-camera-in-webapp https://webrtc.github.io/samples/src/content/devices/input-output/
Want to give those a try?
Thanks, it work for me to allow "Ask before accessing camera" by PermissionRequested
event handler.
To choose camera by javascript, I also tried but
navigator.mediaDevices.enumerateDevices()
is not fully support without HTTPS, not convenience for development.
Sometime if you are using third party application, it's need to set default camera for that application.
We are running MS Teams meetings within the WebView2 control in our app and would also like to be able to set the default camera, microphone and speaker. In our case we have a capture card showing up in the camera list and sometimes it is the selected camera.
When a PC has multiple cameras, how to
set default camera
and disable forAsk before accessing camera
like Edge/Chrome browser?Version SDK: 1.0.721-prerelease Runtime: 87.0.664.66 (64-bit) Framework: WPF OS: Win10
Sample html code to play the webcam video after page is loaded.
AB#39500192