Is there a way to unload/free a VLC plugin dynamically?

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
vice
Blank Cone
Blank Cone
Posts: 61
Joined: 18 Oct 2007 13:43

Is there a way to unload/free a VLC plugin dynamically?

Postby vice » 03 Jun 2009 17:19

I'm working using the Dojo Toolkit to make possible to create VLC plugins dynamically.

You can see a previous WORKING version at:
http://trac.dojotoolkit.org/ticket/8857
I have now a better version that I going to upload also with some tests as they asked for.

Now that I'm working on unit tests with dojo.doh, I've found that it could be very usefull to unload/free/destroy some dynamically created VLC plugin as one test is executed after the other. This could allow each test to start with a newly created plugin.

Perhaps this method exist and is the same for all kind of plugins (embeds or objects). But I don't know if that could be possible to do.

Julien Bouquillon (from revolunet VLCObject code) seems to put all functions inside the Object to an empty one. See the revolunet.VLCObjectUtil.cleanupVLCs code. But if this code is correct is only useful for IE. Does it works? Could we do the same with the EMBED elements?

If the unload of a plugin instance is impossible. My tests must be done only with a few previously created VLC plugins. I think this is less interesting for testing a library that could create (but not delete, for now ;) plugins dynamically.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Is there a way to unload/free a VLC plugin dynamically?

Postby Jean-Baptiste Kempf » 03 Jun 2009 20:46

YOu should mail revolunet or ask him on this forum.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

durzagott
Blank Cone
Blank Cone
Posts: 15
Joined: 16 Jun 2009 11:22

Re: Is there a way to unload/free a VLC plugin dynamically?

Postby durzagott » 16 Jun 2009 11:26

Did you ever find an answer to this, vice? I too would like to know if it is possible to unload the VLC plugin in Mozilla. Looking through revolunet's cleanup code in VLCobjects I can see that it is IE specific.

Have you managed to get something similar working under Mozilla Firefox?

vice
Blank Cone
Blank Cone
Posts: 61
Joined: 18 Oct 2007 13:43

Re: Is there a way to unload/free a VLC plugin dynamically?

Postby vice » 18 Jun 2009 12:06

Not really.

I've read the mozilla specifications and the method to destroy an instance is mandatory. It's needed by the navigator to destroy all instances of the plugin when quiting or changing page.
More information at:
https://developer.mozilla.org/en/Gecko_ ... estruction

This method (NPP_Destroy) is naturally implemented by the VLC Media Plugin but is not exposed in the JavaScript API. Maybe security concerns but also because, as far as I know, no plugin have thought that it could be useful to allow a JavaScript method to destroy itself. Think about it! It's a bit weird.

So far, why I wanted to destroy a plugin? Because, as I've said, I need to create a lot of different plugins with different parameters for a battery of plugin creation tests.

SOLUTION: Instead of creating all of them in a single page. I'm going to divide those tests in separated HTML pages. So each time the page is changed, this effectively destroy all the previous plugins. (You could load/unload pages using frames or iframes).

If this is not useful for your pourposes, try to "recycle" them by changing playlist or other JavaScript accessible objects. In my case, I want to do "creation" test so create them instead of recycle them is a must.

Cheers
vicente


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 2 guests