Hi,
crossposting from dev.tech.plugins...

--------------------------------------------------------------------------------------------------------------------

Hello all,

does anybody have a snippet of C++ code to stop and restart a given
plugin? I want to "intercept" at DOM level (i.e. when I parse the
<embed> tag) the
Flash Movie Player plugin, stop it, change the "wmode" parameter of
the node
and restart it. This is because I am grabbing the pixels of the
rendered HTML page and draw everything on an OpenGL texture, but, by
default, Flash draws on a separate window, so all I get are white
pixels. I want to see if changing on-the-fly the "wmode" parameter to
"opaque" (which forces Flash to draw in the same "background" window)
and restarting the plugin in order to reload the parameter solves the
problem.

Obviously, I already tried to change the wmode value in the DOM node,
but it does not work. I bet I must force the plugin to reload its
parameters, hence the idea to stop and restart it.

I actually do a deep parse of the DOM tree, so I can get the
nsIDOMNode of the <embed> tag, and queryInterface for its iContent
etc.

BTW, I do already have found some code to get the nsIPluginHost,
nsiPluginManager, and enumerate the nsIDOMplugins... but I cannot
understand the relation between nsIDOMPlugin and NSIPluginInstance
(which has interesting methods).

I checked a TON of code on MXR but I cannot get a grasp on it.

Also, I discovered some old code using nsIObjectFrame (which also has
interesting methods)
but now that interface is external-linkage, so I cannot include the
header and use it. Damn.

Which way should be the best one? Which classes/interfaces are the
best to go for? Is the workaround completely nuts?

Thank you very much,
Aaron Brancotti
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to