You can use the HTML5 plugin as a live source in MFormats and MPlatform SDKs just the same way you can use a web-camera or a capture device.
The device name for MLive (MFLive) object is "Medialooks WebCapture":
MFormats SDK
myLiveSource.DeviceSet(eMFDeviceType.eMFDT_Video, targetIndex, "");
where targetIndex is the index of "Medialooks WebCapture" source.
MPlatform SDK
m_objMLive.DeviceSet("video", "Medialooks WebCapture", "");
Initialization of a web-page
In MPlatform SDK there is a simple way to initialize a web-page - it is used as an input line for the object:
m_objMLive.DeviceSet("video::line-in", myUrlAddress, "");
In MFormats SDK, the way to specify an input line is different - it uses a pre-defined list of available input lines.
By default, the WebCapture has 2 pre-defined links available for "line-in" setting - "https://www.medialooks.com, https://www.youtube.com". This property is specified in the system registry:
HKEY_CURRENT_USER\Software\Medialooks\MFormats\MFLive\WebCapture
"url.list"
You can either modify the property in the registry to fill it with your list.
But you can set a URL with a code like
m_objLive.PropsSet("line-in", myUrlAddress);
Input resolution and frame rate
By default, the WebCapture and the HTML5 Overlay plugin work at 30 fps and the video resolution matches the original object to which the plugin is added. For the WebCapture, the default resolution is FullHD.
If you need to specify the video format (the resolution, frame rate, etc.) you should set it with the FormatVideoSet(eMFT_Input, ref myVidProps) method.
In the M_VID_PROPS structure, you can specify the target resolution and the frame rate.
By default, it works in HDYC colorspace that doesn't support transparency, so if you need to process the alpha-channel, you should set the colorspace to ARGB32 in the same M_VID_PROPS structure.
Get internal HTML5 plugin object from MLive or MFLive
After the "Medialooks WebCapture" has been initialized, you can get its internal HTML5 plugin object to manage its properties, load a new page, control web-page behavior, or use events.
To get the internal object, you should call the DeviceGetInternal method for the MFLive object (MFormats SDK) or the ObjectGetInternal method for MLive object (MPlatform SDK):
MFormats SDK
object htmlPlugin; m_objLive.DeviceGetInternal(eMFDeviceType.eMFDT_Video, out htmlPlugin);
where targetIndex is the index of "Medialooks WebCapture" source.
MPlatform SDK
object htmlPlugin; string myType = ""; myLive.ObjectGetInternal(myType, out htmlPlugin);
Then, you should cast the resulting htmlPlugin object to IMFBrowser interface and control the plugin object.
For example, to initialize a web-page in MFormats SDK:
(htmlPlugin as IMFBrowser).BrowserPageLoad(myUrlAddress);
In the attachment, there is a sample where you can interact with a webpage or a PDF file as it is a browser window: