| [275] | 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 |
|---|
| [547] | 8 | * FlexUnit 4: http://opensource.adobe.com/wiki/display/flexunit/FlexUnit (for testing the player) |
|---|
| [910] | 9 | |
|---|
| 10 | === Compiling the Player With the Flex SDK and Ant === |
|---|
| [275] | 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. |
|---|
| [910] | 17 | |
|---|
| 18 | === Compiling the Player With Flex / Flash Builder === |
|---|
| [275] | 19 | |
|---|
| 20 | Alternately, if you're using Flex Builder or Flash Builder, you may use the following method to build the player: |
|---|
| 21 | |
|---|
| [1699] | 22 | 1. Create a new ActionScript project (you can give it any name except "Player"). |
|---|
| [800] | 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. |
|---|
| [845] | 25 | 4. Click the "Finish" button |
|---|
| 26 | 5. Right-click on your new project, and select "Properties" |
|---|
| [1699] | 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". |
|---|
| 28 | 7. Under the "ActionScript Build Path" tab, click the "Library Path" tab and then the "Add SWC Folder" button. Type in "libs" then press the "OK" button. |
|---|
| 29 | 8. Click the "OK" button. |
|---|
| 30 | 9. Alter your main application class to inherit from com.longtailvideo.jwplayer.player.Player (i.e. public class MyPlayer extends com.longtailvideo.jwplayer.player.Player { ... ) |
|---|
| 31 | 10. Under the "Project" menu, choose "Export Release Build". |
|---|
| 32 | 11. The player will be compiled as bin-release/{Your Project Name}.swf. |
|---|
| [910] | 33 | |
|---|
| [1934] | 34 | === Compiling the Player With Flash CS4/CS5/CS5.5 === |
|---|
| [910] | 35 | |
|---|
| 36 | 1. Create a new FLA file in the "src" directory. |
|---|
| 37 | 2. In the Properties menu, under "Publish", enter "com.longtailvideo.jwplayer.player.Player" in the Class field. |
|---|
| [1699] | 38 | 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. |
|---|
| [910] | 39 | 4. Open the Publish Settings dialog and click the "Settings" button next to the "Script" dropdown. |
|---|
| [1934] | 40 | 5. If using Flash CS5.5, make sure to set the "player" setting to "Flash Player 10 & 10.1", not the default of "Flash Player 10.2" |
|---|
| 41 | 6. Click the "Library path" tab, and remove all of the entries listed there. Then add a new entry: "$(FlexSDK)/frameworks/libs" |
|---|
| 42 | 7. Also add the "libs" folder contained in the JW Player source. |
|---|
| 43 | 8. Publish the application. |
|---|