I am able to control Internet Explorer window in C++ using:
IWebBrowser2 *browser
CoCreateInstance(
CLSID_InternetExplorer,
NULL,
CLSCTX_SERVER,
IID_IWebBrowser2,
(void**)&browser
);
And I navigate to a local html file that contains the following:
<video controls width="640" height="480">
<source src="video.mp4"></source>
</video>
When I run the program the internet explorer opens fine but it asks me to "Allow blocked content" in order for the video to be able to be played. Same thing happens when I for example add some javascript in html file.
My question is next: How can i prevent IE from showing me that popup and allow it to use ActiveX or Javascript programmatically. Any help would be much appreciated.
You can't prevent IE from showing that popup and allow it to use ActiveX or Javascript programmatically. Just like the first comment saying, if you can do that programmatically, that means any app can control your computer which is unsafe.
These settings can only be configured by the user or administrator of the computer in IE Security Settings.