Seek rounding from 1 to 4 decimal places (fixes #242)

This commit is contained in:
Sam 2016-05-30 07:41:17 +01:00
parent cb318dd6ad
commit 552f448ccd
6 changed files with 15 additions and 12 deletions

View File

@ -1,5 +1,8 @@
# Changelog # Changelog
# v1.6.18
- Reduced rounding of seek value from 1 decimal point to 4 (fixes #242)
# v1.6.17 # v1.6.17
- Added `disableContextMenu` option to hide the right click context menu (fixes #248 and #225) - Added `disableContextMenu` option to hide the right click context menu (fixes #248 and #225)

4
dist/plyr.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"name": "plyr", "name": "plyr",
"version": "1.6.17", "version": "1.6.18",
"description": "A simple, accessible and customizable HTML5, YouTube and Vimeo media player", "description": "A simple, accessible and customizable HTML5, YouTube and Vimeo media player",
"homepage": "http://plyr.io", "homepage": "http://plyr.io",
"main": "src/js/plyr.js", "main": "src/js/plyr.js",

View File

@ -41,7 +41,7 @@ If you have any cool ideas or features, please let me know by [creating an issue
## Implementation ## Implementation
Check `docs/index.html` and `docs/src/js/docs.js` for an example setup. 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.17/plyr.js` to `https://cdn.plyr.io/1.6.17/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.18/plyr.js` to `https://cdn.plyr.io/1.6.18/plyr.js`
### npm ### 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: If you want to use our CDN, you can use the following:
```html ```html
<link rel="stylesheet" href="https://cdn.plyr.io/1.6.17/plyr.css"> <link rel="stylesheet" href="https://cdn.plyr.io/1.6.18/plyr.css">
<script src="https://cdn.plyr.io/1.6.17/plyr.js"></script> <script src="https://cdn.plyr.io/1.6.18/plyr.js"></script>
``` ```
The SVG sprite/defs file can be found here: `https://cdn.plyr.io/1.6.17/plyr.svg`. The SVG sprite/defs file can be found here: `https://cdn.plyr.io/1.6.18/plyr.svg`.
### CSS & Styling ### 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. 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: Here's an example of a default setup:
```html ```html
<script src="https://cdn.plyr.io/1.6.17/plyr.js"></script> <script src="https://cdn.plyr.io/1.6.18/plyr.js"></script>
<script>plyr.setup();</script> <script>plyr.setup();</script>
``` ```

View File

@ -1,6 +1,6 @@
// ========================================================================== // ==========================================================================
// Plyr // Plyr
// plyr.js v1.6.17 // plyr.js v1.6.18
// https://github.com/selz/plyr // https://github.com/selz/plyr
// License: The MIT License (MIT) // License: The MIT License (MIT)
// ========================================================================== // ==========================================================================
@ -44,7 +44,7 @@
displayDuration: true, displayDuration: true,
loadSprite: true, loadSprite: true,
iconPrefix: 'plyr', iconPrefix: 'plyr',
iconUrl: 'https://cdn.plyr.io/1.6.17/plyr.svg', iconUrl: 'https://cdn.plyr.io/1.6.18/plyr.svg',
clickToPlay: true, clickToPlay: true,
hideControls: true, hideControls: true,
showPosterOnEnd: false, showPosterOnEnd: false,
@ -1890,7 +1890,7 @@
// Set the current time // Set the current time
// Try/catch incase the media isn't set and we're calling seek() from source() and IE moans // Try/catch incase the media isn't set and we're calling seek() from source() and IE moans
try { try {
plyr.media.currentTime = targetTime.toFixed(1); plyr.media.currentTime = targetTime.toFixed(4);
} }
catch(e) {} catch(e) {}