简体   繁体   English

WebBrowser本地html文件,Flash无法正常工作?

[英]WebBrowser local html file, flash not working?

I am using a WinForm webbrowser, i load an local html file which contains and flash player that plays a video but the problem is that the player works but the video is not loaded. 我正在使用WinForm Web浏览器,我加载了一个本地html文件,其中包含和播放视频的Flash播放器,但问题是该播放器可以工作,但未加载视频。

When i open the html file in a browser it works fine. 当我在浏览器中打开html文件时,它可以正常工作。

Here is the code i am using: 这是我正在使用的代码:

        string curDir = Directory.GetCurrentDirectory();
        this.webBrowser1.Url = new Uri(String.Format("file:///{0}/Resources/streaming.html", curDir));

The file location is correct, is there anything i can do to solve the problem ? 文件位置正确,有什么我可以解决的问题吗?

Try explicitly disabling the following Browser Features for your WebBrowser -based app: FEATURE_LOCALMACHINE_LOCKDOWN , FEATURE_BLOCK_LMZ_OBJECT , FEATURE_BLOCK_LMZ_SCRIPT . 尝试为基于WebBrowser的应用程序显式禁用以下浏览器功能FEATURE_LOCALMACHINE_LOCKDOWNFEATURE_BLOCK_LMZ_OBJECTFEATURE_BLOCK_LMZ_SCRIPT You could reuse some code from here . 您可以从这里重用一些代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM