I am writing HTML from a WinForm to a WebBrowser control. I initialize the control by navigating to about:blank
. The issue I am having is trying to display a video in the application's folder. The HTML I am writing is below
<video controls style='width: 200px;height: 151px;'>
<source src='C:\Users\SomeUser\MyAppFolder\Media\media.mp4' type='video/mp4'>
<object data='C:\Users\SomeUser\MyAppFolder\Media\media.mp4'>
<embed src='C:\Users\SomeUser\MyAppFolder\Media\media.mp4' type='video/mp4'>
</object>
</video>
This WinForm is using .NET 4.0 and needs to be compatible with WinXp. I can see that the HTML would fall to the embed
tag. If I put an html page in the app folder and open it with IE using only
<embed src='C:\Users\SomeUser\MyAppFolder\Media\media.mp4'>
I get the ActiveX warning Internet Explorer restricted this webpage from running scripts or ActiveX controls
and there is a button to allow blocked content, which I am guessing is the problem within the control. Is it possible to work around this?