Compare commits

...

6 Commits

Author SHA1 Message Date
Sam Potts 7dc4d9cd22 v3.4.3 2018-08-14 12:16:34 +10:00
Sam Potts 8fb8ae1260 Merge pull request #1163 from sampotts/develop
Fix bug with nodeList for play buttons
2018-08-14 12:14:58 +10:00
Sam Potts 90304369f4 Fix watch 2018-08-14 12:13:16 +10:00
Sam Potts 922456c46c Fix for nodeList as buttons 2018-08-14 12:13:00 +10:00
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
15 changed files with 61 additions and 29 deletions
+8
View File
@@ -1,3 +1,11 @@
# v3.4.3
- Fixed issue with nodeList for custom playback controls
# 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) || is.nodeList(button)) {
Array.from(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) || is$1.nodeList(button)) {
Array.from(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
+2 -2
View File
@@ -44,7 +44,7 @@ const paths = {
// Source paths
src: {
sass: path.join(root, 'src/sass/**/*.scss'),
js: path.join(root, 'src/js/**/*'),
js: path.join(root, 'src/js/**/*.js'),
sprite: path.join(root, 'src/sprite/*.svg'),
},
@@ -55,7 +55,7 @@ const paths = {
// Source paths
src: {
sass: path.join(root, 'demo/src/sass/**/*.scss'),
js: path.join(root, 'demo/src/js/**/*'),
js: path.join(root, 'demo/src/js/**/*.js'),
},
// Output paths
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "plyr",
"version": "3.4.1",
"version": "3.4.3",
"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.3/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.3/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.3/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.3/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) || is.nodeList(button)) {
Array.from(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.3
// 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.3
// https://github.com/sampotts/plyr
// License: The MIT License (MIT)
// ==========================================================================