如何创建允许 Silverlight 应用程序访问相机和麦克风的注册表 [英] How to create a registry that allows the Silverlight applications access to camera and mic
问题描述
我需要知道如何创建允许 Silverlight 应用程序访问相机和麦克风的注册表.
I need to know how can I create a registry that allow the Silverlight applications access to camera and mic.
场景:
我有一个启动网络摄像头的 Silverlight 应用程序,在它工作之前它会显示一个 Silverlight 对话框,询问用户是否允许该应用程序访问它.
I have a Silverlight application that start the WebCam, before it works it shows a Silverlight dialog asking if the user allows the application to access it.
最后,我创建了一个桌面应用程序,它在 Web 浏览器中加载 Silverlight 应用程序.我希望我的应用程序桌面创建一个注册表或类似的东西,以允许此访问并停止显示 Silverlight 对话框.
Finally I'm creating a desktop app that loads the Silverlight application in a web browser. I want my application desktop to creates a registry or something like that to allow this access and stopping to show the Silverlight dialog.
存在一些解决方案吗??如果是,我该怎么做?
Exists some solution to this?? If yes, how can I do this?
推荐答案
对于有同样问题的人,这里是解决方案:https://stackoverflow.com/a/17829842/2882534
For someone who has the same issue here is the solution: https://stackoverflow.com/a/17829842/2882534
只需在 HKEY_CURRENT_USER\Software\AppDataLow\Software\Microsoft\Silverlight\Permissions 处创建一个名为 whit your Url 和 port(例如:http://localhost:54895
)的子项
Just create a subkey named whit your Url plus port(ex: http://localhost:54895
) at the HKEY_CURRENT_USER\Software\AppDataLow\Software\Microsoft\Silverlight\Permissions
之后,创建一个名为 WebcamAndMicrophone 的注册表,其 DWORD 值为 11.
After that, create a registry named WebcamAndMicrophone with DWORD and value 11.
沙赞!不再需要 Silverlight 对话框.
Shazan! The silverlight dialog is not more necessary.
操作注册表的教程:http://www.codeproject.com/Articles/4808/All-you-wanted-to-know-about-the-Registry-with-CP
这篇关于如何创建允许 Silverlight 应用程序访问相机和麦克风的注册表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!