The light-weight Flash video player that makes Flash work like HTML5 video. This allows player skins, plugins, and other features to work with both HTML5 and Flash
This project doesn't need to be used if you simply want to use the Flash video player. Head back to the main Video.js project if that's all you need, as the compiled SWF is checked in there.
-
Go through the Getting started section for Video.js. Most importantly, you will need have already built Video.js successfully before building video-js-swf.
-
Install Apache Flex in /Applications/Flex. There's no need to install any of the optional items.
-
You'll need the Flash Player 10.3 library to compile. Run the commands below to get them installed.
mkdir -p "/Applications/Flex/frameworks/libs/player/10.3" curl -o "/Applications/Flex/frameworks/libs/player/10.3/playerglobal.swc" "http://fpdownload.macromedia.com/get/flashplayer/updaters/10/playerglobal10_3.swc"
-
Install the pieces for a simple HTTP server for simpler testing.
npm -g install forever cd http && npm install && cd ..
-
Build the SWF using build.sh. If you have Video.js installed at "../video.js" and the Flex SDK installed at "/Applications/Flex", you won't need to provide any arguments. Otherwise you'll need to include the paths to this projects as arguments to the script.
./build.sh
-
Start running the simple HTTP server from the command-line in the video-js-swf root directory. It will run as a background process and can be stopped later by using "stop" instead of "start".
forever start http/server.js
-
Open your browser at http://localhost:8000/bin-debug/index.html to see a video play. You can keep using build.sh to rebuild the Flash code.
If you don't want to keep using build.sh to build the code, you don't have to. The bin-debug directory is set up for usage with your IDE.
You can use the given .actionscriptProperties with Flash Builder. It is set up to use bin-debug and generally ready to use. When you want to run the project, set the output URL to http://localhost:8000/bin-debug/index.html. As long as nserver is running, you should get the latest code you compile there.
For unit tests, this project uses FlexUnit. The unit tests can be found in [project root]/src/com/videojs/test/
For integration tests, this project uses qunit. The integration tests can be found in [project root]/test
In order to run all of the tests, run test.sh.
./test.sh
A copy of the SWF produced for the unit tests will be compiled into the bin-debug folder. Both the unit and integration tests will attempt to run with the 'open' command, or an instruction will be given on how to run them manually.
There are very few tests. Adding to them is a fantastic and much appreciated way to contribute.