Skip to content

Commit

Permalink
v3.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
sampotts committed May 4, 2020
1 parent 37be133 commit 86c3cf6
Show file tree
Hide file tree
Showing 21 changed files with 59 additions and 69 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,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.6.1/plyr.js"></script>
<script src="https://cdn.plyr.io/3.6.2/plyr.js"></script>
```

...or...

```html
<script src="https://cdn.plyr.io/3.6.1/plyr.polyfilled.js"></script>
<script src="https://cdn.plyr.io/3.6.2/plyr.polyfilled.js"></script>
```

## CSS
Expand All @@ -154,13 +154,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.6.1/plyr.css" />
<link rel="stylesheet" href="https://cdn.plyr.io/3.6.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.6.1/plyr.svg`.
reference, the CDN hosted SVG sprite can be found at `https://cdn.plyr.io/3.6.2/plyr.svg`.

# Ads

Expand Down
2 changes: 1 addition & 1 deletion demo/dist/demo.css

Large diffs are not rendered by default.

16 changes: 7 additions & 9 deletions demo/dist/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -4468,7 +4468,7 @@ typeof navigator === "object" && (function () {
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(n);
if (n === "Map" || n === "Set") return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
}

Expand Down Expand Up @@ -20951,7 +20951,7 @@ typeof navigator === "object" && (function () {

var event = new CustomEvent(type, {
bubbles: bubbles,
detail: _objectSpread2({}, detail, {
detail: _objectSpread2(_objectSpread2({}, detail), {}, {
plyr: this
})
}); // Dispatch the event
Expand Down Expand Up @@ -21776,7 +21776,7 @@ typeof navigator === "object" && (function () {
var attr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var text = i18n.get(key, this.config);

var attributes = _objectSpread2({}, attr, {
var attributes = _objectSpread2(_objectSpread2({}, attr), {}, {
class: [attr.class, this.config.classNames.hidden].filter(Boolean).join(' ')
});

Expand Down Expand Up @@ -22776,7 +22776,7 @@ typeof navigator === "object" && (function () {
showMenuPanel = controls.showMenuPanel;
this.elements.controls = null; // Larger overlaid play button

if (this.config.controls.includes('play-large')) {
if (is$2.array(this.config.controls) && this.config.controls.includes('play-large')) {
this.elements.container.appendChild(createButton.call(this, 'play-large'));
} // Create the container

Expand All @@ -22788,7 +22788,7 @@ typeof navigator === "object" && (function () {
class: 'plyr__controls__item'
}; // Loop through controls in order

dedupe(this.config.controls).forEach(function (control) {
dedupe(is$2.array(this.config.controls) ? this.config.controls : []).forEach(function (control) {
// Restart button
if (control === 'restart') {
container.appendChild(createButton.call(_this10, 'restart', defaultAttributes));
Expand Down Expand Up @@ -23107,8 +23107,6 @@ typeof navigator === "object" && (function () {
if (update) {
if (is$2.string(this.config.controls)) {
container = replace(container);
} else if (is$2.element(container)) {
container.innerHTML = replace(container.innerHTML);
}
} // Controls container

Expand Down Expand Up @@ -23646,7 +23644,7 @@ typeof navigator === "object" && (function () {
// Sprite (for icons)
loadSprite: true,
iconPrefix: 'plyr',
iconUrl: 'https://cdn.plyr.io/3.6.1/plyr.svg',
iconUrl: 'https://cdn.plyr.io/3.6.2/plyr.svg',
// Blank video (used to prevent errors on source change)
blankVideo: 'https://cdn.plyr.io/static/blank.mp4',
// Quality default
Expand Down Expand Up @@ -28595,7 +28593,7 @@ typeof navigator === "object" && (function () {

var hiding = toggleClass(this.elements.container, this.config.classNames.hideControls, force); // Close menu

if (hiding && this.config.controls.includes('settings') && !is$2.empty(this.config.settings)) {
if (hiding && is$2.array(this.config.controls) && this.config.controls.includes('settings') && !is$2.empty(this.config.settings)) {
controls.toggleMenu.call(this, false);
} // Trigger event on change

Expand Down
4 changes: 2 additions & 2 deletions demo/dist/demo.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demo/dist/demo.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/plyr.css

Large diffs are not rendered by default.

16 changes: 7 additions & 9 deletions dist/plyr.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ typeof navigator === "object" && (function (global, factory) {
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(n);
if (n === "Map" || n === "Set") return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
}

Expand Down Expand Up @@ -1084,7 +1084,7 @@ typeof navigator === "object" && (function (global, factory) {

var event = new CustomEvent(type, {
bubbles: bubbles,
detail: _objectSpread2({}, detail, {
detail: _objectSpread2(_objectSpread2({}, detail), {}, {
plyr: this
})
}); // Dispatch the event
Expand Down Expand Up @@ -1786,7 +1786,7 @@ typeof navigator === "object" && (function (global, factory) {
var attr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var text = i18n.get(key, this.config);

var attributes = _objectSpread2({}, attr, {
var attributes = _objectSpread2(_objectSpread2({}, attr), {}, {
class: [attr.class, this.config.classNames.hidden].filter(Boolean).join(' ')
});

Expand Down Expand Up @@ -2786,7 +2786,7 @@ typeof navigator === "object" && (function (global, factory) {
showMenuPanel = controls.showMenuPanel;
this.elements.controls = null; // Larger overlaid play button

if (this.config.controls.includes('play-large')) {
if (is$1.array(this.config.controls) && this.config.controls.includes('play-large')) {
this.elements.container.appendChild(createButton.call(this, 'play-large'));
} // Create the container

Expand All @@ -2798,7 +2798,7 @@ typeof navigator === "object" && (function (global, factory) {
class: 'plyr__controls__item'
}; // Loop through controls in order

dedupe(this.config.controls).forEach(function (control) {
dedupe(is$1.array(this.config.controls) ? this.config.controls : []).forEach(function (control) {
// Restart button
if (control === 'restart') {
container.appendChild(createButton.call(_this10, 'restart', defaultAttributes));
Expand Down Expand Up @@ -3117,8 +3117,6 @@ typeof navigator === "object" && (function (global, factory) {
if (update) {
if (is$1.string(this.config.controls)) {
container = replace(container);
} else if (is$1.element(container)) {
container.innerHTML = replace(container.innerHTML);
}
} // Controls container

Expand Down Expand Up @@ -3656,7 +3654,7 @@ typeof navigator === "object" && (function (global, factory) {
// Sprite (for icons)
loadSprite: true,
iconPrefix: 'plyr',
iconUrl: 'https://cdn.plyr.io/3.6.1/plyr.svg',
iconUrl: 'https://cdn.plyr.io/3.6.2/plyr.svg',
// Blank video (used to prevent errors on source change)
blankVideo: 'https://cdn.plyr.io/static/blank.mp4',
// Quality default
Expand Down Expand Up @@ -8491,7 +8489,7 @@ typeof navigator === "object" && (function (global, factory) {

var hiding = toggleClass(this.elements.container, this.config.classNames.hideControls, force); // Close menu

if (hiding && this.config.controls.includes('settings') && !is$1.empty(this.config.settings)) {
if (hiding && is$1.array(this.config.controls) && this.config.controls.includes('settings') && !is$1.empty(this.config.settings)) {
controls.toggleMenu.call(this, false);
} // Trigger event on change

Expand Down
4 changes: 2 additions & 2 deletions dist/plyr.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/plyr.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/plyr.min.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/plyr.min.mjs.map

Large diffs are not rendered by default.

16 changes: 7 additions & 9 deletions dist/plyr.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ function _unsupportedIterableToArray(o, minLen) {
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(n);
if (n === "Map" || n === "Set") return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
}

Expand Down Expand Up @@ -1078,7 +1078,7 @@ function triggerEvent(element) {

var event = new CustomEvent(type, {
bubbles: bubbles,
detail: _objectSpread2({}, detail, {
detail: _objectSpread2(_objectSpread2({}, detail), {}, {
plyr: this
})
}); // Dispatch the event
Expand Down Expand Up @@ -1780,7 +1780,7 @@ var controls = {
var attr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var text = i18n.get(key, this.config);

var attributes = _objectSpread2({}, attr, {
var attributes = _objectSpread2(_objectSpread2({}, attr), {}, {
class: [attr.class, this.config.classNames.hidden].filter(Boolean).join(' ')
});

Expand Down Expand Up @@ -2780,7 +2780,7 @@ var controls = {
showMenuPanel = controls.showMenuPanel;
this.elements.controls = null; // Larger overlaid play button

if (this.config.controls.includes('play-large')) {
if (is$1.array(this.config.controls) && this.config.controls.includes('play-large')) {
this.elements.container.appendChild(createButton.call(this, 'play-large'));
} // Create the container

Expand All @@ -2792,7 +2792,7 @@ var controls = {
class: 'plyr__controls__item'
}; // Loop through controls in order

dedupe(this.config.controls).forEach(function (control) {
dedupe(is$1.array(this.config.controls) ? this.config.controls : []).forEach(function (control) {
// Restart button
if (control === 'restart') {
container.appendChild(createButton.call(_this10, 'restart', defaultAttributes));
Expand Down Expand Up @@ -3111,8 +3111,6 @@ var controls = {
if (update) {
if (is$1.string(this.config.controls)) {
container = replace(container);
} else if (is$1.element(container)) {
container.innerHTML = replace(container.innerHTML);
}
} // Controls container

Expand Down Expand Up @@ -3650,7 +3648,7 @@ var defaults$1 = {
// Sprite (for icons)
loadSprite: true,
iconPrefix: 'plyr',
iconUrl: 'https://cdn.plyr.io/3.6.1/plyr.svg',
iconUrl: 'https://cdn.plyr.io/3.6.2/plyr.svg',
// Blank video (used to prevent errors on source change)
blankVideo: 'https://cdn.plyr.io/static/blank.mp4',
// Quality default
Expand Down Expand Up @@ -8485,7 +8483,7 @@ var Plyr = /*#__PURE__*/function () {

var hiding = toggleClass(this.elements.container, this.config.classNames.hideControls, force); // Close menu

if (hiding && this.config.controls.includes('settings') && !is$1.empty(this.config.settings)) {
if (hiding && is$1.array(this.config.controls) && this.config.controls.includes('settings') && !is$1.empty(this.config.settings)) {
controls.toggleMenu.call(this, false);
} // Trigger event on change

Expand Down
16 changes: 7 additions & 9 deletions dist/plyr.polyfilled.js
Original file line number Diff line number Diff line change
Expand Up @@ -4211,7 +4211,7 @@ typeof navigator === "object" && (function (global, factory) {
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(n);
if (n === "Map" || n === "Set") return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
}

Expand Down Expand Up @@ -7320,7 +7320,7 @@ typeof navigator === "object" && (function (global, factory) {

var event = new CustomEvent(type, {
bubbles: bubbles,
detail: _objectSpread2({}, detail, {
detail: _objectSpread2(_objectSpread2({}, detail), {}, {
plyr: this
})
}); // Dispatch the event
Expand Down Expand Up @@ -8107,7 +8107,7 @@ typeof navigator === "object" && (function (global, factory) {
var attr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var text = i18n.get(key, this.config);

var attributes = _objectSpread2({}, attr, {
var attributes = _objectSpread2(_objectSpread2({}, attr), {}, {
class: [attr.class, this.config.classNames.hidden].filter(Boolean).join(' ')
});

Expand Down Expand Up @@ -9107,7 +9107,7 @@ typeof navigator === "object" && (function (global, factory) {
showMenuPanel = controls.showMenuPanel;
this.elements.controls = null; // Larger overlaid play button

if (this.config.controls.includes('play-large')) {
if (is$1.array(this.config.controls) && this.config.controls.includes('play-large')) {
this.elements.container.appendChild(createButton.call(this, 'play-large'));
} // Create the container

Expand All @@ -9119,7 +9119,7 @@ typeof navigator === "object" && (function (global, factory) {
class: 'plyr__controls__item'
}; // Loop through controls in order

dedupe(this.config.controls).forEach(function (control) {
dedupe(is$1.array(this.config.controls) ? this.config.controls : []).forEach(function (control) {
// Restart button
if (control === 'restart') {
container.appendChild(createButton.call(_this10, 'restart', defaultAttributes));
Expand Down Expand Up @@ -9438,8 +9438,6 @@ typeof navigator === "object" && (function (global, factory) {
if (update) {
if (is$1.string(this.config.controls)) {
container = replace(container);
} else if (is$1.element(container)) {
container.innerHTML = replace(container.innerHTML);
}
} // Controls container

Expand Down Expand Up @@ -9977,7 +9975,7 @@ typeof navigator === "object" && (function (global, factory) {
// Sprite (for icons)
loadSprite: true,
iconPrefix: 'plyr',
iconUrl: 'https://cdn.plyr.io/3.6.1/plyr.svg',
iconUrl: 'https://cdn.plyr.io/3.6.2/plyr.svg',
// Blank video (used to prevent errors on source change)
blankVideo: 'https://cdn.plyr.io/static/blank.mp4',
// Quality default
Expand Down Expand Up @@ -14926,7 +14924,7 @@ typeof navigator === "object" && (function (global, factory) {

var hiding = toggleClass(this.elements.container, this.config.classNames.hideControls, force); // Close menu

if (hiding && this.config.controls.includes('settings') && !is$1.empty(this.config.settings)) {
if (hiding && is$1.array(this.config.controls) && this.config.controls.includes('settings') && !is$1.empty(this.config.settings)) {
controls.toggleMenu.call(this, false);
} // Trigger event on change

Expand Down
4 changes: 2 additions & 2 deletions dist/plyr.polyfilled.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/plyr.polyfilled.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/plyr.polyfilled.min.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/plyr.polyfilled.min.mjs.map

Large diffs are not rendered by default.

16 changes: 7 additions & 9 deletions dist/plyr.polyfilled.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4205,7 +4205,7 @@ function _unsupportedIterableToArray(o, minLen) {
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(n);
if (n === "Map" || n === "Set") return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
}

Expand Down Expand Up @@ -7314,7 +7314,7 @@ function triggerEvent(element) {

var event = new CustomEvent(type, {
bubbles: bubbles,
detail: _objectSpread2({}, detail, {
detail: _objectSpread2(_objectSpread2({}, detail), {}, {
plyr: this
})
}); // Dispatch the event
Expand Down Expand Up @@ -8101,7 +8101,7 @@ var controls = {
var attr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var text = i18n.get(key, this.config);

var attributes = _objectSpread2({}, attr, {
var attributes = _objectSpread2(_objectSpread2({}, attr), {}, {
class: [attr.class, this.config.classNames.hidden].filter(Boolean).join(' ')
});

Expand Down Expand Up @@ -9101,7 +9101,7 @@ var controls = {
showMenuPanel = controls.showMenuPanel;
this.elements.controls = null; // Larger overlaid play button

if (this.config.controls.includes('play-large')) {
if (is$1.array(this.config.controls) && this.config.controls.includes('play-large')) {
this.elements.container.appendChild(createButton.call(this, 'play-large'));
} // Create the container

Expand All @@ -9113,7 +9113,7 @@ var controls = {
class: 'plyr__controls__item'
}; // Loop through controls in order

dedupe(this.config.controls).forEach(function (control) {
dedupe(is$1.array(this.config.controls) ? this.config.controls : []).forEach(function (control) {
// Restart button
if (control === 'restart') {
container.appendChild(createButton.call(_this10, 'restart', defaultAttributes));
Expand Down Expand Up @@ -9432,8 +9432,6 @@ var controls = {
if (update) {
if (is$1.string(this.config.controls)) {
container = replace(container);
} else if (is$1.element(container)) {
container.innerHTML = replace(container.innerHTML);
}
} // Controls container

Expand Down Expand Up @@ -9971,7 +9969,7 @@ var defaults$1 = {
// Sprite (for icons)
loadSprite: true,
iconPrefix: 'plyr',
iconUrl: 'https://cdn.plyr.io/3.6.1/plyr.svg',
iconUrl: 'https://cdn.plyr.io/3.6.2/plyr.svg',
// Blank video (used to prevent errors on source change)
blankVideo: 'https://cdn.plyr.io/static/blank.mp4',
// Quality default
Expand Down Expand Up @@ -14920,7 +14918,7 @@ var Plyr = /*#__PURE__*/function () {

var hiding = toggleClass(this.elements.container, this.config.classNames.hideControls, force); // Close menu

if (hiding && this.config.controls.includes('settings') && !is$1.empty(this.config.settings)) {
if (hiding && is$1.array(this.config.controls) && this.config.controls.includes('settings') && !is$1.empty(this.config.settings)) {
controls.toggleMenu.call(this, false);
} // Trigger event on change

Expand Down
Loading

0 comments on commit 86c3cf6

Please sign in to comment.