| 1 | The JW Player is free for non-commerical use. To buy a license for commercial use, please visit
|
|---|
| 2 | https://www.longtailvideo.com/players/order.
|
|---|
| 3 |
|
|---|
| 4 | To build the JW Player, you will need the following software:
|
|---|
| 5 |
|
|---|
| 6 | * Flex SDK 3.3: http://opensource.adobe.com/wiki/display/flexsdk/Downloads
|
|---|
| 7 | * Ant 1.7.0: http://ant.apache.org/bindownload.cgi
|
|---|
| 8 | * FlexUnit 4: http://opensource.adobe.com/wiki/display/flexunit/FlexUnit (for testing the player)
|
|---|
| 9 | |
|---|
| 10 | === Compiling the Player With the Flex SDK and Ant === |
|---|
| 11 |
|
|---|
| 12 | To compile with Flex and Ant, enter the following command:
|
|---|
| 13 |
|
|---|
| 14 | ant -buildfile build\build.xml
|
|---|
| 15 |
|
|---|
| 16 | If the build is successful, player.swf will appear in the "bin-release" folder.
|
|---|
| 17 | |
|---|
| 18 | === Compiling the Player With Flex / Flash Builder === |
|---|
| 19 |
|
|---|
| 20 | Alternately, if you're using Flex Builder or Flash Builder, you may use the following method to build the player:
|
|---|
| 21 |
|
|---|
| 22 | 1. Create a new Actionscript project (you can give it any name except "Player").
|
|---|
| 23 | 2. Under "Project Contents", select the checkout tree (the folder where this README file lives).
|
|---|
| 24 | 3. If using Flex Builder 3, click the "Next" button, then type "src" into the "Main Source Folder" field.
|
|---|
| 25 | 4. Click the "Finish" button |
|---|
| 26 | 5. Right-click on your new project, and select "Properties" |
|---|
| 27 | 6. Under the "ActionScript Compiler" tab, click the radio button that reads "Use a specific version", and make sure it reads "10.0.0" (the default in Flex Builder 3 is "9.0.124") |
|---|
| 28 | 7. Click the "OK" button.
|
|---|
| 29 | 8. Alter your main application class to inherit from com.longtailvideo.jwplayer.player.Player (i.e. public class MyPlayer extends com.longtailvideo.jwplayer.player.Player { ... )
|
|---|
| 30 | 9. Under the "Project" menu, choose "Export Release Build".
|
|---|
| 31 | 10. The player will be compiled as bin-release/{Your Project Name}.swf. |
|---|
| 32 | |
|---|
| 33 | === Compiling the Player With Flash CS4 === |
|---|
| 34 | |
|---|
| 35 | 1. Create a new FLA file in the "src" directory. |
|---|
| 36 | 2. In the Properties menu, under "Publish", enter "com.longtailvideo.jwplayer.player.Player" in the Class field. |
|---|
| 37 | 3. Open the "Preferences" menu, go to the Actionscript panel, then click the "Actionscript 3.0 settings" button. Enter the path to the Flex SDK in the "Flex SDK Path" field. |
|---|
| 38 | 4. Open the Publish Settings dialog and click the "Settings" button next to the "Script" dropdown. |
|---|
| 39 | 5. Click the "Library path" tab, and edit the entry "$(FlexSDK)/frameworks/libs/flex.swc" to read "$(FlexSDK)/frameworks/libs" (i.e. remove "flex.swc"). |
|---|
| 40 | 6. Publish the application. |
|---|