Minor bug fixes
This commit is contained in:
parent
3b69f47590
commit
a316514ca1
@ -1,5 +1,10 @@
|
||||
# Changelog
|
||||
|
||||
## v1.6.3
|
||||
- Seek back to 0 for all media on ended
|
||||
- Check for HTML5 video on ended reload
|
||||
- Update to docs for `showPosterOnEnd` option
|
||||
|
||||
## v1.6.2
|
||||
- Fix for tooltip displaying when duration is not set (fixes #177)
|
||||
- `showPosterOnEnd` option to show poster when HTML5 video ended (fixes #59)
|
||||
|
2
dist/plyr.js
vendored
2
dist/plyr.js
vendored
File diff suppressed because one or more lines are too long
@ -214,7 +214,7 @@ options = {
|
||||
|
||||
// If aws is setup
|
||||
if("cdn" in aws) {
|
||||
var regex = "(\\d+\\.)?(\\d+\\.)?(\\*|\\d+)",
|
||||
var regex = "(?:0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[\\da-z\\-]+(?:\.[\\da-z\\-]+)*)?(?:\\+[\\da-z\\-]+(?:\.[\\da-z\\-]+)*)?",
|
||||
cdnpath = new RegExp(aws.cdn.bucket + "\/" + regex, "gi"),
|
||||
semver = new RegExp("v" + regex, "gi"),
|
||||
localpath = new RegExp("(\.\.\/)?dist", "gi");
|
||||
|
18
readme.md
18
readme.md
@ -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.2/plyr.js` to `https://cdn.plyr.io/1.6.2/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.3/plyr.js` to `https://cdn.plyr.io/1.6.3/plyr.js`
|
||||
|
||||
### Node Package Manager (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.2/plyr.css">
|
||||
<script src="https://cdn.plyr.io/1.6.2/plyr.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.plyr.io/1.6.3/plyr.css">
|
||||
<script src="https://cdn.plyr.io/1.6.3/plyr.js"></script>
|
||||
```
|
||||
|
||||
You can also access the `sprite.svg` file at `https://cdn.plyr.io/1.6.2/sprite.svg`.
|
||||
You can also access the `sprite.svg` file at `https://cdn.plyr.io/1.6.3/sprite.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.
|
||||
@ -113,7 +113,7 @@ Using AJAX means you can load the sprite from a different origin. Avoiding the i
|
||||
c.innerHTML = a.responseText;
|
||||
b.insertBefore(c, b.childNodes[0]);
|
||||
};
|
||||
})(document, 'https://cdn.plyr.io/1.6.2/sprite.svg');
|
||||
})(document, 'https://cdn.plyr.io/1.6.3/sprite.svg');
|
||||
</script>
|
||||
```
|
||||
|
||||
@ -188,7 +188,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.2/plyr.js"></script>
|
||||
<script src="https://cdn.plyr.io/1.6.3/plyr.js"></script>
|
||||
<script>plyr.setup();</script>
|
||||
```
|
||||
|
||||
@ -305,6 +305,12 @@ Options must be passed as an object to the `setup()` method as above or as JSON
|
||||
<td><code>true</code></td>
|
||||
<td>Hide video controls automatically after 2s of no mouse or focus movement, on control element blur (tab out), on playback start or entering fullscreen. As soon as the mouse is moved, a control element is focused or playback is paused, the controls reappear instantly.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>showPosterOnEnd</code></td>
|
||||
<td>Boolean</td>
|
||||
<td><code>false</code></td>
|
||||
<td>This will restore and *reload* HTML5 video once playback is complete. Note: depending on the browser caching, this may result in the video downloading again (or parts of it). Use with caution.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>tooltips</code></td>
|
||||
<td>Object</td>
|
||||
|
@ -1,6 +1,6 @@
|
||||
// ==========================================================================
|
||||
// Plyr
|
||||
// plyr.js v1.6.2
|
||||
// plyr.js v1.6.3
|
||||
// https://github.com/selz/plyr
|
||||
// License: The MIT License (MIT)
|
||||
// ==========================================================================
|
||||
@ -2765,11 +2765,14 @@
|
||||
// Reset UI
|
||||
_checkPlaying();
|
||||
|
||||
// Show poster on end
|
||||
if(config.showPosterOnEnd) {
|
||||
// Seek to 0
|
||||
_seek(0);
|
||||
// Seek to 0
|
||||
_seek(0);
|
||||
|
||||
// Reset duration display
|
||||
_displayDuration();
|
||||
|
||||
// Show poster on end
|
||||
if(plyr.type === 'video' && config.showPosterOnEnd) {
|
||||
// Re-load media
|
||||
plyr.media.load();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user