Skip to content

Commit 5c77221

Browse files
author
Brian Deitte
committed
Better scripts, working integration tests, and readme improvements:
- Use bin-debug as the location for all project-only testing. Killed off bin-release, as it didn't make a lot of sense to have this as well. - Removed setup.sh, which isn't really needed now that Video.js isn't being pulled in to video-js-swf. The part of setup.sh that's still needed was pulled into the README. - Change build.sh to copy a Flash-specific test file and the latest SWF into video.js/dist - Change test.sh to try to run both the unit and integration tests - Fix the main integration test file to point to the right swfobject.js file, a fix that Jim W really found - bin-debug now has a testing file, index_full.html, which was developed previously for testing the video-js-swf project. It's a pretty nice way to do all sorts of sanity checks without bringing in any of the main video.js project. - bin-debug also now has a second testing file, index.html, which is a stripped-down version of index_full.html. I created this version so that you don't have to click on four buttons to see a video play. It also really simplifies the wording on the page so that it's just focused on video playback.
1 parent 074e7e7 commit 5c77221

14 files changed

+1147
-79
lines changed

.gitignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.DS_Store
22
test/*
33
bin-release
4-
bin-debug
5-
*.iml
4+
*.iml
5+
bin-debug/VideoJS.swf
6+

CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ git pull upstream master
2929

3030
4. Create a new branch for your work, and make your changes.
3131

32-
5. Thoroughly test your feature or fix. In addition to new unit tests, and testing the area(s) specific to the area you're working on, a brief smoketest of the player never hurts. We'd like to suggest this short smoke test with both FLV and MP4 video formats:
32+
5. Thoroughly test your feature or fix. See the guide for running the unit and integration tests in the README. Adding new tests is both highly encouraged and appreciated. In addition to the automated tests, and testing the area(s) specific to the area you're working on, a brief smoketest of the player never hurts. We'd like to suggest this short smoke test with both FLV and MP4 video formats:
3333
1. Playback should start after clicking Play overlay
3434
2. Playback should start after clicking Play button
3535
3. Playback should pause when clicking the Pause button
@@ -40,7 +40,7 @@ git pull upstream master
4040

4141
(This may seem like a lot of steps, but they could all be accomplished with a couple of short-duration test files, within a few minutes.)
4242

43-
6. After committing your changes to your fork of the repo, submit your [Pull Request](#pull-requests).
43+
6. After committing your changes to your fork of the repo, submit your [Pull Request](#pull-requests). If you are changing the source code, make sure to submit a second pull request to the main Video.js repo. This must be done to change the copy of video-js.swf that Video.js uses. When you run build.sh, video-js.swf is always updated to contain the latest changes you have in video-js-swf.
4444

4545
##Filing Bugs
4646

@@ -76,7 +76,7 @@ Here's an example:
7676

7777
Chrome 21+ (as of 2013/01/01) doens't run Flash files that are local and loaded into a locally accessed page (file:///). To get around this you can do either of the following:
7878

79-
1. Do your development and testing using a local HTTP server.
79+
1. Do your development and testing using a local HTTP server. See the README for instructions on using simple-http-server for this purpose.
8080
2. Disable the version of Flash included with Chrome and enable a system-wide version of Flash instead.
8181

8282
Other Video.js Projects

README.md

+22-26
Original file line numberDiff line numberDiff line change
@@ -5,64 +5,60 @@ This project doesn't need to be used if you simply want to use the Flash video p
55
Installation
66
============
77

8-
1. Go through the Getting started section for [Video.js](https://github.com/videojs/video.js/blob/master/CONTRIBUTING.md). Most importantly, you will need have already built video.js successfully before building video-js-swf.
8+
1. Go through the Getting started section for [Video.js](https://github.com/videojs/video.js/blob/master/CONTRIBUTING.md). Most importantly, you will need have already built Video.js successfully before building video-js-swf.
99

1010
2. Install [Apache Flex](http://flex.apache.org/installer.html). There's no need to install any of the optional items.
1111

12-
3. In the base directory of video-js-swf, you'll see a setup.sh script. Make sure to include the path to Video.js and Flex SDK as arguments to the script.
12+
3. You'll need the Flash Player 10.3 library to compile. Run the commands below to get them installed.
1313

14-
```bash
15-
./setup.sh [video_js_dir] [flex_sdk_dir]
14+
```bash
15+
export FLEX_HOME=[flex_home]
16+
mkdir -p "$FLEX_HOME/frameworks/libs/player/10.3"
17+
curl --silent -o "$FLEX_HOME/frameworks/libs/player/10.3/playerglobal.swc" "http://fpdownload.macromedia.com/get/flashplayer/updaters/10/playerglobal10_3.swc"
1618
```
17-
This script will do the following:
18-
- Create a new directory in your Flex SDK for playerglobal10_3.swc, and download this file.
19-
- Set up the bin-debug and bin-release directories.
20-
.
19+
2120
4. Install a simple HTTP server for simpler testing.
2221

2322
```bash
2423
npm -g install simple-http-server
2524
```
2625

27-
5. Build video-js.swf using build.sh. Make sure to include the path to the Flex SDK as an argument to the script.
26+
5. Build the SWF using build.sh. Make sure to include the paths to Video.js and the Flex SDK as arguments to the script.
2827

2928
```bash
3029
./build.sh [video_js_dir] [flex_sdk_dir]
3130
```
3231

33-
This script will do the following:
34-
- Compile the source into bin-release using the release compiler settings.
35-
- Copy the SWF into [video.js]/src/swf/video-js.swf
36-
37-
7. Start running the simple HTTP server from the command-line.
32+
7. Start running the simple HTTP server from the command-line in the video-js-swf root directory.
3833

3934
```bash
4035
nserver
4136
```
4237

43-
Now you can see the demo working with your newly-built code:
44-
Start the simple HTTP server in the video-js-swf root directory, and open your browser at [http://localhost:8000/bin-release/demo.html]
45-
46-
You can keep using build.sh to rebuild the Flash code.
38+
8. 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.
4739

4840
Using with Your IDE
4941
============
5042

51-
The bin-debug directory is set up for usage with your IDE
52-
53-
If you don't want to keep using build.sh to build the code, the bin-debug directory is set up for use with your IDE. It is similar to the bin-release directory, except that the SWF name is expected to be VideoJS.swf. This works better with some IDEs that expect the SWF name to be the same as the main class name.
43+
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.
5444

55-
You can also 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-release/demo.html. As long as nserver is running, you should get the latest code you compile there.
45+
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.
5646

57-
Running Unit Tests
47+
Running Unit and Integration Tests
5848
===========
5949

60-
This project uses FlexUnit which is built into [Adobe FlashBuilder](ihttp://www.adobe.com/products/flash-builder.html) and is also available on [GitHub](https://github.com/flexunit/flexunit) if you are only interested in the binaries.
50+
For unit tests, this project uses FlexUnit. FlexUnit is built into [Adobe FlashBuilder](ihttp://www.adobe.com/products/flash-builder.html) and is also available on [GitHub](https://github.com/flexunit/flexunit) if you are only interested in the binaries.
6151

6252
The unit tests can be found in [project root]/src/com/videojs/test/
6353

64-
In order to run the tests:
54+
For integration tests, this project uses [qunit](http://qunitjs.com/).
6555

56+
The integration tests can be found in [project root]/test
57+
58+
In order to run all of the tests:
59+
60+
```bash
6661
./test.sh
62+
```
6763

68-
A copy of the produced swf will also be compiled into the bin-debug folder.
64+
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.

bin-debug/css/reset.css

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/* http://meyerweb.com/eric/tools/css/reset/
2+
v2.0 | 20110126
3+
License: none (public domain)
4+
*/
5+
6+
html, body, div, span, applet, object, iframe,
7+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
8+
a, abbr, acronym, address, big, cite, code,
9+
del, dfn, em, img, ins, kbd, q, s, samp,
10+
small, strike, strong, sub, sup, tt, var,
11+
b, u, i, center,
12+
dl, dt, dd, ol, ul, li,
13+
fieldset, form, label, legend,
14+
table, caption, tbody, tfoot, thead, tr, th, td,
15+
article, aside, canvas, details, embed,
16+
figure, figcaption, footer, header, hgroup,
17+
menu, nav, output, ruby, section, summary,
18+
time, mark, audio, video {
19+
margin: 0;
20+
padding: 0;
21+
border: 0;
22+
font-size: 100%;
23+
font: inherit;
24+
vertical-align: baseline;
25+
}
26+
/* HTML5 display-role reset for older browsers */
27+
article, aside, details, figcaption, figure,
28+
footer, header, hgroup, menu, nav, section {
29+
display: block;
30+
}
31+
body {
32+
line-height: 1;
33+
}
34+
ol, ul {
35+
list-style: none;
36+
}
37+
blockquote, q {
38+
quotes: none;
39+
}
40+
blockquote:before, blockquote:after,
41+
q:before, q:after {
42+
content: '';
43+
content: none;
44+
}
45+
table {
46+
border-collapse: collapse;
47+
border-spacing: 0;
48+
}

0 commit comments

Comments
 (0)