Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Is it possible to implement "click to play" for Adobe Flash in XULRunner app?

50 views
Skip to first unread message

段垚

unread,
Jan 11, 2017, 10:02:26 PM1/11/17
to dev-pl...@lists.mozilla.org
Hi,

In Firefox, "click to play" can be enabled by setting pref
"plugin.state.flash" to 1.

However, when I do this in a XULRunner app, flash plugin is disabled
completely.

Is this feature unavailable to XULRunner? If so, how can I implement it?


Thanks.


Duan Yao.


Benjamin Smedberg

unread,
Jan 13, 2017, 11:07:14 AM1/13/17
to 段垚, dev-platform
You have to manage the UI yourself. Firefox does this with a combination of
applying an overlay to the disabled Flash which shows the grey UI, plus
script that sets permissions and activates plugins appropriately. Because
of e10s, that code is split between multiple files, but you should try to
read and understand the following bits:

http://searchfox.org/mozilla-central/source/browser/modules/PluginContent.jsm
- frame script (runs in content process)
http://searchfox.org/mozilla-central/source/browser/base/content/browser-plugins.js
- UI script (runs in chrome process)
Binding files that set up the click-to-play overlay UI:
http://searchfox.org/mozilla-central/source/toolkit/pluginproblem/content

Be aware that we're actively removing plugin support from the Mozilla
platform; soon only Flash is likely to work, and after a while NPAPI might
be removed completely. So don't get too wedded to plugin support in
XULRunner as a long-term strategy.

--BDS
> _______________________________________________
> dev-platform mailing list
> dev-pl...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>

段垚

unread,
Jan 18, 2017, 1:48:50 AM1/18/17
to Benjamin Smedberg, dev-platform
Thank you very much!

It looks a bit complicated. Maybe I'd consider a pure front-end solution
instead.
> dev-pl...@lists.mozilla.org <mailto:dev-pl...@lists.mozilla.org>
> https://lists.mozilla.org/listinfo/dev-platform
> <https://lists.mozilla.org/listinfo/dev-platform>
>
>

0 new messages