forked from sfsekaran/awesm-jwplayer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
readme.html
73 lines (52 loc) · 5.65 KB
/
readme.html
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>JW Player plugin SDK</title>
<style type="text/css">
body { background-color: #fff; padding: 40px; color:#000; font: 13px/18px Arial, sans-serif; }
a,h1 { color: #7A2; }
h3 { padding-top: 40px; }
ul { margin:5px 0 15px 16px; padding:0; list-style-type:square; }
</style>
</head>
<body>
<h1>JW Player plugin SDK</h1>
<h3>Introduction</h3>
<p>Thanks for your interest in building plugins for the JW Player! This SDK aims to help you with that, by offering three tools:</p>
<ul>
<li>A couple of plugin templates you can use to quickstart your own plugin development.</li>
<li>A testing page you can use to test your plugin with different player versions and settings.</li>
<li>This readme, which lists some plugin-related resources on the JW Player wiki.</li>
</ul>
<p>Note that you can use your IDE of choice for building plugins (e.g. <a href="http://www.adobe.com/products/flex/">Flex builder</a>, <a href="http://macromates.com/">Textmate</a> or <a href="http://www.adobe.com/products/flash/">Adobe Flash</a>). If you don't have Flex or Flash, you can use the free <a href="http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3sdk">Flex SDK</a>, which includes the MXMLC actionscript compiler. Every plugin template has a small <i>build.sh</i> and <i>build.bat</i> script that shows how to <a href="http://developer.longtailvideo.com/trac/wiki/Player5PluginsCompiling">compile with MXMLC</a>.</p>
<h3>The plugin templates</h3>
<p>This SDK comes with a couple of simple plugin templates, each showcasing a specific interaction with the player. They are located in the <i>plugins</i> folder:</p>
<ul>
<li>The <i>Controlling</i> template shows how to control the player by sending events. It shows a simple <i>mute</i> button over the video.</li>
<li>The <i>Docking</i> template shows how to display a button in the player's dock. These dock buttons (available since player 4.5) can be used to control or display the plugin.</li>
<li>The <i>Flashvars</i> template shows how to load flashvars to make it configurable. It offers a simple <i>message</i> flashvar that is printed in the display.</li>
<li>The <i>Listening</i> template shows how to listen to events of the player and respond to them. It prints the playback <i>state</i> and <i>position</i> over the video.</li>
<li>The <i>Positioning</i> template shows how to position a plugin inside the player. It shows a red square over the area the plugin has claimed.</li>
</ul>
<p>The templates can be seen in action in the <a href="testing.html">testing page</a> of this SDK. (in the <i>example</i> dropdown box).</p>
<h3>The testing page</h3>
<p>The <a href="testing.html">testing page</a> contains a javascript application you can use to quickly test your plugin against various versions and configurations of the JW Player. You can select example tests, change the player, skin and plugins to load and change any flashvars.</p>
<p>Exactly which players, skins, plugins and examples to show can be set in the <a href="files/settings.js">files/settings.js</a> file. It is a javascript dictionary that is easy to understand and change, but be careful to correctly set commas and curly braces!</p>
<p>Next to the location of your plugin SWF file, the testing page also needs an XML file that describes your plugin. It is a simple xml format (<a href="plugins/flashvars/flashvars.xml">example</a>) that contains an overview and the list of flashvars for your plugin. You can also use this XML later on for <a href="http://www.longtailvideo.com/addons/submitregister.html">submitting your plugin</a> to LongTail Video.</p>
<p>Please note, this testing page must be run from a web server (local or remote), and should not be run from a local file.</p>
<h3>Links to resources</h3>
<p>The developer Wiki contains a wealth of resources for building plugins, including:</p>
<ul>
<li>The general <a href="http://developer.longtailvideo.com/trac/wiki/Player5PluginsBuilding">plugin building documentation</a>. It's a general overview of how plugins work and how to build them.</li>
<li>The additional <a href="http://developer.longtailvideo.com/trac/wiki/Player5PluginsCompiling">plugin compiling documentation</a>. It's an overview on how to compile plugins using the free Flex SDK.</li>
</ul>
<ul>
<li>A reference of the <a href="http://developer.longtailvideo.com/trac/wiki/Player5Api">API calls</a> plugins can use to interact with the player.</li>
<li>A reference of all <a href="http://developer.longtailvideo.com/trac/wiki/Player5Events">events the player fires</a>. The <i>View</i> events are the ones your plugin can trigger.</li>
<li>A reference on <a href="http://developer.longtailvideo.com/trac/wiki/FlashSecurity">Flash security restrictions</a>. Read this if you want to load XML or other data across websites.</li>
</ul>
<p>You can also find <a href="http://developer.longtailvideo.com/trac/wiki/Player5WikiStart#Plugins">information and source code downloads</a> from a string of plugins we built. Feel free to (re)use this code or create your own version of any of these plugins!</p>
<h3>Submit your plugin</h3>
<p>If you're happy with the way your plugin works, you can <a href="http://www.longtailvideo.com/addons/submitregister.html">submit it to LongTail Video</a>. We'll do a quick sanity check of your plugin and then list it in <a href="http://www.longtailvideo.com/addons/">our addons section</a>. You can also ask for donations of your plugin through our site to make some money. For more info about that, please <a href="http://www.longtailvideo.com/support/contact-us">contact us</a>.</p>
</body>
</html>