Webview UWP中未引发PermissionRequested事件

Webview UWP中未引发PermissionRequested事件,webview,uwp,uwp-xaml,Webview,Uwp,Uwp Xaml,我有一个UWP应用程序,它在MainPage.xaml文件中定义了一个WebView <WebView Name="webView" Style="{Binding Source={StaticResource WebViewStyle}}" Visibility="{Binding WebAppLoading, Converter={StaticResource FalseToVisibleConverter}}"

我有一个UWP应用程序,它在MainPage.xaml文件中定义了一个WebView

<WebView Name="webView" 
                 Style="{Binding Source={StaticResource WebViewStyle}}"
                 Visibility="{Binding WebAppLoading, Converter={StaticResource FalseToVisibleConverter}}"
                 local:WebViewExtensions.StartServiceRequest="{Binding Source={StaticResource Locator}, Path=MainPage.StartServiceRequest}"
                 local:WebViewExtensions.CommandExecutedByScript="{Binding Source={StaticResource Locator}, Path=MainPage.CommandExecutedByScript}" 
                 local:WebViewExtensions.NavigateBack="{Binding Source={StaticResource Locator}, Path=MainPage.NavigateBack}"
                 local:WebViewExtensions.InputPaneHeight="{Binding Source={StaticResource Locator}, Path=MainPage.InputPaneHeight}"
                 Loaded="OnWebViewLoaded"
                 ScriptNotify="OnScriptNotify" 
                 AllowFocusOnInteraction="False"
                 NavigationCompleted="OnNavigationCompleted"
                 NavigationStarting="OnNavigationStarting"
                 NewWindowRequested="OnNewWindowRequested"
                 PermissionRequested="OnPermissionRequested">

我已在UWP清单文件中启用麦克风功能。我看到窗口弹出,请求同意使用麦克风。但是,未调用OnPermissionRequested函数。我有一个断点没有启动。在我同意麦克风后,我看不出功能在工作

有没有办法进一步排除故障?确定是否首先触发WebViewControl.PermissionRequested事件


请帮助…

系统会弹出应用程序的Windows弹出窗口,系统请求和WebView的许可请求是两件不同的事情。因此,当您单击“是”以获得麦克风同意时,不会触发请求的许可。仅当您准备在WebView中使用麦克风时(例如,呼叫)将触发该方法。如果您想知道麦克风的隐私设置是否已打开,可以使用以下代码进行判断

bool result = await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-settings:privacy-microphone")); 

事实证明,在一个导入的SDK中有一个webView,我没有改变它。。我在该Web视图中添加了相应的偶数代理后,它就开始按预期工作了。

感谢您的解释。。。即使我尝试使用麦克风,我也看不到请求的权限被触发…我将尝试获取有关隐私设置和更新的信息…当我尝试在webView中使用呼叫时,它会触发。你能提供你访问的网络视图的URL吗?