-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Microphone and camera don't work from a webview #7686
Comments
Getting the same issue with 0.52.2 on both Windows and Linux |
Any updates? If I run this code inside webview: I always get the error |
I confirm that this is still an issue in nwjs 0.66. @rogerwang +1 for this to be resolved. Thanks! |
Simply add the following event handler on webview element to handle permissions. webviewEl.addEventListener('permissionrequest', function permissionRequest(e) {
//alert("success");
e.request.allow();
}); Note: Tested on nwjs 0.69.1 |
It still doesn't work. Do we have any workaround? 'nw.Window.open('index.html', options, (win) => {
In essence I am trying to open plain index.html first and then loading the url in webview. |
I am testing this on nwjs 77 but it still doesn't work |
With the "disable-features=nw2" flag it's working fine. It would be great if someone could point me to the source code where Webview handles the permission request. We have made several other changes in the code to accommodate out requirements. If I can get the contact person for this feature then that would help as well. @rogerwang |
NWJS Version : 0.51.2
Operating System : Windows 7/10, Mac Catalina, Ubuntu 20.04
Expected behavior
When you use a webview inside your app and when the inner application (from webview) asks for the media (micro, webcam) permissions, you handle this 'permissionrequest' event and allow the webview to work with required media.
Microphone and video just work. Or at least it shows pop up for user to choose if he wants to allow this permissions.
Actual behavior
When you use a webview inside your app and when the inner application (from webview) asks for the media (micro, webcam) permissions, you handle this 'permissionrequest' event and allow the webview to work with required media.
Microphone and video still don't work.
How to reproduce
frameless-window.zip
Also
The text was updated successfully, but these errors were encountered: