From ff957fa9f5e6f631f2cb1f2f9653e4c6677655b8 Mon Sep 17 00:00:00 2001 From: BCjwhisenant Date: Fri, 15 Mar 2013 21:20:40 -0400 Subject: [PATCH 01/32] changes to the contributing guide. --- CONTRIBUTING.md | 126 ++++++++++++++++++++++++++---------------------- 1 file changed, 68 insertions(+), 58 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e2bb5512f4..43d23d73f3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,17 +1,19 @@ -So you're telling me you want to spend some of your precious time giving back to this humble project? You're crazy. But since you're here...there are some ways you can help make Video.js a faster, easier, more compatible, and more fully-featured video player. +If you're on this page, you must be interested in spending some time giving back to this humble project. If that's the case, fantastic! Here are some ways you can help make Video.js a faster, easier, more compatible, and more fully-featured video player. * Bug reports and fixes - * Features and changes (pull requests) + * Features and changes * [Answer questions](http://stackoverflow.com/questions/tagged/video.js) on Stack Overflow * Other Video.js projects -Don't miss the [code style guide](#code-style). +Thanks again for helping out! One thing we ask is that you refer to the [code style guide](#code-style) when writing your code. # Getting started -1. [Download and install Node.js](http://nodejs.org/download/). Video.js uses Node for build and test automation. +1. [Download and install Node.js](http://nodejs.org/download/). Video.js uses Node for build and test automation. Node is available for Windows, Mac OS X, Linux, and SunOS, as well as source code, in case you want to build it yourself. -2. [Fork](http://help.github.com/fork-a-repo/) and clone the video.js git repository. +2. Fork the video.js git repository. At the top of every github page, there is a Fork button. Click it, and the forking process will copy Video.js into your organization. You can find more information on [Forking a Github repository](http://help.github.com/fork-a-repo/) here. + +3. Clone your copy of video.js to your local workstation. ```bash # Clones your fork of the repo into the current directory in terminal @@ -29,124 +31,132 @@ Don't miss the [code style guide](#code-style). git pull upstream master ``` -3. Install the grunt-cli package so that you will have the correct version of grunt available from any project that needs it. This should be done as a global install: +4. Install the grunt-cli package so that you will have the correct version of grunt available from any project that needs it. This should be done as a global install: + On Unix-based systems, you'll have to do this as a superuser: + ```bash + sudo npm install -g grunt-cli + ``` + On Windows, you can just run: ```bash npm install -g grunt-cli ``` -4. Install required node.js modules using node package manager. +5. Install required node.js modules using node package manager. + You do not need to install these modules as a superuser, so for all platforms run: ```bash npm install ``` -5. Build a local copy. Video.js uses [grunt](http://gruntjs.com), a node-based task automation tool for building and tesing. The following will compile a local copy in the dist/ directory and run tests. It will also create a sourcelist.js file that can be used to load the video.js source scripts in a page. +6. Build a local copy and run the current suite of tests. Video.js uses [grunt](http://gruntjs.com), a node-based task automation tool for building and tesing. + +The following will compile a local copy in the dist/ directory and run tests. It will also create a sourcelist.js file that can be used to load the video.js source scripts in a page. ```bash grunt ``` +To run the QUnit test suite, run: + ```bash + grunt test + ``` + +7. Depending on whether you're adding something new, making a change or fix a bug, you'll want to do some up-front preparation. + * If you're fixing a bug, submit an issue for it. If you're fixing an existing bug, claim it by adding a comment to it. This will give a heads-up to anyone watching the issue that you're working on a fix. Please refer to the [Bugs](#bugs) section below for guidelines on filing new issues. + * Create a new branch for your work. -6. When you're ready to add a feature, make a change, or fix a bug, first create a new branch for it. Prefix the branch with the correspoding [issue number](https://github.com/zencoder/video-js/issues). If there isn't one, submit a new issue. Anything more complicated than simple docs changes should have an issue. + * If you're adding new functionality instead, you only need to create a new branch for your work. When you submit a Pull Request, Github automatically opens a new issue to track it. +Since the issue filing process is described elsewhere, let's assume that you've filed or claimed the issue already. + +Next, create the branch: ```bash - git checkout -b <####-branch-name> + git checkout -b ``` +Prefix the branch with the corresponding [issue number](https://github.com/zencoder/video-js/issues). Add as much additional information after that as you think is appropriate to remain concise yet informative. + +8. Thoroughly test your feature or fix. If you're fixing a bug, we recommend in addition to testing the fix itself, to do some testing around the areas that your fix has touched. For example, a brief smoketest of the player never hurts. + +9. Commit your feature or fix locally. -Be sure to reference your issue in any commit message. Github allows you to do this though the [fixes or closes](https://github.com/blog/831-issues-2-0-the-next-generation) keywords. +Be sure to reference your issue in any commit message. Github allows you to do this though the [fixes](https://github.com/blog/831-issues-2-0-the-next-generation) keyword. ```bash - My commit message. fixes #123 + My commit message. fixes issue#123 + Testing: + (briefly describe any testing here, for example, 'unit tests and cross-browser manual tests around playback and network interruption') ``` +10. Submit a [Pull Request](#pull-requests). # Bugs -A bug is a _demonstrable problem_ that is caused by the code in the -repository. Good bug reports are extremely helpful - thank you! +**A bug is a demonstrable problem** that is caused by the code in the repository. Good bug reports are extremely helpful. Thank You! Guidelines for bug reports: -1. **Use the [GitHub issue search](https://github.com/zencoder/video-js/issues)** — check if the issue has already been reported. +1. Use the [GitHub issue search](https://github.com/zencoder/video-js/issues) — check if the issue has already been reported. -2. **Check if the issue has been fixed** — try to reproduce it using the latest `master` branch in the repository. +2. Check if the issue has been fixed — try to reproduce it using the latest `master` branch in the repository. -3. **Isolate the problem** — ideally create a [reduced test - case](http://css-tricks.com/6263-reduced-test-cases/) and a live example. +3. Isolate the problem — ideally create a [reduced test case](http://css-tricks.com/6263-reduced-test-cases/) and a live example. -A good bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What browser(s), OS, and devices experience the problem? What would you expect to be the outcome? All these -details will help people to fix any potential bugs. +A good bug report should be as detailed as possible, so that others won't have to follow up for the essential details. -Example: +Here's an example: -> Short and descriptive example bug report title +> Short yet concise Bug Summary > -> A summary of the issue and the browser/OS environment in which it occurs. If -> suitable, include the steps required to reproduce the bug. +> Description +> Happens on Windows 7 and OSX. Seen with IE9, Firefox 19 OSX, Chrome 21, Flash 11.6 and 11.2 > > 1. This is the first step > 2. This is the second step > 3. Further steps, etc. > -> `` (a link to the reduced test case) +> Expected: +> (describe the expected outcome of the steps above) +> +> Actual: +> (describe what actually happens) +> +> `` (a link to the reduced test case, if it exists) > > Any other information you want to share that is relevant to the issue being > reported. This might include the lines of code that you have identified as > causing the bug, and potential solutions (and your opinions on their > merits). -**[File a bug report](https://github.com/h5bp/html5-boilerplate/issues/)** - -### NOTE: Testing Flash Locall in Chrome -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 need to [disable the version of Flash](http://helpx.adobe.com/flash-player/kb/flash-player-google-chrome.html#How_can_I_run_debugger_or_alternate_versions_of_Flash_Player_in_Google_Chrome) included with Chrome and enable a system-wide version of Flash. +**[File a bug report](https://github.com/zencoder/video-js/issues/new)** +### NOTE: Testing Flash Locally in Chrome +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: +1. Do your development and testing using a local HTTP server. +2. [Disable the version of Flash included with Chrome](http://helpx.adobe.com/flash-player/kb/flash-player-google-chrome.html#How_can_I_run_debugger_or_alternate_versions_of_Flash_Player_in_Google_Chrome) and enable a system-wide version of Flash instead. ## Pull requests -Good pull requests - patches, improvements, new features - are a fantastic help. They should remain focused in scope and avoid containing unrelated commits. If your contribution involves a significant amount of work or substantial changes to any part of the project, please open an issue to discuss it first. +Good pull requests - bug fixes, improvements, new features - are a fantastic help. They should remain focused in scope and avoid containing unrelated commits. If your contribution involves a significant amount of work or substantial changes to any part of the project, please open an issue to discuss it first. Make sure to adhere to the coding conventions used throughout a project (indentation, accurate comments, etc.). Please update any documentation that is relevant to the change you're making. Please follow this process; it's the best way to get your work included in the project: -1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, and configure the remotes: - - ```bash - # Clones your fork of the repo into the current directory in terminal - git clone https://github.com//html5-boilerplate.git - # Navigate to the newly cloned directory - cd html5-boilerplate - # Assigns the original repo to a remote called "upstream" - git remote add upstream https://github.com/h5bp/html5-boilerplate.git - ``` - -2. If you cloned a while ago, get the latest changes from upstream: - - ```bash - git checkout master - git pull upstream master - ``` - -3. Create a new topic branch to contain your feature, change, or fix: - - ```bash - git checkout -b - ``` - -4. Commit your changes in logical chunks. Please adhere to these [git commit message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) or your pull request is unlikely be merged into the main project. Use git's [interactive rebase](https://help.github.com/articles/interactive-rebase) feature to tidy up your commits before making them public. +1. Commit your changes in logical chunks. Please adhere to these [git commit message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) or your pull request is unlikely be merged into the main project. Use git's [interactive rebase](https://help.github.com/articles/interactive-rebase) feature to tidy up your commits before making them public. -5. Locally merge (or rebase) the upstream development branch into your topic branch: +2. Locally merge (or rebase) the upstream development branch into your topic branch: ```bash git pull [--rebase] upstream master ``` -6. Push your topic branch up to your fork: +3. Push your topic branch up to your fork: ```bash git push origin ``` -10. [Open a Pull Request](http://help.github.com/send-pull-requests/) with a clear title and description. +4. [Open a Pull Request](http://help.github.com/send-pull-requests/) with a clear title and description. # Code Style Please follow [Google's JavaScript Style Guide](http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml) to the letter. If your editor supports [.editorconfig](http://editorconfig.org/#download) it will make it easier to manage differences from your own coding style. From 80802e68d8f00ac27799a968295b11bd8c8ad19c Mon Sep 17 00:00:00 2001 From: BCjwhisenant Date: Fri, 15 Mar 2013 22:30:25 -0300 Subject: [PATCH 02/32] Fixed formatting in some of the instructions --- CONTRIBUTING.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 43d23d73f3..96b9c28b63 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,35 +51,35 @@ Thanks again for helping out! One thing we ask is that you refer to the [code st 6. Build a local copy and run the current suite of tests. Video.js uses [grunt](http://gruntjs.com), a node-based task automation tool for building and tesing. -The following will compile a local copy in the dist/ directory and run tests. It will also create a sourcelist.js file that can be used to load the video.js source scripts in a page. + The following will compile a local copy in the dist/ directory and run tests. It will also create a sourcelist.js file that can be used to load the video.js source scripts in a page. ```bash grunt ``` -To run the QUnit test suite, run: + To run the QUnit test suite, run: ```bash grunt test ``` 7. Depending on whether you're adding something new, making a change or fix a bug, you'll want to do some up-front preparation. - * If you're fixing a bug, submit an issue for it. If you're fixing an existing bug, claim it by adding a comment to it. This will give a heads-up to anyone watching the issue that you're working on a fix. Please refer to the [Bugs](#bugs) section below for guidelines on filing new issues. - * Create a new branch for your work. + 1. If you're fixing a bug, submit an issue for it. If you're fixing an existing bug, claim it by adding a comment to it. This will give a heads-up to anyone watching the issue that you're working on a fix. Please refer to the [Bugs](#bugs) section below for guidelines on filing new issues. + 2. Create a new branch for your work. - * If you're adding new functionality instead, you only need to create a new branch for your work. When you submit a Pull Request, Github automatically opens a new issue to track it. + If you're adding new functionality instead, you only need to create a new branch for your work. When you submit a Pull Request, Github automatically opens a new issue to track it. -Since the issue filing process is described elsewhere, let's assume that you've filed or claimed the issue already. + Since the issue filing process is described elsewhere, let's assume that you've filed or claimed the issue already. -Next, create the branch: + Next, create the branch: ```bash git checkout -b ``` -Prefix the branch with the corresponding [issue number](https://github.com/zencoder/video-js/issues). Add as much additional information after that as you think is appropriate to remain concise yet informative. + Prefix the branch with the corresponding [issue number](https://github.com/zencoder/video-js/issues). Add as much additional information after that as you think is appropriate to remain concise yet informative. 8. Thoroughly test your feature or fix. If you're fixing a bug, we recommend in addition to testing the fix itself, to do some testing around the areas that your fix has touched. For example, a brief smoketest of the player never hurts. 9. Commit your feature or fix locally. -Be sure to reference your issue in any commit message. Github allows you to do this though the [fixes](https://github.com/blog/831-issues-2-0-the-next-generation) keyword. + Be sure to reference your issue in any commit message. Github allows you to do this though the [fixes](https://github.com/blog/831-issues-2-0-the-next-generation) keyword. ```bash My commit message. fixes issue#123 From c17d5890d0b9bcfcc8608ca129d0e27eda42a744 Mon Sep 17 00:00:00 2001 From: BCjwhisenant Date: Tue, 19 Mar 2013 12:32:13 -0400 Subject: [PATCH 03/32] clarified some language added a note about turning off npm colors for windows users --- CONTRIBUTING.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 43d23d73f3..d79a131eb2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -49,6 +49,11 @@ Thanks again for helping out! One thing we ask is that you refer to the [code st npm install ``` + A note to Windows developers: If you run npm commands, and you find that your command prompt colors have suddenly reversed, you can configure npm to set color to false to prevent this from happening. + ```bash + npm config set color false + ``` + Note that this change takes effect when a new command prompt window is opened; the current window will not be affected. 6. Build a local copy and run the current suite of tests. Video.js uses [grunt](http://gruntjs.com), a node-based task automation tool for building and tesing. The following will compile a local copy in the dist/ directory and run tests. It will also create a sourcelist.js file that can be used to load the video.js source scripts in a page. From dc9934b7657c75f06694c7b99ed7967a4e5c8bbd Mon Sep 17 00:00:00 2001 From: BCjwhisenant Date: Tue, 19 Mar 2013 14:03:05 -0400 Subject: [PATCH 04/32] Fixed (hopefully) some minor list formatting --- CONTRIBUTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ff8565408b..0a5362894c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -136,7 +136,9 @@ Here's an example: ### NOTE: Testing Flash Locally in Chrome 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: + 1. Do your development and testing using a local HTTP server. + 2. [Disable the version of Flash included with Chrome](http://helpx.adobe.com/flash-player/kb/flash-player-google-chrome.html#How_can_I_run_debugger_or_alternate_versions_of_Flash_Player_in_Google_Chrome) and enable a system-wide version of Flash instead. ## Pull requests From 5dbb9aabc7f5ef35ef86d722d036044b17acec2a Mon Sep 17 00:00:00 2001 From: BCjwhisenant Date: Fri, 22 Mar 2013 14:07:21 -0400 Subject: [PATCH 05/32] more changes to the CONTRIBUTING.md guide added guides for the grunt tasks for feature and issue management --- CONTRIBUTING.md | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0a5362894c..2f5bfd6510 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -74,11 +74,18 @@ Thanks again for helping out! One thing we ask is that you refer to the [code st Since the issue filing process is described elsewhere, let's assume that you've filed or claimed the issue already. - Next, create the branch: + Next, create the branch. We've created a grunt plugin that helps you do this. + For new features: ```bash - git checkout -b + grunt feature:start ``` - Prefix the branch with the corresponding [issue number](https://github.com/zencoder/video-js/issues). Add as much additional information after that as you think is appropriate to remain concise yet informative. + + If you're fixing an issue: + ```bash + grunt issue:start + ``` + + You will be prompted to name the branch. After that, grunt will create the branch locally, push it up to your origin, and track it. You're now ready to start building your feature or fixing that bug! 8. Thoroughly test your feature or fix. If you're fixing a bug, we recommend in addition to testing the fix itself, to do some testing around the areas that your fix has touched. For example, a brief smoketest of the player never hurts. @@ -91,8 +98,33 @@ Thanks again for helping out! One thing we ask is that you refer to the [code st Testing: (briefly describe any testing here, for example, 'unit tests and cross-browser manual tests around playback and network interruption') ``` -10. Submit a [Pull Request](#pull-requests). +10. You can use grunt to submit your [Pull Request](#pull-requests). + + For your new feature: + ```bash + grunt feature:submit + ``` + Or for your bug fix: + ```bash + grunt issue:submit + ``` + + You'll be prompted for title and description for the Pull Request. After that, your Pull Request will be submitted to video-js. + +11. You're Done! (except for cleanup). And grunt can help with that too! + + To clean up your feature: + ```bash + grunt feature:delete + ``` + Or your bug fix: + ```bash + grunt issue:delete + ``` + PLEASE NOTE: THIS WILL DELETE YOUR LOCAL AND REMOTE COPIES OF THE FEATURE. + This is meant to clean up your local and remote branches, so make sure any changes you don't want to lose have been pulled into the parent project or another branch first. + # Bugs **A bug is a demonstrable problem** that is caused by the code in the repository. Good bug reports are extremely helpful. Thank You! From 30949a3c83d0ee5313ab989d911130a90973b828 Mon Sep 17 00:00:00 2001 From: BCjwhisenant Date: Fri, 22 Mar 2013 14:11:03 -0400 Subject: [PATCH 06/32] more updates to CONTRIBUTING.md --- CONTRIBUTING.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2f5bfd6510..4ad3deeabe 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -100,7 +100,12 @@ Thanks again for helping out! One thing we ask is that you refer to the [code st ``` 10. You can use grunt to submit your [Pull Request](#pull-requests). - For your new feature: + First, checkout your feature or issue branch: + ```bash + git checkout (branchname) + ``` + + Next, submit your Pull Request, for your new feature: ```bash grunt feature:submit ``` @@ -113,6 +118,11 @@ Thanks again for helping out! One thing we ask is that you refer to the [code st 11. You're Done! (except for cleanup). And grunt can help with that too! + First, checkout your feature or issue branch: + ```bash + git checkout (branchname) + ``` + To clean up your feature: ```bash grunt feature:delete From d40c33cf65d6937112ba6e1dd2d91b1eefa011ac Mon Sep 17 00:00:00 2001 From: BCjwhisenant Date: Fri, 22 Mar 2013 14:14:22 -0400 Subject: [PATCH 07/32] another clarification to CONTRIBUTING.md --- CONTRIBUTING.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4ad3deeabe..85d2eb8626 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -75,12 +75,13 @@ Thanks again for helping out! One thing we ask is that you refer to the [code st Since the issue filing process is described elsewhere, let's assume that you've filed or claimed the issue already. Next, create the branch. We've created a grunt plugin that helps you do this. - For new features: + + Run this command for new features: ```bash grunt feature:start ``` - If you're fixing an issue: + Run this command if you're fixing an issue: ```bash grunt issue:start ``` @@ -123,12 +124,12 @@ Thanks again for helping out! One thing we ask is that you refer to the [code st git checkout (branchname) ``` - To clean up your feature: + Run this command to clean up your feature: ```bash grunt feature:delete ``` - Or your bug fix: + Run this command to clean up your bug fix: ```bash grunt issue:delete ``` From c9bba468468cc710e0dcfa1a76dd9e11111b7863 Mon Sep 17 00:00:00 2001 From: BCjwhisenant Date: Fri, 22 Mar 2013 14:16:27 -0400 Subject: [PATCH 08/32] cleaned up more grammar and syntax. --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 85d2eb8626..92d6355c07 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -117,7 +117,7 @@ Thanks again for helping out! One thing we ask is that you refer to the [code st You'll be prompted for title and description for the Pull Request. After that, your Pull Request will be submitted to video-js. -11. You're Done! (except for cleanup). And grunt can help with that too! +11. You're Done! (except for cleanup.) And grunt can help with that too! First, checkout your feature or issue branch: ```bash From 9abe53a32e3b7697d880f8fafde9b4c48ea37e29 Mon Sep 17 00:00:00 2001 From: BCJwhisenant Date: Wed, 26 Jun 2013 16:02:34 -0400 Subject: [PATCH 09/32] updated the contrib guide to use contribflow commands fixed a typo --- CONTRIBUTING.md | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 92d6355c07..8eae7008f1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,7 +42,18 @@ Thanks again for helping out! One thing we ask is that you refer to the [code st npm install -g grunt-cli ``` -5. Install required node.js modules using node package manager. +5. Install the contribflow package. This is a package from Zencoder that video.js developed to streamline the workflow for new features and hotfixes. + + On Unix-based systems, you'll have to do this as a superuser: + ```bash + sudo npm install -g contribflow + ``` + On Windows, you can just run: + ```bash + npm install -g contribflow + ``` + +6. Install required node.js modules using node package manager. You do not need to install these modules as a superuser, so for all platforms run: ```bash @@ -54,7 +65,7 @@ Thanks again for helping out! One thing we ask is that you refer to the [code st npm config set color false ``` Note that this change takes effect when a new command prompt window is opened; the current window will not be affected. -6. Build a local copy and run the current suite of tests. Video.js uses [grunt](http://gruntjs.com), a node-based task automation tool for building and tesing. +7. Build a local copy and run the current suite of tests. Video.js uses [grunt](http://gruntjs.com), a node-based task automation tool for building and tesing. The following will compile a local copy in the dist/ directory and run tests. It will also create a sourcelist.js file that can be used to load the video.js source scripts in a page. @@ -66,7 +77,7 @@ Thanks again for helping out! One thing we ask is that you refer to the [code st grunt test ``` -7. Depending on whether you're adding something new, making a change or fix a bug, you'll want to do some up-front preparation. +8. Depending on whether you're adding something new, making a change or fix a bug, you'll want to do some up-front preparation. 1. If you're fixing a bug, submit an issue for it. If you're fixing an existing bug, claim it by adding a comment to it. This will give a heads-up to anyone watching the issue that you're working on a fix. Please refer to the [Bugs](#bugs) section below for guidelines on filing new issues. 2. Create a new branch for your work. @@ -78,28 +89,28 @@ Thanks again for helping out! One thing we ask is that you refer to the [code st Run this command for new features: ```bash - grunt feature:start + contrib feature start ``` Run this command if you're fixing an issue: ```bash - grunt issue:start + contrib hotfix start ``` You will be prompted to name the branch. After that, grunt will create the branch locally, push it up to your origin, and track it. You're now ready to start building your feature or fixing that bug! -8. Thoroughly test your feature or fix. If you're fixing a bug, we recommend in addition to testing the fix itself, to do some testing around the areas that your fix has touched. For example, a brief smoketest of the player never hurts. +9. Thoroughly test your feature or fix. If you're fixing a bug, we recommend in addition to testing the fix itself, to do some testing around the areas that your fix has touched. For example, a brief smoketest of the player never hurts. -9. Commit your feature or fix locally. +10. Commit your feature or fix locally. - Be sure to reference your issue in any commit message. Github allows you to do this though the [fixes](https://github.com/blog/831-issues-2-0-the-next-generation) keyword. + Be sure to reference your issue in any commit message. Github allows you to do this through the [fixes](https://github.com/blog/831-issues-2-0-the-next-generation) keyword. ```bash My commit message. fixes issue#123 Testing: (briefly describe any testing here, for example, 'unit tests and cross-browser manual tests around playback and network interruption') ``` -10. You can use grunt to submit your [Pull Request](#pull-requests). +11. You can use grunt to submit your [Pull Request](#pull-requests). First, checkout your feature or issue branch: ```bash @@ -108,16 +119,16 @@ Thanks again for helping out! One thing we ask is that you refer to the [code st Next, submit your Pull Request, for your new feature: ```bash - grunt feature:submit + contrib feature submit ``` Or for your bug fix: ```bash - grunt issue:submit + contrib hotfix submit ``` You'll be prompted for title and description for the Pull Request. After that, your Pull Request will be submitted to video-js. -11. You're Done! (except for cleanup.) And grunt can help with that too! +12. You're Done! (except for cleanup.) And grunt can help with that too! First, checkout your feature or issue branch: ```bash @@ -126,12 +137,12 @@ Thanks again for helping out! One thing we ask is that you refer to the [code st Run this command to clean up your feature: ```bash - grunt feature:delete + contrib feature delete ``` Run this command to clean up your bug fix: ```bash - grunt issue:delete + contrib hotfix delete ``` PLEASE NOTE: THIS WILL DELETE YOUR LOCAL AND REMOTE COPIES OF THE FEATURE. This is meant to clean up your local and remote branches, so make sure any changes you don't want to lose have been pulled into the parent project or another branch first. From b6667dfaf6663cc69fd3e410a7cd3ede76b42fd8 Mon Sep 17 00:00:00 2001 From: BCJwhisenant Date: Thu, 27 Jun 2013 15:08:10 -0400 Subject: [PATCH 10/32] changes to the contrib guide, based on Apurva's review. --- CONTRIBUTING.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8eae7008f1..3dce9c63e8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -If you're on this page, you must be interested in spending some time giving back to this humble project. If that's the case, fantastic! Here are some ways you can help make Video.js a faster, easier, more compatible, and more fully-featured video player. +If you're on this page, you must be interested in spending some time giving back to this humble project. If that's the case, fantastic! Here are some ways you can help make Video.js a faster, easier, and more fully-featured video player. * Bug reports and fixes * Features and changes @@ -31,7 +31,7 @@ Thanks again for helping out! One thing we ask is that you refer to the [code st git pull upstream master ``` -4. Install the grunt-cli package so that you will have the correct version of grunt available from any project that needs it. This should be done as a global install: +4. Install the grunt-cli package so that you will have the correct version of grunt available for any project that needs it. This should be done as a global install: On Unix-based systems, you'll have to do this as a superuser: ```bash @@ -65,9 +65,7 @@ Thanks again for helping out! One thing we ask is that you refer to the [code st npm config set color false ``` Note that this change takes effect when a new command prompt window is opened; the current window will not be affected. -7. Build a local copy and run the current suite of tests. Video.js uses [grunt](http://gruntjs.com), a node-based task automation tool for building and tesing. - - The following will compile a local copy in the dist/ directory and run tests. It will also create a sourcelist.js file that can be used to load the video.js source scripts in a page. +7. Build a local copy and run the current suite of tests. ```bash grunt @@ -77,7 +75,7 @@ Thanks again for helping out! One thing we ask is that you refer to the [code st grunt test ``` -8. Depending on whether you're adding something new, making a change or fix a bug, you'll want to do some up-front preparation. +8. Depending on whether you're adding something new, making a change or fixing a bug, you'll want to do some up-front preparation. 1. If you're fixing a bug, submit an issue for it. If you're fixing an existing bug, claim it by adding a comment to it. This will give a heads-up to anyone watching the issue that you're working on a fix. Please refer to the [Bugs](#bugs) section below for guidelines on filing new issues. 2. Create a new branch for your work. @@ -97,11 +95,11 @@ Thanks again for helping out! One thing we ask is that you refer to the [code st contrib hotfix start ``` - You will be prompted to name the branch. After that, grunt will create the branch locally, push it up to your origin, and track it. You're now ready to start building your feature or fixing that bug! + You will be prompted to name the branch. After that, contrib will create the branch locally, and use git to push it up to your origin, and track it. You're now ready to start building your feature or fixing that bug! 9. Thoroughly test your feature or fix. If you're fixing a bug, we recommend in addition to testing the fix itself, to do some testing around the areas that your fix has touched. For example, a brief smoketest of the player never hurts. -10. Commit your feature or fix locally. +10. Commit and push your feature or hotfix locally. You'll use Git directly for these tasks. Be sure to reference your issue in any commit message. Github allows you to do this through the [fixes](https://github.com/blog/831-issues-2-0-the-next-generation) keyword. @@ -110,7 +108,7 @@ Thanks again for helping out! One thing we ask is that you refer to the [code st Testing: (briefly describe any testing here, for example, 'unit tests and cross-browser manual tests around playback and network interruption') ``` -11. You can use grunt to submit your [Pull Request](#pull-requests). +11. Use contrib to submit your [Pull Request](#pull-requests). First, checkout your feature or issue branch: ```bash @@ -126,9 +124,9 @@ Thanks again for helping out! One thing we ask is that you refer to the [code st contrib hotfix submit ``` - You'll be prompted for title and description for the Pull Request. After that, your Pull Request will be submitted to video-js. + You'll be prompted for title and description for the Pull Request. After that, contrib will use Git to submit your Pull Request to video.js. -12. You're Done! (except for cleanup.) And grunt can help with that too! +12. You're Done! (except for cleanup.) To clean up your feature or hotfix branch: First, checkout your feature or issue branch: ```bash From 8f45f93c848e1dbec1cd76c55a2b10da7985ba57 Mon Sep 17 00:00:00 2001 From: BCJwhisenant Date: Thu, 27 Jun 2013 15:21:19 -0400 Subject: [PATCH 11/32] A small substitution --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3dce9c63e8..6a3a00e09b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -83,7 +83,7 @@ Thanks again for helping out! One thing we ask is that you refer to the [code st Since the issue filing process is described elsewhere, let's assume that you've filed or claimed the issue already. - Next, create the branch. We've created a grunt plugin that helps you do this. + Next, create the branch. You'll use contrib to do this task. Run this command for new features: ```bash From 1c606779c32a752a74969f8112b1bdf4cc33d6e6 Mon Sep 17 00:00:00 2001 From: BCJwhisenant Date: Wed, 10 Jul 2013 12:05:38 -0400 Subject: [PATCH 12/32] Removed an extraneous section at the bottom about Pull Requests. (since we recommend further up the page to use contribflow) --- CONTRIBUTING.md | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6a3a00e09b..c5ec40f01a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -193,30 +193,6 @@ To get around this you can do either of the following: 2. [Disable the version of Flash included with Chrome](http://helpx.adobe.com/flash-player/kb/flash-player-google-chrome.html#How_can_I_run_debugger_or_alternate_versions_of_Flash_Player_in_Google_Chrome) and enable a system-wide version of Flash instead. -## Pull requests - -Good pull requests - bug fixes, improvements, new features - are a fantastic help. They should remain focused in scope and avoid containing unrelated commits. If your contribution involves a significant amount of work or substantial changes to any part of the project, please open an issue to discuss it first. - -Make sure to adhere to the coding conventions used throughout a project (indentation, accurate comments, etc.). Please update any documentation that is relevant to the change you're making. - -Please follow this process; it's the best way to get your work included in the project: - -1. Commit your changes in logical chunks. Please adhere to these [git commit message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) or your pull request is unlikely be merged into the main project. Use git's [interactive rebase](https://help.github.com/articles/interactive-rebase) feature to tidy up your commits before making them public. - -2. Locally merge (or rebase) the upstream development branch into your topic branch: - - ```bash - git pull [--rebase] upstream master - ``` - -3. Push your topic branch up to your fork: - - ```bash - git push origin - ``` - -4. [Open a Pull Request](http://help.github.com/send-pull-requests/) with a clear title and description. - # Code Style Please follow [Google's JavaScript Style Guide](http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml) to the letter. If your editor supports [.editorconfig](http://editorconfig.org/#download) it will make it easier to manage differences from your own coding style. From 3716f3b1f0ce22ca0d1720d99bb230a09ca78d81 Mon Sep 17 00:00:00 2001 From: Benoit Tremblay Date: Sun, 14 Jul 2013 11:34:25 -0400 Subject: [PATCH 13/32] Fixed broken link --- docs/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index 2704fc06c3..c3d52335a3 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,7 +2,7 @@

Video.js Documentation

-The Video.js documentation is here to help you setup and use the player. These docs can be found and contributed to in the [Video.js library repository](https://github.com/zencoder/video-js/tree/master/docs). +The Video.js documentation is here to help you setup and use the player. These docs can be found and contributed to in the [Video.js library repository](https://github.com/videojs/video.js/tree/master/docs). ## Getting Started @@ -24,4 +24,4 @@ The Video.js documentation is here to help you setup and use the player. These d ## Resources -* [Glossary](glossary.md) - Some helpful definitions. \ No newline at end of file +* [Glossary](glossary.md) - Some helpful definitions. From 91da153c02e5629c0a982e435ba5266537c174c3 Mon Sep 17 00:00:00 2001 From: Steve Heffernan Date: Wed, 17 Jul 2013 17:51:29 -0700 Subject: [PATCH 14/32] Updated readme and contrib guide. closes #645 close #397 With changes from @sh1ps and myself --- .zenflow | 10 -- CONTRIBUTING.md | 358 +++++++++++++++++++++++++++--------------------- README.md | 48 ++----- VERSION.yml | 5 - docs/setup.md | 4 +- 5 files changed, 209 insertions(+), 216 deletions(-) delete mode 100644 .zenflow delete mode 100644 VERSION.yml diff --git a/.zenflow b/.zenflow deleted file mode 100644 index 8b2409c723..0000000000 --- a/.zenflow +++ /dev/null @@ -1,10 +0,0 @@ ---- -confirm_review: true -backup_remote: false -release_branch: stable -project: videojs -qa_branch: false -staging_branch: false -development_branch: master -remote: origin -confirm_staging: false diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c5ec40f01a..69a0f52b6b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,161 +1,34 @@ -If you're on this page, you must be interested in spending some time giving back to this humble project. If that's the case, fantastic! Here are some ways you can help make Video.js a faster, easier, and more fully-featured video player. +CONTRIBUTING +============ +So you want to help out? Great! There's a number of ways you can get involved. - * Bug reports and fixes - * Features and changes - * [Answer questions](http://stackoverflow.com/questions/tagged/video.js) on Stack Overflow - * Other Video.js projects + * [File and discuss issues](#filing-issues) + * [Contribute code](#contribute-code) + * [Build and share plugins](docs/plugins.md) + * [Answer questions on Stack Overflow](http://stackoverflow.com/questions/tagged/video.js) -Thanks again for helping out! One thing we ask is that you refer to the [code style guide](#code-style) when writing your code. +There's also other Video.js projects where you can help. (check the [video.js org](https://github.com/videojs) for an up-to-date list of projects) -# Getting started + * [Videojs.com](https://github.com/videojs/videojs.com) + * [Video.js flash player](https://github.com/videojs/video-js-swf) + * [Player skin designer](https://github.com/videojs/designer) + * [Contribflow](https://github.com/zencoder/contribflow) -1. [Download and install Node.js](http://nodejs.org/download/). Video.js uses Node for build and test automation. Node is available for Windows, Mac OS X, Linux, and SunOS, as well as source code, in case you want to build it yourself. +Filing issues +------------- +[GitHub Issues](https://github.com/videojs/video.js/issues) are used for all discussions around the codebase, including **bugs**, **features**, and other **enhancements**. -2. Fork the video.js git repository. At the top of every github page, there is a Fork button. Click it, and the forking process will copy Video.js into your organization. You can find more information on [Forking a Github repository](http://help.github.com/fork-a-repo/) here. - -3. Clone your copy of video.js to your local workstation. - - ```bash - # Clones your fork of the repo into the current directory in terminal - git clone https://github.com//video-js.git - # Navigate to the newly cloned directory - cd video-js - # Assigns the original repo to a remote called "upstream" - git remote add upstream https://github.com/zencoder/video-js.git - ``` - - In the future, if you want to pull in updates to video.js that happened after you cloned the main repo, you can run: - - ```bash - git checkout master - git pull upstream master - ``` - -4. Install the grunt-cli package so that you will have the correct version of grunt available for any project that needs it. This should be done as a global install: - - On Unix-based systems, you'll have to do this as a superuser: - ```bash - sudo npm install -g grunt-cli - ``` - On Windows, you can just run: - ```bash - npm install -g grunt-cli - ``` - -5. Install the contribflow package. This is a package from Zencoder that video.js developed to streamline the workflow for new features and hotfixes. - - On Unix-based systems, you'll have to do this as a superuser: - ```bash - sudo npm install -g contribflow - ``` - On Windows, you can just run: - ```bash - npm install -g contribflow - ``` - -6. Install required node.js modules using node package manager. - - You do not need to install these modules as a superuser, so for all platforms run: - ```bash - npm install - ``` - - A note to Windows developers: If you run npm commands, and you find that your command prompt colors have suddenly reversed, you can configure npm to set color to false to prevent this from happening. - ```bash - npm config set color false - ``` - Note that this change takes effect when a new command prompt window is opened; the current window will not be affected. -7. Build a local copy and run the current suite of tests. - - ```bash - grunt - ``` - To run the QUnit test suite, run: - ```bash - grunt test - ``` - -8. Depending on whether you're adding something new, making a change or fixing a bug, you'll want to do some up-front preparation. - 1. If you're fixing a bug, submit an issue for it. If you're fixing an existing bug, claim it by adding a comment to it. This will give a heads-up to anyone watching the issue that you're working on a fix. Please refer to the [Bugs](#bugs) section below for guidelines on filing new issues. - 2. Create a new branch for your work. - - If you're adding new functionality instead, you only need to create a new branch for your work. When you submit a Pull Request, Github automatically opens a new issue to track it. - - Since the issue filing process is described elsewhere, let's assume that you've filed or claimed the issue already. - - Next, create the branch. You'll use contrib to do this task. - - Run this command for new features: - ```bash - contrib feature start - ``` - - Run this command if you're fixing an issue: - ```bash - contrib hotfix start - ``` - - You will be prompted to name the branch. After that, contrib will create the branch locally, and use git to push it up to your origin, and track it. You're now ready to start building your feature or fixing that bug! - -9. Thoroughly test your feature or fix. If you're fixing a bug, we recommend in addition to testing the fix itself, to do some testing around the areas that your fix has touched. For example, a brief smoketest of the player never hurts. - -10. Commit and push your feature or hotfix locally. You'll use Git directly for these tasks. - - Be sure to reference your issue in any commit message. Github allows you to do this through the [fixes](https://github.com/blog/831-issues-2-0-the-next-generation) keyword. - - ```bash - My commit message. fixes issue#123 - Testing: - (briefly describe any testing here, for example, 'unit tests and cross-browser manual tests around playback and network interruption') - ``` -11. Use contrib to submit your [Pull Request](#pull-requests). - - First, checkout your feature or issue branch: - ```bash - git checkout (branchname) - ``` - - Next, submit your Pull Request, for your new feature: - ```bash - contrib feature submit - ``` - Or for your bug fix: - ```bash - contrib hotfix submit - ``` - - You'll be prompted for title and description for the Pull Request. After that, contrib will use Git to submit your Pull Request to video.js. - -12. You're Done! (except for cleanup.) To clean up your feature or hotfix branch: - - First, checkout your feature or issue branch: - ```bash - git checkout (branchname) - ``` - - Run this command to clean up your feature: - ```bash - contrib feature delete - ``` - - Run this command to clean up your bug fix: - ```bash - contrib hotfix delete - ``` - PLEASE NOTE: THIS WILL DELETE YOUR LOCAL AND REMOTE COPIES OF THE FEATURE. - This is meant to clean up your local and remote branches, so make sure any changes you don't want to lose have been pulled into the parent project or another branch first. - -# Bugs +### Reporting a Bug **A bug is a demonstrable problem** that is caused by the code in the repository. Good bug reports are extremely helpful. Thank You! Guidelines for bug reports: -1. Use the [GitHub issue search](https://github.com/zencoder/video-js/issues) — check if the issue has already been reported. +1. Use the [GitHub issue search](https://github.com/videojs/video.js/issues) — check if the issue has already been reported. -2. Check if the issue has been fixed — try to reproduce it using the latest `master` branch in the repository. +2. Check if the issue has already been fixed — try to reproduce it using the latest `master` branch in the repository. -3. Isolate the problem — ideally create a [reduced test case](http://css-tricks.com/6263-reduced-test-cases/) and a live example. +3. Isolate the problem — **create a [reduced test case](http://css-tricks.com/6263-reduced-test-cases/)** with a live example. You can possibly use [this JSBin example](http://jsbin.com/axedog/7/edit) as a starting point. A good bug report should be as detailed as possible, so that others won't have to follow up for the essential details. @@ -163,7 +36,7 @@ Here's an example: > Short yet concise Bug Summary > -> Description +> Description: > Happens on Windows 7 and OSX. Seen with IE9, Firefox 19 OSX, Chrome 21, Flash 11.6 and 11.2 > > 1. This is the first step @@ -183,17 +56,189 @@ Here's an example: > causing the bug, and potential solutions (and your opinions on their > merits). -**[File a bug report](https://github.com/zencoder/video-js/issues/new)** +**[File a bug report](https://github.com/videojs/video.js/issues/new)** + +### Requesting a Feature + +1. [Check the plugin list](https://github.com/videojs/video.js/wiki/Plugins) for any plugins that may already support the feature. + +2. [Search the issues](https://github.com/videojs/video.js/issues) for any previous requests for the same feature, and give a thumbs up or +1 on existing requests. + +2. If no previous requests exist, create a new issue. Please be as clear as possible about why the feautre is needed and the intended use case. + +**[Request a feature](https://github.com/videojs/video.js/issues/new)** + +Contributing code +----------------- + +To contibute code you'll need to be able to build a copy of Video.js and run tests locally. There are a few requirements before getting started. + +- Node.js -- Video.js uses Node for build and test automation. Node is available for Windows, Mac OS X, Linux, and SunOS, as well as source code if that doesn't scare you. [Download and install Node.js](http://nodejs.org/download/) -### NOTE: Testing Flash Locally in Chrome -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: +- grunt-cli -- Install grunt-cli globally so that you will have the correct version of grunt available for any project that needs it. -1. Do your development and testing using a local HTTP server. + On Unix-based systems, you'll have to do this as a superuser: + +```bash +sudo npm install -g grunt-cli +``` + On Windows, you can just run: + +```bash +npm install -g grunt-cli +``` + +- Contribflow -- A homegrown git workflow tool for managing feature/hotfix branches and submitting pull requests. If you have your own preferred git workflow, contribflow isn't required, but the following instructions will assume you're using it. + + On Unix-based systems, you'll have to do this as a superuser: + +```bash +sudo npm install -g contribflow +``` + + On Windows, you can just run: -2. [Disable the version of Flash included with Chrome](http://helpx.adobe.com/flash-player/kb/flash-player-google-chrome.html#How_can_I_run_debugger_or_alternate_versions_of_Flash_Player_in_Google_Chrome) and enable a system-wide version of Flash instead. +```bash +npm install -g contribflow +``` + +### Building your own copy of Video.js + +First, [fork](http://help.github.com/fork-a-repo/) the video.js git repository. At the top of every github page, there is a Fork button. Click it, and the forking process will copy Video.js into your own GitHub account. + +Clone your fork of the repo into your code directory + +```bash +git clone https://github.com//video.js.git +``` + +Navigate to the newly cloned directory + +```bash +cd video.js +``` + +Assign the original repo to a remote called "upstream" + +``` +git remote add upstream https://github.com/videojs/video.js.git +``` + +>In the future, if you want to pull in updates to video.js that happened after you cloned the main repo, you can run: +> +> ```bash +> git checkout master +> git pull upstream master +> ``` -# Code Style +Install the required node.js modules using node package manager + +```bash +npm install +``` + +> A note to Windows developers: If you run npm commands, and you find that your command prompt colors have suddenly reversed, you can configure npm to set color to false to prevent this from happening. +> `npm config set color false` +> Note that this change takes effect when a new command prompt window is opened; the current window will not be affected. + +Build a local copy of video.js and run tests + +```bash +grunt +grunt test +``` + +At this point you should have a built copy of video.js in a directory named `dist`, and all tests should be passing. + +### Making Changes + +Whether you're adding something new, making something better, or fixing a bug, you'll first want to search the [GitHub issues](https://github.com/videojs/video.js/issues) and [plugins list](https://github.com/videojs/video.js/wiki/Plugins) to make sure you're aware of any previous discussion or work. If an unclaimed issue exists, claim it via a comment. If no issue exists for your change, submit one, follwing the [issue filing guidelines](#filing-issues). + +There are two categories of changes in video.js land, features and hotfixes (Video.js follows a branching model similar to [gitflow](http://nvie.com/posts/a-successful-git-branching-model/)). Hotfixes are for urgent fixes that need to be released immediately as a patch. Features are for everything else (including non-urgent fixes). If you think you have a hotfix scenario, verify that (via comment) before starting the work. We'll focus on features here, but you can swap `hotfix` for `feature` in any command. + +Start a new development branch + +```bash +contrib feature start +``` + +You'll be prompted to name the branch. After that, contrib will create the branch locally, and use git to push it up to your origin, and track it. You're now ready to start building your feature or fixing that bug! Be sure to read the [Code Style Guide](#code-style-guide). + +While you're developing, you can ensure your changes are working by writing tests (in the `test` directory) and running `grunt test`. + +There's also a sandbox directory where you can add any file and it won't get tracked as a change. To start you can copy the example index file and see a working version of a player (using the local source code) by loading it in a browser. + +```bash +cp sandbox/index.html.example sandbox/index.html +open sandbox/index.html +``` + +> #### NOTE: Testing Flash Locally in Chrome +> 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: +> +> 1. Do your development and testing using a local HTTP server. +> +> 2. [Disable the version of Flash included with Chrome](http://helpx.adobe.com/flash-player/kb/flash-player-google-chrome.html#How_can_I_run_debugger_or_alternate_versions_of_Flash_Player_in_Google_Chrome) and enable a system-wide version of Flash instead. + + +Commit and push changes as you go (using git directly). Write thorough descriptions of your changes in your commit messages. + +```bash +git add . +git commit -av +git push +``` + +> GitHub allows you to close an issue through your commit message using the [fixes](https://github.com/blog/831-issues-2-0-the-next-generation) keyword. +> +> ```bash +> My commit message. fixes #123 +> Testing: (briefly describe any testing here, for example, 'unit tests and cross-browser manual tests around playback and network interruption') +> ``` + +### Submitting your changes + +First, thoroughly test your feature or fix, including writing tests to make sure your change doesn't get regressed in a future update. If you're fixing a bug, we recommend in addition to testing the fix itself, to do some testing around the areas that your fix has touched. For example, a brief smoketest of the player never hurts. + +Make sure your changes are pushed to origin + +```bash +git push +``` + +Use contrib to submit a a pull request (make sure you're in your feature branch) + +```bash +contrib feature submit +``` + +You'll be prompted for title and description for the Pull Request. After that, contrib will use Git to submit your pull request to video.js. + +You're Done! (except for cleanup.) To clean up your feature or hotfix branch: + +First, checkout your feature or issue branch: + +```bash +git checkout (branchname) +``` + +Run this command to clean up your feature: + +```bash +contrib feature delete +``` + +Run this command to clean up your bug fix: + +```bash +contrib hotfix delete +``` +> PLEASE NOTE: THIS WILL DELETE YOUR LOCAL AND REMOTE COPIES OF THE FEATURE. +> This is meant to clean up your local and remote branches, so make sure any changes you don't want to lose have been pulled into the parent project or another branch first. + +Code Style Guide +---------------- Please follow [Google's JavaScript Style Guide](http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml) to the letter. If your editor supports [.editorconfig](http://editorconfig.org/#download) it will make it easier to manage differences from your own coding style. ### Style examples include: @@ -206,11 +251,6 @@ Please follow [Google's JavaScript Style Guide](http://google-styleguide.googlec If you happen to find something in the codebase that does not follow the style guide, that's a good opportunity to make your first contribution! -# Other Video.js Pojects -* [Video.js SWF](https://github.com/zencoder/video-js-swf) - 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. - -* [Videojs.com](http://videojs.com) - The public site with helpful tools and information about Video.js. - --- ### Doc Credit This doc was inspired by some great contribution guide examples including [contribute.md template](https://github.com/contribute-md/contribute-md-template), diff --git a/README.md b/README.md index 0d502ef544..785c367a23 100644 --- a/README.md +++ b/README.md @@ -1,50 +1,18 @@ -# [Video.js - HTML5 and Flash Video Player](http://videojs.com) [![Build Status](https://travis-ci.org/zencoder/video-js.png?branch=master)](https://travis-ci.org/zencoder/video-js) +# [Video.js - HTML5 Video Player](http://videojs.com) [![Build Status](https://travis-ci.org/zencoder/video-js.png?branch=master)](https://travis-ci.org/zencoder/video-js) -Visit the main site at [videojs.com](http://videojs.com) for download options and instructions. +Video.js is a web video player built from the ground up for an HTML5 world. It supports HTML5 and Flash video, as well as YouTube and Vimeo (through [plugins](https://github.com/videojs/video.js/wiki/Plugins)). It supports video playback on desktops and mobile devices. This project was started mid 2010, and the player is now used on over 50,000 websites. -### PLEASE EXCUSE OUR DUST - -We're finishing up a big overhaul of the libary which includes - -* Closure compiler advanced mode support for drastically better minification over previous versions -* Flashy new automated builds and test using node.js and grunt - -Check out our [contributing guide](https://github.com/zencoder/video-js/blob/master/CONTRIBUTING.md) for info on building a local version. - -## About - -Video.js was built to provide a fast and easy way to embed and work with video in a web page. -It was built from the ground up with the assumption that HTML5 is the future of web video, however it supports Flash equally well for older browsers and for advanced features not yet supported in HTML5. - -Some of the focuses of Video.js are: - -- Universal browser and device support -- Fast player loading -- Easily skinned (themed/chromed) using just CSS -- A JavaScript API for controlling the video that works consistently across video platforms (HTML5, Flash, and soon other players like youtube) as well as devices - -## Getting Started - -Check out our [getting started guide](http://videojs.com/#section5). +Visit [videojs.com](http://videojs.com) for an overview, download options, and instructions on how to use the player on your site. ## Contributing +Video.js is a free and open source library, and we appreciate any help you're willing to give. Check out the [contributing guide](CONTRIBUTING.md). -Check out our [contributing guide](https://github.com/zencoder/video-js/blob/master/CONTRIBUTING.md). +## Building your own Video.js from source +To build your own custom version read the section on [contributing code](CONTRIBUTING.md#contributing-code) and ["Building your own copy"](CONTRIBUTING.md#building-your-own-copy-of-videojs) in the contributing guide. ## License -Copyright 2013 Brightcove, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +Video.js is licensed under the Apache License, Version 2.0. [View the license file](LICENSE) +Copyright 2013 Brightcove, Inc. diff --git a/VERSION.yml b/VERSION.yml deleted file mode 100644 index 7a7c5ae96b..0000000000 --- a/VERSION.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -major: 3 -minor: 2 -patch: 3 -pre: diff --git a/docs/setup.md b/docs/setup.md index a365decaff..0c6190150a 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -12,8 +12,8 @@ You can download the Video.js source and host it on your own servers, or use the ### CDN Version ### ```html - - + + ``` ### Self Hosted. ### From 9d424c61f47be8767629cb12b3dfe4fe3cb0dc40 Mon Sep 17 00:00:00 2001 From: Steve Heffernan Date: Thu, 18 Jul 2013 11:48:23 -0700 Subject: [PATCH 15/32] Fixed broken on-page link contribute-code -> contributing-code --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 69a0f52b6b..9496105e7e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,7 +3,7 @@ CONTRIBUTING So you want to help out? Great! There's a number of ways you can get involved. * [File and discuss issues](#filing-issues) - * [Contribute code](#contribute-code) + * [Contribute code](#contributing-code) * [Build and share plugins](docs/plugins.md) * [Answer questions on Stack Overflow](http://stackoverflow.com/questions/tagged/video.js) From a449cb043abc8d19f64d51bcce754e6bedaf347d Mon Sep 17 00:00:00 2001 From: Jeremy West Date: Thu, 18 Jul 2013 14:39:14 -0700 Subject: [PATCH 16/32] Close GH-614: added dispose event. fixes #613. --- src/js/component.js | 2 ++ src/js/player.js | 4 +++- test/unit/component.js | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/js/component.js b/src/js/component.js index 7cd2ba4372..f008db8c51 100644 --- a/src/js/component.js +++ b/src/js/component.js @@ -45,6 +45,8 @@ vjs.Component = vjs.CoreObject.extend({ * Dispose of the component and all child components. */ vjs.Component.prototype.dispose = function(){ + this.trigger('dispose'); + // Dispose all children. if (this.children_) { for (var i = this.children_.length - 1; i >= 0; i--) { diff --git a/src/js/player.js b/src/js/player.js index 07f853c723..57ae3448a8 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -86,7 +86,9 @@ vjs.Player = vjs.Component.extend({ vjs.Player.prototype.options_ = vjs.options; vjs.Player.prototype.dispose = function(){ - // this.isReady_ = false; + this.trigger('dispose'); + // prevent dispose from being called twice + this.off('dispose'); // Kill reference to this player vjs.players[this.id_] = null; diff --git a/test/unit/component.js b/test/unit/component.js index 4255ddd1b8..ef536805c2 100644 --- a/test/unit/component.js +++ b/test/unit/component.js @@ -82,8 +82,12 @@ test('should dispose of component and children', function(){ var data = vjs.getData(comp.el()); var id = comp.el()[vjs.expando]; + var hasDisposed = false; + comp.on('dispose', function(){ hasDisposed = true; }); + comp.dispose(); + ok(hasDisposed, 'component fired dispose event'); ok(!comp.children(), 'component children were deleted'); ok(!comp.el(), 'component element was deleted'); ok(!child.children(), 'child children were deleted'); From 5aa1ff59b3fd19eb8d62d0d9a05a575e6944a054 Mon Sep 17 00:00:00 2001 From: Steve Heffernan Date: Fri, 19 Jul 2013 10:47:30 -0700 Subject: [PATCH 17/32] Added block quote to readme. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 785c367a23..10b327b7a5 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # [Video.js - HTML5 Video Player](http://videojs.com) [![Build Status](https://travis-ci.org/zencoder/video-js.png?branch=master)](https://travis-ci.org/zencoder/video-js) -Video.js is a web video player built from the ground up for an HTML5 world. It supports HTML5 and Flash video, as well as YouTube and Vimeo (through [plugins](https://github.com/videojs/video.js/wiki/Plugins)). It supports video playback on desktops and mobile devices. This project was started mid 2010, and the player is now used on over 50,000 websites. +> Video.js is a web video player built from the ground up for an HTML5 world. It supports HTML5 and Flash video, as well as YouTube and Vimeo (through [plugins](https://github.com/videojs/video.js/wiki/Plugins)). It supports video playback on desktops and mobile devices. This project was started mid 2010, and the player is now used on over 50,000 websites. Visit [videojs.com](http://videojs.com) for an overview, download options, and instructions on how to use the player on your site. From 1eca8add85b829cde82da0b452a7aa78898002cc Mon Sep 17 00:00:00 2001 From: Steve Heffernan Date: Fri, 19 Jul 2013 20:18:39 -0700 Subject: [PATCH 18/32] Close GH-644: LESS for CSS. --- Gruntfile.js | 19 +- docs/skins.md | 12 +- package.json | 3 +- sandbox/index.html.example | 2 +- sandbox/plugin.html.example | 2 +- src/css/video-js.css | 726 ---------------------------- src/css/video-js.less | 908 ++++++++++++++++++++++++++++++++++++ test/index.html | 2 +- test/minified-api.html | 2 +- test/minified.html | 2 +- 10 files changed, 935 insertions(+), 743 deletions(-) delete mode 100644 src/css/video-js.css create mode 100644 src/css/video-js.less diff --git a/Gruntfile.js b/Gruntfile.js index bdc70c6764..dc93d3541a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -61,7 +61,7 @@ module.exports = function(grunt) { minified_api: ['test/minified-api.html'] }, watch: { - files: [ 'src/**/*.js', 'test/unit/*.js' ], + files: [ 'src/**/*', 'test/unit/*.js', 'Gruntfile.js' ], tasks: 'dev' }, copy: { @@ -111,6 +111,13 @@ module.exports = function(grunt) { dest: 'build/files/', ext: '.min.css' } + }, + less: { + dev: { + files: { + 'build/files/video-js.css': 'src/css/video-js.less' + } + } } }); @@ -120,14 +127,15 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-cssmin'); + grunt.loadNpmTasks('grunt-contrib-less'); grunt.loadNpmTasks('grunt-s3'); grunt.loadNpmTasks('contribflow'); // Default task. - grunt.registerTask('default', ['jshint', 'build', 'minify', 'dist']); + grunt.registerTask('default', ['jshint', 'less', 'build', 'minify', 'dist']); // Development watch task - grunt.registerTask('dev', ['jshint', 'build', 'qunit:source']); - grunt.registerTask('test', ['jshint', 'build', 'minify', 'qunit']); + grunt.registerTask('dev', ['jshint', 'less', 'build', 'qunit:source']); + grunt.registerTask('test', ['jshint', 'less', 'build', 'minify', 'qunit']); var fs = require('fs'), gzip = require('zlib').gzip; @@ -157,8 +165,7 @@ module.exports = function(grunt) { grunt.file.write('build/files/combined.video.js', combined); // Copy over other files - grunt.file.copy('src/css/video-js.css', 'build/files/video-js.css'); - grunt.file.copy('src/css/video-js.png', 'build/files/video-js.png'); + // grunt.file.copy('src/css/video-js.png', 'build/files/video-js.png'); grunt.file.copy('src/swf/video-js.swf', 'build/files/video-js.swf'); // Inject version number into css file diff --git a/docs/skins.md b/docs/skins.md index a6155af8bf..c64fcfbea4 100644 --- a/docs/skins.md +++ b/docs/skins.md @@ -1,21 +1,23 @@ Skins ===== -The default Video.js skin is made using HTML and CSS, so there's no need to learn a complicated skinning language to update colors or even create an entirely new skin. New in version 3.0 is the use of a sprites image file (video-js.png). The image allows for a little bit more classy design, as well as compatibility with older versions of IE now that the HTML skin also shows when Flash is used for those browsers. +The default Video.js skin is made using HTML and CSS, so there's no need to learn a complicated skinning language to update colors or even create an entirely new skin. -You can view the uncompressed CSS for the default skin by downloading the latest version of Video.js or viewing [the source version](https://github.com/videojs/video.js/blob/master/src/css/video-js.css) on Github. +New in version 4.0 is the use of font icons. All of the icons (play, pause, etc.) use the new custom font, which allows the icons to be scaled and colored just like any other text font. -You can either override styles in the default skin: +The easiest way to try this out is by using the [player skin designer](http://designer.videojs.com/). + +When you create a new skin, you can either override styles in the default skin: ```css .vjs-default-skin .vjs-play-progress { background: #900; } ``` -Or remove the 'vjs-default-skin' class from the video tag and create your own skin. +Or remove the 'vjs-default-skin' class from the video tag and create a new skin from scratch. ```html