Georg Fritzsche於 2013年11月16日星期六UTC+8上午5時18分59秒寫道:
Hi Georg,
The solution works on XUL-based extension.
But when it comes to the extension which uses firefox addon sdk, I encounter a problem.
My environment is Firefox 31 at Mac, and my extension will create NPAPI plugin on the sdk/page-worker.
The problem is if I want to use "obj.QueryInterface(Components.interfaces.nsIObjectLoadingContent).playPlugin()" to enable my NPAPI plugin, I need to use "Components.interfaces" and "QueryInterface" which are chrome privilege on firefox addon sdk.
And I don't find a way to use chrome privilege on page-worker page.
I also try to send NPAPI plugin object from page-worker page to main.js, but I also can't find a solution.
From my understanding, the page-worker should be a part of my extension, so if the user agrees to install my extension, NPAPI plugin should be whitelisted or there should be a way to enable it implicitly.
Is there any way to enable NPAPI plugin on page-worker page?
Powen