aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/mozilla/add-ons/plugins/index.html
blob: f35791a3bfeb1f56e74d8ec312c6dbdc4b93f764 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
---
title: Plugins
slug: Mozilla/Add-ons/Plugins
tags:
  - Add-ons
  - NPAPI
  - NeedsTranslation
  - Plugins
  - TopicStub
translation_of: Archive/Plugins
---
<div class="blockIndicator warning">
<p><strong>Important</strong>: Since <a href="/en-US/docs/Mozilla/Firefox/Releases/52">Firefox 52</a>, all plugin support except Flash has been dropped (see <span><a href="https://www.fxsitecompat.com/en-CA/docs/2016/plug-in-support-has-been-dropped-other-than-flash/">Plug-in support has been dropped other than Flash</a> for more details</span>). Flash usage is also set to be phased out in the future.</p>
</div>

<div class="blockIndicator note">
<p><strong>Note</strong>: Plugins are now a legacy technology. They are not available on most mobile devices. Mozilla encourages website developers to avoid using plugins wherever possible and use standard Web APIs instead. If there are plugin features which are not available in the web platform, we encourage developers to post their use cases to mozilla.dev.platform project list, so that Mozilla can prioritize web platform work to make those use cases possible.</p>
</div>

<p>For more information about plugin roadmap, see <a href="/en-US/docs/Plugins">non-archived plugin information</a>.</p>

<p>Plugins are shared libraries that users can install to display content that the browser can't display natively. For example, the Adobe Reader plugin lets the user open PDF files directly inside the browser, and the QuickTime and RealPlayer plugins are used to play special format videos in a web page.</p>

<p>Plugins are written using <strong>NPAPI</strong>, the cross-browser API for plugins. The main source of documentation for NPAPI is the <a href="/en/Gecko_Plugin_API_Reference" title="en/Gecko_Plugin_API_Reference">Gecko Plugin API Reference</a>. To make your plugin scriptable from web pages, use <a href="/en/Gecko_Plugin_API_Reference/Scripting_plugins" title="en/Gecko_Plugin_API_Reference/Scripting_plugins">npruntime</a>.</p>

<p>Plugins can be written completely from scratch using C APIs (usually in C or C++) or they may be built on a plugin framework such as <a class="external" href="http://www.firebreath.org" title="http://www.firebreath.org/">Firebreath</a>, <a class="external" href="http://www.juce.com/" title="http://www.rawmaterialsoftware.com/juce.php">JUCE</a>, or <a class="external" href="http://doc.qt.nokia.com/solutions/4/qtbrowserplugin/developingplugins.html" title="http://doc.qt.nokia.com/solutions/4/qtbrowserplugin/developingplugins.html">QtBrowserPlugin</a>. There are also some code generation tools that may be helpful. More information about these tools can be found on the <a href="/en/Plugins/External_resources_for_plugin_creation" title="en/Plugins/External resources for plugin creation">External Resources</a> page.</p>

<p>Plugins are different from <a href="/en/Extensions" title="en/Extensions">extensions</a>, which modify or enhance the functionality of the browser itself. Plugins are also different from <a href="/en/Creating_OpenSearch_plugins_for_Firefox" title="en/Creating_OpenSearch_plugins_for_Firefox">search plugins</a>, which plug additional search engines in the search bar.</p>

<hr>
<div class="topicpage-table">
<div class="section">
<dl>
 <dt><a href="/en/Gecko_Plugin_API_Reference" title="en/Gecko_Plugin_API_Reference">Gecko Plugin API Reference</a> (NPAPI)</dt>
 <dd>This reference describes the application programming interfaces for NPAPI plugins and provides information about how to use these interfaces.</dd>
 <dt><a href="/en-US/docs/Site_Author_Guide_for_Click-To-Activate_Plugins">Site Author Guide For Click-To-Activate Plugins</a></dt>
 <dd>These guidelines will help website authors use plugins when they are blocked by default with the Firefox click-to-activate feature.</dd>
</dl>

<dl>
 <dt><a href="/en/Gecko_Plugin_API_Reference/Scripting_plugins" title="en/Gecko_Plugin_API_Reference/Scripting_plugins">Scripting plugins</a> (npruntime)</dt>
 <dd>This reference describes the new cross-browser NPAPI extensions that let plugins be scriptable and also let them access the script objects in the browser.</dd>
</dl>

<dl>
 <dt><a href="/en/Shipping_a_plugin_as_a_Toolkit_bundle" title="en/Shipping_a_plugin_as_a_Toolkit_bundle">Shipping a plugin as a Toolkit bundle</a></dt>
 <dd>Plugins can be shipped as a Toolkit <a href="/en/Bundles" title="Bundles">bundle</a>, allowing a user to easily install, uninstall and manage their personal plugins.</dd>
</dl>

<dl>
 <dt><a class="internal" href="/En/Supporting_private_browsing_in_plugins" title="en/Supporting private browsing in plugins">Supporting private browsing in plugins</a></dt>
 <dd>Firefox 3.5 introduced support for private browsing; learn how to make your plugin respect the user's privacy wishes.</dd>
 <dt><a href="/en/Plugins/Multi-Process_Plugin_Architecture" title="en/Plugins/Multi-Process Plugin Architecture">Multi-Process Plugin Architecture</a></dt>
 <dd>How Firefox loads plugins into a separate process. Firefox 3.6.4 introduced out-of-process plugins which execute in a separate process so that a crashing plugin does not crash the browser.</dd>
 <dt><a href="/en/Plugins/Logging" title="en/Plugins/Logging">Logging and Debugging for Multi-Process Plugins</a></dt>
 <dd>How to create a plugin log to aid in debugging problems with multi-process plugins.</dd>
</dl>
</div>

<div class="section">
<dl>
 <dt><a class="internal" href="/En/Writing_a_plugin_for_Mac_OS_X" title="en/Writing a plugin for Mac OS X">Writing a plugin for Mac OS X</a></dt>
 <dd>Learn how to write a plugin for Mac OS X; a template Xcode project is provided.</dd>
</dl>

<dl>
 <dt><a href="/en/Monitoring_plugins" title="en/Monitoring_plugins">Monitoring Plugins</a></dt>
 <dd>Use an observer service notification to monitor the amount of time spent executing calls in plugins. This can be useful when trying to determine if a plug-in is consuming too many resources.</dd>
</dl>

<dl>
 <dt><a href="/en/Scripting_Plugins/Adobe_Flash" title="en/Scripting_Plugins/Macromedia_Flash">Scripting Plugins: Macromedia Flash</a></dt>
 <dd>This article explains how JavaScript can be used to access methods from within the Flash plugin, as well as how a feature called FSCommands can be used to access JavaScript functions from within the Flash animation.</dd>
</dl>

<dl>
 <dt><a href="/en/Gecko_Plugin_API_Reference/Plug-in_Development_Overview" title="en/Plugins/The_First_Install_Problem">Plugins: The First Install Problem</a></dt>
 <dd>The First Install Problem is the name given to the conditions arising when a plugin or embeddable software installs itself on a system first, before any other Gecko-based browser.</dd>
</dl>

<dl>
 <dt><a href="/en/Plugins/Samples_and_Test_Cases" title="en/Plugins/Samples_and_Test_Cases">Plugins: Samples and Test Cases</a></dt>
 <dd>NPAPI plugin samples and test cases.</dd>
 <dt><a href="/en/Plugins/External_resources_for_plugin_creation" title="https://developer.mozilla.org/en/Plugins/External_resources_for_plugin_creation">External Resources for Plugin Creation</a></dt>
 <dd>External projects, frameworks, and blog posts that may be useful.</dd>
</dl>

<dl>
 <dt><a href="/en/XEmbed_Extension_for_Mozilla_Plugins" title="en/XEmbed_Extension_for_Mozilla_Plugins">XEmbed Extension for Mozilla Plugins</a></dt>
 <dd>Recent versions of Mozilla on *nix-based systems include an extension for writing plugins that use XEmbed instead of using the old Xt-based main loop that most plugins have been using since the Netscape 3.x days.</dd>
</dl>
</div>
</div>

<hr>
<p><span class="comment">Categories</span></p>

<p><span class="comment">Interwiki Language Links</span></p>

<div class="blockIndicator communitybox" dir="ltr">
<div class="column-container">
<h2 id="Join_the_plugin_development_community">Join the plugin development community</h2>

<div class="column-half">
<div class="communitysubhead">Choose your preferred method for joining the discussion:</div>

<ul class="communitymailinglist">
 <li><a href="https://lists.mozilla.org/listinfo/dev-tech-plugins">Mailing list</a></li>
 <li><a href="http://groups.google.com/group/mozilla.dev.tech.plugins">Newsgroup</a></li>
 <li><a href="http://groups.google.com/group/mozilla.dev.tech.plugins/feeds">RSS feed</a></li>
</ul>
</div>

<div class="column-half"> </div>
</div>
</div>