Added disableContextMenu option to hide the right click context menu (fixes #248 and #225)

This commit is contained in:
Sam
2016-05-26 22:32:18 +01:00
parent 351e1540c5
commit c0909095e3
5 changed files with 46 additions and 31 deletions

View File

@ -40,7 +40,7 @@ If you have any cool ideas or features, please let me know by [creating an issue
## Implementation
Check `docs/index.html` and `docs/dist/docs.js` for an example setup.
**Heads up:** the example `index.html` file needs to be served from a webserver (such as Apache, Nginx, IIS or similar) unless you change the file sources to include http or https. e.g. change `//cdn.plyr.io/1.6.16/plyr.js` to `https://cdn.plyr.io/1.6.16/plyr.js`
**Heads up:** the example `index.html` file needs to be served from a webserver (such as Apache, Nginx, IIS or similar) unless you change the file sources to include http or https. e.g. change `//cdn.plyr.io/1.6.17/plyr.js` to `https://cdn.plyr.io/1.6.17/plyr.js`
### npm
@ -71,11 +71,11 @@ More info is on [npm](https://www.npmjs.com/package/ember-cli-plyr) and [GitHub]
If you want to use our CDN, you can use the following:
```html
<link rel="stylesheet" href="https://cdn.plyr.io/1.6.16/plyr.css">
<script src="https://cdn.plyr.io/1.6.16/plyr.js"></script>
<link rel="stylesheet" href="https://cdn.plyr.io/1.6.17/plyr.css">
<script src="https://cdn.plyr.io/1.6.17/plyr.js"></script>
```
The SVG sprite/defs file can be found here: `https://cdn.plyr.io/1.6.16/plyr.svg`.
The SVG sprite/defs file can be found here: `https://cdn.plyr.io/1.6.17/plyr.svg`.
### CSS & Styling
If you want to use the default css, add the `plyr.css` file from `/dist` into your head, or even better use `plyr.less` or `plyr.scss` file included in `/src` in your build to save a request.
@ -163,7 +163,7 @@ Be sure to [validate your caption files](https://quuz.org/webvtt/)
Here's an example of a default setup:
```html
<script src="https://cdn.plyr.io/1.6.16/plyr.js"></script>
<script src="https://cdn.plyr.io/1.6.17/plyr.js"></script>
<script>plyr.setup();</script>
```
@ -280,6 +280,12 @@ Options must be passed as an object to the `setup()` method as above or as JSON
<td><code>true</code></td>
<td>Click (or tap) of the video container will toggle pause/play.</td>
</tr>
<tr>
<td><code>disableContextMenu</code></td>
<td>Boolean</td>
<td><code>true</code></td>
<td>Disable right click menu on video to <em>help</em> as very primitive obfuscation to prevent downloads of content.</td>
</tr>
<tr>
<td><code>hideControls</code></td>
<td>Boolean</td>