Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
qt webengine request camera and mic access on mac
I tried to access the camera and mic using QWebEngineView so I used this code to grand the access on my Mac
I used the solution which is Here it worked fine when I run the app inside QT and it asks me for the first time on my Mac that QT need to access my Mic and Camera which I allow it and it works, the problem is when I use the release version which has all the needed dependencies and stuff, the app crashes and when I check my system preferences for the permission I did not see the app is listed only QT in both Camer and Mic, and I can't add an app manually.
So what is the solution of this problem? to let the app ask for permission instead of crashes? what edit do I need to do to the codes to allow the app to ask for permission as QT does?
Thanks in advance.
Did you check that your Info.plist file contains the correct entries that state what they will be used for ?
What I tried as well is to run the app from executable inside the .app or the package which allow the terminal to request permission to the camera and mic and I worked but this not effective solution to ask the user to do so.
Another test I did is to go to the info.plist inside the .app package and add both
Privacy - Camra Usage Description
Privacy - Microphone Usage Description
after that I test again, the app not crash but the Camera open and then after 1 or two seconds the Camera close that is it, so I think I need to show the Permission dialog box, any help with it or how to show it up?
The dialog comes from the system not the application.
You should check that the values of these keys in the Info.plist file contain valid chars (put things in ascii there, less trouble).
yes I did both I add simple few text, like
open camera and for mic I write open mic that is all just few words, but still nothing show up.
I make it one word and it worked I changed values to 6.0 or any one words and it worked, thanks.