├── .editorconfig
├── .gitignore
├── .npmignore
├── .travis.yml
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── bower.json
├── index.html
├── package.json
├── scripts
├── banner.ejs
├── build-test.js
├── postversion.js
├── server.js
└── version.js
├── src
├── plugin.js
└── plugin.scss
└── test
├── index.html
├── karma.conf.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 | docs/api/
34 | es5/
35 | test/dist/
36 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | # Intentionally left blank, so that npm does not ignore anything by default,
2 | # but relies on the package.json "files" array to explicitly define what ends
3 | # up in the package.
4 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | dist: trusty
3 | language: node_js
4 | node_js:
5 | - 'node'
6 | - 'lts/argon'
7 |
8 | before_script:
9 | # Check if the current version is equal to the major version for the env.
10 | - 'export IS_INSTALLED="$(npm list video.js | grep "video.js@$VJS")"'
11 | # We have to add semicolons to the end of each line in the if as Travis runs
12 | # this all on one line.
13 | - 'if [ -z "$IS_INSTALLED" ]; then
14 | echo "INSTALLING video.js@>=$VJS.0.0-RC.0 <$(($VJS+1)).0.0";
15 | npm i "video.js@>=$VJS.0.0-RC.0 <\$(($VJS+1)).0.0";
16 | else
17 | echo "video.js@$VJS ALREADY INSTALLED";
18 | fi'
19 | - export CHROME_BIN=/usr/bin/google-chrome
20 | - export DISPLAY=:99.0
21 | - sh -e /etc/init.d/xvfb start
22 |
23 | env:
24 | - VJS=5
25 | - VJS=6
26 |
27 | addons:
28 | firefox: latest
29 | apt:
30 | sources:
31 | - google-chrome
32 | packages:
33 | - google-chrome-stable
34 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | CHANGELOG
2 | =========
3 |
4 | ## HEAD (Unreleased)
5 | _(none)_
6 |
7 | --------------------
8 |
9 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # CONTRIBUTING
2 |
3 | We welcome contributions from everyone!
4 |
5 | ## Getting Started
6 |
7 | Make sure you have NodeJS 0.10 or higher and npm installed.
8 |
9 | 1. Fork this repository and clone your fork
10 | 1. Install dependencies: `npm install`
11 | 1. Run a development server: `npm start`
12 |
13 | ### Making Changes
14 |
15 | Refer to the [video.js plugin standards][standards] for more detail on best practices and tooling for video.js plugin authorship.
16 |
17 | When you've made your changes, push your commit(s) to your fork and issue a pull request against the original repository.
18 |
19 | ### Running Tests
20 |
21 | Testing is a crucial part of any software project. For all but the most trivial changes (typos, etc) test cases are expected. Tests are run in actual browsers using [Karma][karma].
22 |
23 | - In all available and supported browsers: `npm test`
24 | - In a specific browser: `npm run test:chrome`, `npm run test:firefox`, etc.
25 | - While development server is running (`npm start`), navigate to [`http://localhost:9999/test/`][local]
26 |
27 |
28 | [karma]: http://karma-runner.github.io/
29 | [local]: http://localhost:9999/test/
30 | [standards]: https://github.com/videojs/generator-videojs-plugin/docs/standards.md
31 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2016 Dotsub <dev@dotsub.com>
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | **THIS REPORITOTY IS NOT MAINTAINED ANYMORE!** If you are interested in maintaining it, please write to dev@dotsub.com.
2 |
3 | [](https://travis-ci.org/dotsub/videojs-watermark) [](https://badge.fury.io/js/videojs-watermark)
4 |
5 | # videojs-watermark
6 |
7 | Adds a watermark image the video player. After the initial 'fadeTime' the watermark will be shown when the video players controls are shown. This also provides the ability to use the watermark as a link.
8 |
9 | 
10 |
11 | ## Installation
12 |
13 | ```sh
14 | npm install --save videojs-watermark
15 | ```
16 |
17 | ## Configuration
18 |
19 | **image: Required** The URL to the image to be used as the watermark.
20 |
21 | **position:** The location to place the watermark (top-left, top-right, bottom-left, bottom-right). Defaults to 'top-right'.
22 |
23 | **fadeTime:** The amount of time in milliseconds for the initial watermark fade. Defaults to 3000. To make watermark permanently visible, use `null`.
24 |
25 | **url:** A url to be linked to from the watermark. If the user clicks the watermark the video will be paused and the link will open in a new window.
26 |
27 | ## Usage
28 |
29 | To include videojs-watermark on your website or web application, use any of the following methods.
30 |
31 | ### `
37 |
38 |
43 | ```
44 |
45 | ### Browserify
46 |
47 | When using with Browserify, install videojs-watermark via npm and `require` the plugin as you would any other module.
48 |
49 | ```js
50 | var videojs = require('video.js');
51 |
52 | // The actual plugin function is exported by this module, but it is also
53 | // attached to the `Player.prototype`; so, there is no need to assign it
54 | // to a variable.
55 | require('videojs-watermark');
56 |
57 | var player = videojs('my-video');
58 |
59 | player.watermark();
60 | ```
61 |
62 | ### Browserify ES6
63 |
64 | When using with Browserify, install videojs-watermark via npm and `import` the plugin as you would any other module.
65 |
66 | ```js
67 | import videojs from 'video.js';
68 |
69 | // The actual plugin function is exported by this module, but it is also
70 | // attached to the `Player.prototype`; so, there is no need to assign it
71 | // to a variable.
72 | import 'videojs-watermark';
73 |
74 | const player = videojs('my-video');
75 | player.watermark();
76 | ```
77 |
78 | ### RequireJS/AMD
79 |
80 | When using with RequireJS (or another AMD library), get the script in whatever way you prefer and `require` the plugin as you normally would:
81 |
82 | ```js
83 | require(['video.js', 'videojs-watermark'], function(videojs) {
84 | var player = videojs('my-video');
85 |
86 | player.watermark();
87 | });
88 | ```
89 |
90 | ## License
91 |
92 | Apache-2.0. Copyright (c) Dotsub <dev@dotsub.com>
93 |
94 |
95 | [videojs]: http://videojs.com/
96 |
--------------------------------------------------------------------------------
/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "author": "Brooks Lyrette ",
3 | "homepage": "https://github.com/dotsub/videojs-watermark",
4 | "keywords": [
5 | "videojs",
6 | "videojs-plugin",
7 | "watermark"
8 | ],
9 | "license": "Apache-2.0",
10 | "main": [
11 | "src/plugin.js",
12 | "src/plugin.scss"
13 | ],
14 | "moduleType": "es6",
15 | "name": "videojs-watermark",
16 | "version": "1.0.0"
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | videojs-watermark Demo
6 |
7 |
8 |
9 |
10 |
14 |