You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardexpand all lines: CONTRIBUTING.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ git pull upstream master
29
29
30
30
4. Create a new branch for your work, and make your changes.
31
31
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:
33
33
1. Playback should start after clicking Play overlay
34
34
2. Playback should start after clicking Play button
35
35
3. Playback should pause when clicking the Pause button
@@ -40,7 +40,7 @@ git pull upstream master
40
40
41
41
(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.)
42
42
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.
44
44
45
45
##Filing Bugs
46
46
@@ -76,7 +76,7 @@ Here's an example:
76
76
77
77
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:
78
78
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.
80
80
2. Disable the version of Flash included with Chrome and enable a system-wide version of Flash instead.
Copy file name to clipboardexpand all lines: README.md
+22-26
Original file line number
Diff line number
Diff line change
@@ -5,64 +5,60 @@ This project doesn't need to be used if you simply want to use the Flash video p
5
5
Installation
6
6
============
7
7
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.
9
9
10
10
2. Install [Apache Flex](http://flex.apache.org/installer.html). There's no need to install any of the optional items.
11
11
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.
- 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
+
21
20
4. Install a simple HTTP server for simpler testing.
22
21
23
22
```bash
24
23
npm -g install simple-http-server
25
24
```
26
25
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.
28
27
29
28
```bash
30
29
./build.sh [video_js_dir] [flex_sdk_dir]
31
30
```
32
31
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.
38
33
39
34
```bash
40
35
nserver
41
36
```
42
37
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.
47
39
48
40
Using with Your IDE
49
41
============
50
42
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.
54
44
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.
56
46
57
-
Running Unit Tests
47
+
Running Unit and Integration Tests
58
48
===========
59
49
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.
61
51
62
52
The unit tests can be found in [project root]/src/com/videojs/test/
63
53
64
-
In order to run the tests:
54
+
For integration tests, this project uses [qunit](http://qunitjs.com/).
65
55
56
+
The integration tests can be found in [project root]/test
57
+
58
+
In order to run all of the tests:
59
+
60
+
```bash
66
61
./test.sh
62
+
```
67
63
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.
0 commit comments