Fix for scroll direction on volume (fixes #258)
This commit is contained in:
parent
552f448ccd
commit
521431e093
@ -1,5 +1,8 @@
|
||||
# Changelog
|
||||
|
||||
# v1.6.19
|
||||
- Fix for scroll direction issues on volume control (fixes #258)
|
||||
|
||||
# v1.6.18
|
||||
- Reduced rounding of seek value from 1 decimal point to 4 (fixes #242)
|
||||
|
||||
|
2
dist/plyr.css
vendored
2
dist/plyr.css
vendored
File diff suppressed because one or more lines are too long
4
dist/plyr.js
vendored
4
dist/plyr.js
vendored
File diff suppressed because one or more lines are too long
2
docs/dist/docs.css
vendored
2
docs/dist/docs.css
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "plyr",
|
||||
"version": "1.6.18",
|
||||
"version": "1.6.19",
|
||||
"description": "A simple, accessible and customizable HTML5, YouTube and Vimeo media player",
|
||||
"homepage": "http://plyr.io",
|
||||
"main": "src/js/plyr.js",
|
||||
|
10
readme.md
10
readme.md
@ -41,7 +41,7 @@ If you have any cool ideas or features, please let me know by [creating an issue
|
||||
## Implementation
|
||||
Check `docs/index.html` and `docs/src/js/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.18/plyr.js` to `https://cdn.plyr.io/1.6.18/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.19/plyr.js` to `https://cdn.plyr.io/1.6.19/plyr.js`
|
||||
|
||||
### npm
|
||||
|
||||
@ -72,11 +72,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.18/plyr.css">
|
||||
<script src="https://cdn.plyr.io/1.6.18/plyr.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.plyr.io/1.6.19/plyr.css">
|
||||
<script src="https://cdn.plyr.io/1.6.19/plyr.js"></script>
|
||||
```
|
||||
|
||||
The SVG sprite/defs file can be found here: `https://cdn.plyr.io/1.6.18/plyr.svg`.
|
||||
The SVG sprite/defs file can be found here: `https://cdn.plyr.io/1.6.19/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.
|
||||
@ -164,7 +164,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.18/plyr.js"></script>
|
||||
<script src="https://cdn.plyr.io/1.6.19/plyr.js"></script>
|
||||
<script>plyr.setup();</script>
|
||||
```
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// ==========================================================================
|
||||
// Plyr
|
||||
// plyr.js v1.6.18
|
||||
// plyr.js v1.6.19
|
||||
// https://github.com/selz/plyr
|
||||
// License: The MIT License (MIT)
|
||||
// ==========================================================================
|
||||
@ -44,7 +44,7 @@
|
||||
displayDuration: true,
|
||||
loadSprite: true,
|
||||
iconPrefix: 'plyr',
|
||||
iconUrl: 'https://cdn.plyr.io/1.6.18/plyr.svg',
|
||||
iconUrl: 'https://cdn.plyr.io/1.6.19/plyr.svg',
|
||||
clickToPlay: true,
|
||||
hideControls: true,
|
||||
showPosterOnEnd: false,
|
||||
@ -1439,8 +1439,6 @@
|
||||
_setAttributes(vimeo, {
|
||||
'src': 'https://player.vimeo.com/video/' + mediaId + '?player_id=' + id + '&api=1&badge=0&byline=0&portrait=0&title=0',
|
||||
'id': id,
|
||||
'webkitallowfullscreen': '',
|
||||
'mozallowfullscreen': '',
|
||||
'allowfullscreen': '',
|
||||
'frameborder': 0
|
||||
});
|
||||
@ -2843,15 +2841,29 @@
|
||||
_on(plyr.volume.input, 'wheel', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
// Scroll down to decrease
|
||||
// Detect "natural" scroll - suppored on OS X Safari only
|
||||
// Other browsers on OS X will be inverted until support improves
|
||||
var inverted = event.webkitDirectionInvertedFromDevice;
|
||||
|
||||
// Scroll down (or up on natural) to decrease
|
||||
if (event.deltaY < 0 || event.deltaX > 0) {
|
||||
if (inverted) {
|
||||
_decreaseVolume();
|
||||
}
|
||||
|
||||
// Scroll up to increase
|
||||
if (event.deltaY > 0 || event.deltaX < 0) {
|
||||
else {
|
||||
_increaseVolume();
|
||||
}
|
||||
}
|
||||
|
||||
// Scroll up (or down on natural) to increase
|
||||
if (event.deltaY > 0 || event.deltaX < 0) {
|
||||
if (inverted) {
|
||||
_increaseVolume();
|
||||
}
|
||||
else {
|
||||
_decreaseVolume();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -178,7 +178,6 @@
|
||||
padding-bottom: 56.25%; /* 16:9 */
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
border-radius: inherit;
|
||||
|
||||
iframe {
|
||||
position: absolute;
|
||||
|
Loading…
x
Reference in New Issue
Block a user