Detect if plugin is running

General discussion and compatibility support about browser plug-ins.
(e.g. Adobe Flash, Java plugin, authentication plugins, Unity)

Moderators: satrow, FranklinDM, Lootyhoof

User avatar
WilliamK
Fanatic
Fanatic
Posts: 127
Joined: Fri, 23 Feb 2018, 06:51

Detect if plugin is running

Unread postby WilliamK » Mon, 13 Aug 2018, 22:42

Our custom browser supports a couple of NPAPI plugins and we would like to detect if those plugins are running so that we can accommodate them better.

We considered detecting if their Object tags or mimetype were found in the HTML but because some users inject the object tag using JavaScript that makes it too late... after the page loads.

So I am wondering if via the plugin container or whatever, can PM detect if a plugin is running by DLL name or mimetype?
Last edited by WilliamK on Tue, 14 Aug 2018, 01:51, edited 1 time in total.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 22152
Joined: Sun, 28 Aug 2011, 17:27
Location: 58.5°N 15.5°E
Contact:

Re: Detect if plugin is running

Unread postby Moonchild » Tue, 14 Aug 2018, 04:36

You can check which plugins are enabled with navigator.plugins -- whether they are actually loaded at any point in time depends on web content requests (and they are unloaded after a set idle time to reduce resource usage).
Improving Mozilla code: You know you're on the right track with code changes when you spend the majority of your time deleting code.

"If you want to build a better world for yourself, you have to be willing to build one for everybody." -- Coyote Osborne

User avatar
WilliamK
Fanatic
Fanatic
Posts: 127
Joined: Fri, 23 Feb 2018, 06:51

Re: Detect if plugin is running

Unread postby WilliamK » Tue, 14 Aug 2018, 05:58

Yes navigator.plugins will tell if they are installed/enabled, but I need to know when are being used... start to finish.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 22152
Joined: Sun, 28 Aug 2011, 17:27
Location: 58.5°N 15.5°E
Contact:

Re: Detect if plugin is running

Unread postby Moonchild » Tue, 14 Aug 2018, 06:50

You'll probably have to write an interface for that then to expose the internals of the plugin host. There is no standard way to query this AFAIK, because it is offloaded to the platform internals.
Last edited by Moonchild on Tue, 14 Aug 2018, 06:51, edited 1 time in total.
Improving Mozilla code: You know you're on the right track with code changes when you spend the majority of your time deleting code.

"If you want to build a better world for yourself, you have to be willing to build one for everybody." -- Coyote Osborne


Return to “Browser plug-ins”

Who is online

Users browsing this forum: No registered users and 2 guests