Compare commits

..

2 Commits

Author SHA1 Message Date
Sam Potts eaeccd66ae v3.4.2 2018-08-14 11:17:33 +10:00
Sam Potts 7a43649c13 Fix play/pause button state 2018-08-14 11:17:27 +10:00
14 changed files with 55 additions and 27 deletions
+4
View File
@@ -1,3 +1,7 @@
# v3.4.2
- Fix play/pause button state
# v3.4.1
- Bug fix for custom controls (fixes #1161)
+10 -2
View File
@@ -2942,8 +2942,7 @@ typeof navigator === "object" && (function (global, factory) {
// Add pressed property to buttons
if (!is.empty(this.elements.buttons)) {
// Toggle classname when pressed property is set
Object.values(this.elements.buttons).filter(Boolean).forEach(function (button) {
var addProperty = function addProperty(button) {
var className = _this10.config.classNames.controlPressed;
Object.defineProperty(button, 'pressed', {
enumerable: true,
@@ -2956,6 +2955,15 @@ typeof navigator === "object" && (function (global, factory) {
toggleClass(button, className, pressed);
}
});
};
// Toggle classname when pressed property is set
Object.values(this.elements.buttons).filter(Boolean).forEach(function (button) {
if (is.array(button)) {
button.filter(Boolean).forEach(addProperty);
} else {
addProperty(button);
}
});
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+10 -2
View File
@@ -8369,8 +8369,7 @@ typeof navigator === "object" && (function (global, factory) {
// Add pressed property to buttons
if (!is$1.empty(this.elements.buttons)) {
// Toggle classname when pressed property is set
Object.values(this.elements.buttons).filter(Boolean).forEach(function (button) {
var addProperty = function addProperty(button) {
var className = _this10.config.classNames.controlPressed;
Object.defineProperty(button, 'pressed', {
enumerable: true,
@@ -8383,6 +8382,15 @@ typeof navigator === "object" && (function (global, factory) {
toggleClass(button, className, pressed);
}
});
};
// Toggle classname when pressed property is set
Object.values(this.elements.buttons).filter(Boolean).forEach(function (button) {
if (is$1.array(button)) {
button.filter(Boolean).forEach(addProperty);
} else {
addProperty(button);
}
});
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "plyr",
"version": "3.4.1",
"version": "3.4.2",
"description": "A simple, accessible and customizable HTML5, YouTube and Vimeo media player",
"homepage": "https://plyr.io",
"author": "Sam Potts <sam@potts.es>",
+4 -4
View File
@@ -132,13 +132,13 @@ See [initialising](#initialising) for more information on advanced setups.
You can use our CDN (provided by [Fastly](https://www.fastly.com/)) for the JavaScript. There's 2 versions; one with and one without [polyfills](#polyfills). My recommendation would be to manage polyfills seperately as part of your application but to make life easier you can use the polyfilled build.
```html
<script src="https://cdn.plyr.io/3.4.1/plyr.js"></script>
<script src="https://cdn.plyr.io/3.4.2/plyr.js"></script>
```
...or...
```html
<script src="https://cdn.plyr.io/3.4.1/plyr.polyfilled.js"></script>
<script src="https://cdn.plyr.io/3.4.2/plyr.polyfilled.js"></script>
```
### CSS
@@ -152,13 +152,13 @@ Include the `plyr.css` stylsheet into your `<head>`
If you want to use our CDN (provided by [Fastly](https://www.fastly.com/)) for the default CSS, you can use the following:
```html
<link rel="stylesheet" href="https://cdn.plyr.io/3.4.1/plyr.css">
<link rel="stylesheet" href="https://cdn.plyr.io/3.4.2/plyr.css">
```
### SVG Sprite
The SVG sprite is loaded automatically from our CDN (provided by [Fastly](https://www.fastly.com/)). To change this, see the [options](#options) below. For
reference, the CDN hosted SVG sprite can be found at `https://cdn.plyr.io/3.4.1/plyr.svg`.
reference, the CDN hosted SVG sprite can be found at `https://cdn.plyr.io/3.4.2/plyr.svg`.
## Ads
+18 -10
View File
@@ -1610,20 +1610,28 @@ const controls = {
// Add pressed property to buttons
if (!is.empty(this.elements.buttons)) {
const addProperty = button => {
const className = this.config.classNames.controlPressed;
Object.defineProperty(button, 'pressed', {
enumerable: true,
get() {
return hasClass(button, className);
},
set(pressed = false) {
toggleClass(button, className, pressed);
},
});
};
// Toggle classname when pressed property is set
Object.values(this.elements.buttons)
.filter(Boolean)
.forEach(button => {
const className = this.config.classNames.controlPressed;
Object.defineProperty(button, 'pressed', {
enumerable: true,
get() {
return hasClass(button, className);
},
set(pressed = false) {
toggleClass(button, className, pressed);
},
});
if (is.array(button)) {
button.filter(Boolean).forEach(addProperty);
} else {
addProperty(button);
}
});
}
+1 -1
View File
@@ -1,6 +1,6 @@
// ==========================================================================
// Plyr
// plyr.js v3.4.1
// plyr.js v3.4.2
// https://github.com/sampotts/plyr
// License: The MIT License (MIT)
// ==========================================================================
+1 -1
View File
@@ -1,6 +1,6 @@
// ==========================================================================
// Plyr Polyfilled Build
// plyr.js v3.4.1
// plyr.js v3.4.2
// https://github.com/sampotts/plyr
// License: The MIT License (MIT)
// ==========================================================================