Small bug fixes

This commit is contained in:
Sam Potts 2016-01-21 09:43:27 +11:00
parent 84a1b03d7d
commit 76917751e3
8 changed files with 26 additions and 14 deletions

View File

@ -1,5 +1,10 @@
# Changelog
## v1.5.5
- Fixed controls.md example
- Bug fix for docs error page
- Bug fix for controls tooltips
## v1.5.4
- Minor bug fix for clicking video to play/pause after source change

View File

@ -79,17 +79,17 @@ This is an example `html` option with all controls.
"<span class='plyr__sr-only'>Forward {seektime} secs</span>",
"</button>",
"<span class='plyr__time'>",
"<span class='sr-only'>Current time</span>",
"<span class='plyr__sr-only'>Current time</span>",
"<span class='plyr__current-time'>00:00</span>",
"</span>",
"<span class='plyr__time'>",
"<span class='sr-only'>Duration</span>",
"<span class='plyr__sr-only'>Duration</span>",
"<span class='plyr__duration'>00:00</span>",
"</span>",
"</span>",
"<span class='plyr__controls--right'>",
"<button type='button' data-plyr='mute'>",
"<svg class='icon-muted'><use xlink:href='#icon-muted'></use></svg>",
"<svg class='icon--muted'><use xlink:href='#icon-muted'></use></svg>",
"<svg><use xlink:href='#icon-volume'></use></svg>",
"<span class='plyr__sr-only'>Toggle Mute</span>",
"</button>",

4
dist/plyr.js vendored

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,7 @@
<main>
<h1>Doh.</h1>
<p>Looks like something went wrong.</p>
<a href="http://plyr.io" class="btn">Back to plyr.io</a>
<a href="http://plyr.io" class="btn btn--primary">Back to plyr.io</a>
</main>
</body>
</html>

View File

@ -253,6 +253,7 @@ gulp.task("docs", function () {
// Upload error.html to cdn (as well as docs site)
gulp.src([paths.docs.root + "error.html"])
.pipe(replace(localpath, "https://" + aws.cdn.bucket + "/" + version))
.pipe(gzip())
.pipe(s3(aws.cdn, options.docs));
});

View File

@ -1,6 +1,6 @@
{
"name": "plyr",
"version": "1.5.4",
"version": "1.5.5",
"description": "A simple HTML5 media player using custom controls",
"homepage": "http://plyr.io",
"main": "gulpfile.js",

View File

@ -40,7 +40,7 @@ If you have any cool ideas or features, please let me know by [creating an issue
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.5.4/plyr.js` to `https://cdn.plyr.io/1.5.4/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.5.5/plyr.js` to `https://cdn.plyr.io/1.5.5/plyr.js`
### Bower
If bower is your thang, you can grab Plyr using:
@ -60,11 +60,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.5.4/plyr.css">
<script src="https://cdn.plyr.io/1.5.4/plyr.js"></script>
<link rel="stylesheet" href="https://cdn.plyr.io/1.5.5/plyr.css">
<script src="https://cdn.plyr.io/1.5.5/plyr.js"></script>
```
You can also access the `sprite.svg` file at `https://cdn.plyr.io/1.5.4/sprite.svg`.
You can also access the `sprite.svg` file at `https://cdn.plyr.io/1.5.5/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.sass` file included in `/src` in your build to save a request.
@ -162,7 +162,7 @@ More info on CORS here:
Here's an example of a default setup:
```html
<script src="https://cdn.plyr.io/1.5.4/plyr.js"></script>
<script src="https://cdn.plyr.io/1.5.5/plyr.js"></script>
<script>plyr.setup();</script>
```

View File

@ -46,7 +46,7 @@
container: null,
wrapper: '.plyr__controls'
},
labels: '[data-plyr] .sr-only, label .sr-only',
labels: '[data-plyr]',
buttons: {
seek: '[data-plyr="seek"]',
play: '[data-plyr="play"]',
@ -787,6 +787,9 @@
else {
plyr.captionsContainer.innerHTML = '';
}
// Force redraw
// var redraw = plyr.captionsContainer.offsetHeight;
}
// Display captions container and button (for initialization)
@ -929,7 +932,7 @@
// Setup tooltips
if (config.tooltips) {
var labels = _getElements(config.selectors.labels);
var labels = _getElements(config.selectors.labels + ' .' + config.classes.hidden);
for (var i = labels.length - 1; i >= 0; i--) {
var label = labels[i];
@ -1472,6 +1475,9 @@
// Display a cue, if there is one
if (this.activeCues[0] && this.activeCues[0].hasOwnProperty('text')) {
plyr.captionsContainer.appendChild(this.activeCues[0].getCueAsHTML().trim());
// Force redraw
// var redraw = plyr.captionsContainer.offsetHeight;
}
});
}