├── .editorconfig
├── .github
├── ISSUE_TEMPLATE.md
└── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── .npmignore
├── .nvmrc
├── .travis.yml
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── index.html
├── package-lock.json
├── package.json
├── scripts
├── karma.conf.js
└── rollup.config.js
├── src
└── plugin.js
└── test
└── 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 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ## Description
2 | Briefly describe the issue.
3 | Include a [reduced test case](https://css-tricks.com/reduced-test-cases/).
4 |
5 | ## Steps to reproduce
6 | Explain in detail the exact steps necessary to reproduce the issue.
7 |
8 | 1.
9 | 2.
10 | 3.
11 |
12 | ## Results
13 | ### Expected
14 | Please describe what you expected to see.
15 |
16 | ### Actual
17 | Please describe what actually happened.
18 |
19 | ### Error output
20 | If there are any errors at all, please include them here.
21 |
22 | ## Additional Information
23 | Please include any additional information necessary here. Including the following:
24 |
25 | ### versions
26 | #### videojs
27 | what version of videojs does this occur with?
28 |
29 | #### browsers
30 | what browser are affected?
31 |
32 | #### OSes
33 | what platforms (operating systems and devices) are affected?
34 |
35 | ### plugins
36 | are any videojs plugins being used on the page? If so, please list them below.
37 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ## Description
2 | Please describe the change as necessary.
3 | If it's a feature or enhancement please be as detailed as possible.
4 | If it's a bug fix, please link the issue that it fixes or describe the bug in as much detail.
5 |
6 | ## Specific Changes proposed
7 | Please list the specific changes involved in this pull request.
8 |
9 | ## Requirements Checklist
10 | - [ ] Feature implemented / Bug fixed
11 | - [ ] If necessary, more likely in a feature request than a bug fix
12 | - [ ] Unit Tests updated or fixed
13 | - [ ] Docs/guides updated
14 | - [ ] Reviewed by Two Core Contributors
15 |
--------------------------------------------------------------------------------
/.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 | # Build-related directories
29 | dist/
30 | docs/api/
31 | test/dist/
32 | .eslintcache
33 | .yo-rc.json
34 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/.nvmrc:
--------------------------------------------------------------------------------
1 | lts/*
2 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | dist: trusty
3 | language: node_js
4 | # node version is specified using the .nvmrc file
5 | before_install:
6 | - npm install -g greenkeeper-lockfile@1
7 | before_script:
8 | - export DISPLAY=:99.0
9 | - sh -e /etc/init.d/xvfb start
10 | - greenkeeper-lockfile-update
11 | after_script:
12 | - greenkeeper-lockfile-upload
13 | addons:
14 | firefox: latest
15 | chrome: stable
16 |
17 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 |
2 | ## [2.0.2](https://github.com/brightcove/videojs-contextmenu/compare/v2.0.1...v2.0.2) (2018-09-18)
3 |
4 | ### Chores
5 |
6 | * update README ([8c8a6b7](https://github.com/brightcove/videojs-contextmenu/commit/8c8a6b7))
7 |
8 |
9 | ## [2.0.1](https://github.com/brightcove/videojs-contextmenu/compare/v2.0.0...v2.0.1) (2018-09-18)
10 |
11 | ### Bug Fixes
12 |
13 | * export default the plugin, and fix vesion reported (#13) ([ea40cb5](https://github.com/brightcove/videojs-contextmenu/commit/ea40cb5)), closes [#13](https://github.com/brightcove/videojs-contextmenu/issues/13)
14 |
15 | ### Chores
16 |
17 | * update generator to v7.1.1 ([9bd830e](https://github.com/brightcove/videojs-contextmenu/commit/9bd830e))
18 | * Update Rollup to 0.50 (#7) ([e24c154](https://github.com/brightcove/videojs-contextmenu/commit/e24c154)), closes [#7](https://github.com/brightcove/videojs-contextmenu/issues/7)
19 | * Update to use plugin generator v7.0.2 ([ace580b](https://github.com/brightcove/videojs-contextmenu/commit/ace580b))
20 | * Update tooling with generator-videojs-plugin v5.2.0 (#8) ([b67db1b](https://github.com/brightcove/videojs-contextmenu/commit/b67db1b)), closes [#8](https://github.com/brightcove/videojs-contextmenu/issues/8)
21 | * Update using generator v7.2.4 (#12) ([eb8d393](https://github.com/brightcove/videojs-contextmenu/commit/eb8d393)), closes [#12](https://github.com/brightcove/videojs-contextmenu/issues/12)
22 |
23 | ### Documentation
24 |
25 | * Update README for archival of project. ([358082f](https://github.com/brightcove/videojs-contextmenu/commit/358082f))
26 |
27 |
28 | # 2.0.0 (2017-05-19)
29 |
30 | ### Chores
31 |
32 | * Update tooling using generator v5 prerelease. (#6) ([f2d587b](https://github.com/brightcove/videojs-contextmenu/commit/f2d587b))
33 |
34 | ### BREAKING CHANGES
35 |
36 | * Remove Bower support.
37 |
38 | ## 1.2.2 (2017-02-08)
39 | * Get rid of deprecation warnings for video.js 6 and update Travis builds
40 |
41 | ## 1.2.1 (2017-01-26)
42 | * video.js 5/6 cross compatibility
43 |
44 | ## 1.2.0 (2016-12-20)
45 | * [@bcvio](https://github.com/bcvio) Add option to disable/enable firing `vjs-contextmenu` ([#2](https://github.com/brightcove/videojs-contextmenu/pull/2))
46 |
47 | ## 1.1.0 (2016-07-19)
48 | * Include positioning properties in the synthetic "vjs-contextmenu" event
49 |
50 | ## 1.0.1 (2016-07-18)
51 | * Properly deal with multiple invocations
52 |
53 | ## 1.0.0 (2016-07-11)
54 | * Initial release
55 |
56 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # CONTRIBUTING
2 |
3 | We welcome contributions from everyone!
4 |
5 | ## Getting Started
6 |
7 | Make sure you have Node.js 4.8 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 conventions][conventions] 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 | [conventions]: https://github.com/videojs/generator-videojs-plugin/blob/master/docs/conventions.md
31 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright Brightcove, Inc.
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 | # videojs-contextmenu
2 |
3 | **DEPRECATED Please use https://github.com/brightcove/videojs-contextmenu-ui**
4 |
5 | [](https://travis-ci.org/brightcove/videojs-contextmenu)
6 | [](https://greenkeeper.io/)
7 | [](http://slack.videojs.com)
8 |
9 | [](https://nodei.co/npm/videojs-contextmenu/)
10 |
11 | A cross-device context menu implementation for video.js players.
12 |
13 | Most desktop browsers support the [DOM standard `contextmenu` event][contextmenu], but some mobile browsers, lacking a right mouse button, do not. This plugin will fire a custom `vjs-contextmenu` event when it sees a `contextmenu` event _or_ after a long touch.
14 |
15 | For purposes of this plugin, a **long touch** is defined as a single touch which is held for a customizable number of milliseconds. In the intervening time, the touch must not move except within a customizable sensitivity range.
16 |
17 | Maintenance Status: **Archived/Unmaintained**
18 |
19 |
20 |
21 |
22 |
23 | - [Installation](#installation)
24 | - [Usage](#usage)
25 | - [Options](#options)
26 | - [`cancel`](#cancel)
27 | - [`sensitivity`](#sensitivity)
28 | - [`wait`](#wait)
29 | - [`disabled`](#disabled)
30 | - [Inclusion](#inclusion)
31 | - [`
108 |
109 |
114 | ```
115 |
116 | ### Browserify
117 |
118 | When using with Browserify, install videojs-contextmenu via npm and `require` the plugin as you would any other module.
119 |
120 | ```js
121 | var videojs = require('video.js');
122 |
123 | // The actual plugin function is exported by this module, but it is also
124 | // attached to the `Player.prototype`; so, there is no need to assign it
125 | // to a variable.
126 | require('videojs-contextmenu');
127 |
128 | var player = videojs('my-video');
129 |
130 | player.contextmenu();
131 | ```
132 |
133 | ### RequireJS/AMD
134 |
135 | When using with RequireJS (or another AMD library), get the script in whatever way you prefer and `require` the plugin as you normally would:
136 |
137 | ```js
138 | require(['video.js', 'videojs-contextmenu'], function(videojs) {
139 | var player = videojs('my-video');
140 |
141 | player.contextmenu();
142 | });
143 | ```
144 |
145 | ## License
146 |
147 | Apache-2.0. Copyright (c) Brightcove, Inc.
148 |
149 |
150 | [contextmenu]: https://developer.mozilla.org/en-US/docs/Web/Events/contextmenu
151 | [ui]: https://github.com/brightcove/videojs-contextmenu-ui
152 | [videojs]: http://videojs.com/
153 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |