├── .editorconfig
├── .gitignore
├── .npmignore
├── .travis.yml
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── index.html
├── package.json
├── scripts
├── banner.ejs
└── server.js
├── src
└── plugin.js
└── test
├── index.html
├── karma
├── chrome.js
├── common.js
├── detected.js
├── firefox.js
├── ie.js
└── safari.js
└── plugin.test.js
/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | end_of_line = lf
7 | indent_style = space
8 | indent_size = 2
9 | insert_final_newline = true
10 | trim_trailing_whitespace = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # OS
2 | Thumbs.db
3 | ehthumbs.db
4 | Desktop.ini
5 | .DS_Store
6 | ._*
7 |
8 | # Editors
9 | *~
10 | *.swp
11 | *.tmproj
12 | *.tmproject
13 | *.sublime-*
14 | .idea/
15 | .project/
16 | .settings/
17 | .vscode/
18 |
19 | # Logs
20 | logs
21 | *.log
22 | npm-debug.log*
23 |
24 | # Dependency directories
25 | bower_components/
26 | node_modules/
27 |
28 | # Yeoman meta-data
29 | .yo-rc.json
30 |
31 | # Build-related directories
32 | dist/
33 | dist-test/
34 | docs/api/
35 | es5/
36 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | !dist/
2 | !dist-test/
3 | !docs/
4 | !es5/
5 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | language: node_js
3 | node_js:
4 | - 'node'
5 | - '4.2'
6 | - '0.12'
7 | - '0.10'
8 |
9 | # Set up a virtual screen for Firefox.
10 | before_script:
11 | - export DISPLAY=:99.0
12 | - sh -e /etc/init.d/xvfb start
13 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # CHANGELOG
2 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # CONTRIBUTING
2 |
3 | ### Table of Contents
4 |
5 |
6 |
7 |
8 |
9 | - [Getting Started](#getting-started)
10 | - [Running Tests](#running-tests)
11 | - [Tag and Release](#tag-and-release)
12 | - [License](#license)
13 |
14 |
15 |
16 | ## Getting Started
17 |
18 | 1. Clone this repository!
19 | 1. Install dependencies: `npm install`
20 | 1. Run a development server: `npm start`
21 |
22 | That's it! Refer to the [video.js plugin standards](https://github.com/videojs/generator-videojs-plugin/docs/standards.md) for more detail.
23 |
24 | ### Running Tests
25 |
26 | - In all available and supported browsers: `npm test`
27 | - In a specific browser: `npm run test:chrome`, `npm run test:firefox`, etc.
28 | - While development server is running, navigate to [`http://localhost:9999/test/`](http://localhost:9999/test/) (_note:_ port may vary, check console output)
29 |
30 | ### Tag and Release
31 |
32 | 1. Make sure everything is committed.
33 | 1. `npm version *` where `*` is `major`, `minor`, `patch`, etc. [Read more about versioning.](https://github.com/videojs/generator-videojs-plugin/blob/master/docs/standards.md)
34 | 1. `npm publish`
35 |
36 | ## License
37 |
38 | MIT and Apache-2.0. Copyright (c) Derk-Jan Hartman
39 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2015 Derk-Jan Hartman
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | SOFTWARE.
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # videojs-responsive-layout
2 |
3 | [](https://www.npmjs.com/package/videojs-responsive-layout) [](https://www.versioneye.com/nodejs/videojs-responsive-layout)
4 |
5 | A plugin that reacts to the width of your player to change the layout of your Video.js player.
6 |
7 | This plugin changes the layout of the controlbar of your Video.js player, based on the width of the player. When it has calculated that not all controls will fit inside the player, it applies one of 3 different layout classes, which are provided by the default skin of Video.js.
8 | ```
9 | * vjs-layout-tiny
10 | * vjs-layout-x-small
11 | * vjs-layout-small
12 | ```
13 |
14 | ## Getting started
15 | Simply install from npm, using `npm install videojs-responsive-layout`.
16 | Now add the `dist/videojs-responsive-layout.js` or `dist/videojs-responsive-layout.min.js` to your page and make sure it loads after the main `videojs` javascript.
17 |
18 | Now configure it like:
19 | ```javascript
20 | var player = videojs( 'really-cool-video',
21 | {
22 | controlBar: {
23 | volumeMenuButton: {
24 | inline: false
25 | }
26 | },
27 | plugins: {
28 | responsiveLayout: {}
29 | }
30 | },
31 | function() {
32 | console.log('Good to go!');
33 | this.play();
34 | }
35 | );
36 | ```
37 | The `inline:false` option is important, because the plugin cannot deal with an inline and horizontal volume control at this time.
38 |
39 |
40 | ## Advanced options
41 | Will follow soon...
42 |
43 | ## Contributing
44 | I really appreciate any help in maintaining and advancing this library. Check out the [contributing guide](CONTRIBUTING.md).
45 |
46 | ## License
47 |
48 | MIT and Apache-2.0.
49 | Copyright (c) Derk-Jan Hartman
50 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |