Thank you very much!

It looks a bit complicated. Maybe I'd consider a pure front-end solution instead.


在 2017/1/14 0:06, Benjamin Smedberg 写道:
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


On Wed, Jan 11, 2017 at 10:01 PM, 段垚 <duan...@ustc.edu <mailto:duan...@ustc.edu>> wrote:

    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.


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



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

Reply via email to