Vimeo fix

This commit is contained in:
Sam Potts
2018-03-15 10:29:05 +11:00
parent c74b75e8e1
commit 5cb1628cd8
16 changed files with 50 additions and 5860 deletions
+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
+11 -8
View File
@@ -77,7 +77,7 @@ var defaults = {
// Sprite (for icons) // Sprite (for icons)
loadSprite: true, loadSprite: true,
iconPrefix: 'plyr', iconPrefix: 'plyr',
iconUrl: 'https://cdn.plyr.io/3.0.0-beta.19/plyr.svg', iconUrl: 'https://cdn.plyr.io/3.0.0-beta.20/plyr.svg',
// Blank video (used to prevent errors on source change) // Blank video (used to prevent errors on source change)
blankVideo: 'https://cdn.plyr.io/static/blank.mp4', blankVideo: 'https://cdn.plyr.io/static/blank.mp4',
@@ -1511,13 +1511,9 @@ var support = {
break; break;
case 'youtube:video': case 'youtube:video':
api = true;
ui = support.rangeInput && (!browser.isIPhone || playsInline);
break;
case 'vimeo:video': case 'vimeo:video':
api = true; api = true;
ui = support.rangeInput && !browser.isIPhone; ui = support.rangeInput && (!browser.isIPhone || playsInline);
break; break;
default: default:
@@ -2179,7 +2175,7 @@ var ui = {
var _this = this; var _this = this;
// Re-attach media element listeners // Re-attach media element listeners
// TODO: Use event bubbling // TODO: Use event bubbling?
this.listeners.media(); this.listeners.media();
// Don't setup interface if no support // Don't setup interface if no support
@@ -6041,7 +6037,7 @@ var source = {
// ========================================================================== // ==========================================================================
// Plyr // Plyr
// plyr.js v3.0.0-beta.19 // plyr.js v3.0.0-beta.20
// https://github.com/sampotts/plyr // https://github.com/sampotts/plyr
// License: The MIT License (MIT) // License: The MIT License (MIT)
// ========================================================================== // ==========================================================================
@@ -6648,6 +6644,10 @@ var Plyr = function () {
var soft = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var soft = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (!this.ready) {
return;
}
var done = function done() { var done = function done() {
// Reset overflow (incase destroyed while in fullscreen) // Reset overflow (incase destroyed while in fullscreen)
document.body.style.overflow = ''; document.body.style.overflow = '';
@@ -6690,6 +6690,9 @@ var Plyr = function () {
callback.call(_this4.elements.original); callback.call(_this4.elements.original);
} }
// Reset state
_this4.ready = false;
// Clear for garbage collection // Clear for garbage collection
setTimeout(function () { setTimeout(function () {
_this4.elements = null; _this4.elements = null;
+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 -7
View File
@@ -6702,13 +6702,9 @@ var support = {
break; break;
case 'youtube:video': case 'youtube:video':
api = true;
ui = support.rangeInput && (!browser.isIPhone || playsInline);
break;
case 'vimeo:video': case 'vimeo:video':
api = true; api = true;
ui = support.rangeInput && !browser.isIPhone; ui = support.rangeInput && (!browser.isIPhone || playsInline);
break; break;
default: default:
@@ -7370,7 +7366,7 @@ var ui = {
var _this = this; var _this = this;
// Re-attach media element listeners // Re-attach media element listeners
// TODO: Use event bubbling // TODO: Use event bubbling?
this.listeners.media(); this.listeners.media();
// Don't setup interface if no support // Don't setup interface if no support
@@ -11839,6 +11835,10 @@ var Plyr$1 = function () {
var soft = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var soft = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (!this.ready) {
return;
}
var done = function done() { var done = function done() {
// Reset overflow (incase destroyed while in fullscreen) // Reset overflow (incase destroyed while in fullscreen)
document.body.style.overflow = ''; document.body.style.overflow = '';
@@ -11881,6 +11881,9 @@ var Plyr$1 = function () {
callback.call(_this4.elements.original); callback.call(_this4.elements.original);
} }
// Reset state
_this4.ready = false;
// Clear for garbage collection // Clear for garbage collection
setTimeout(function () { setTimeout(function () {
_this4.elements = null; _this4.elements = null;
@@ -12500,7 +12503,7 @@ var Plyr$1 = function () {
// ========================================================================== // ==========================================================================
// Plyr Polyfilled Build // Plyr Polyfilled Build
// plyr.js v3.0.0-beta.19 // plyr.js v3.0.0-beta.20
// https://github.com/sampotts/plyr // https://github.com/sampotts/plyr
// License: The MIT License (MIT) // License: The MIT License (MIT)
// ========================================================================== // ==========================================================================
+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
@@ -39,7 +39,7 @@
"rollup-plugin-commonjs": "^8.4.1", "rollup-plugin-commonjs": "^8.4.1",
"rollup-plugin-node-resolve": "^3.2.0", "rollup-plugin-node-resolve": "^3.2.0",
"run-sequence": "^2.2.1", "run-sequence": "^2.2.1",
"stylelint": "^9.1.1", "stylelint": "^9.1.3",
"stylelint-config-prettier": "^3.0.4", "stylelint-config-prettier": "^3.0.4",
"stylelint-config-recommended": "^2.1.0", "stylelint-config-recommended": "^2.1.0",
"stylelint-config-sass-guidelines": "^5.0.0", "stylelint-config-sass-guidelines": "^5.0.0",
@@ -47,7 +47,15 @@
"stylelint-scss": "^2.5.0", "stylelint-scss": "^2.5.0",
"stylelint-selector-bem-pattern": "^2.0.0" "stylelint-selector-bem-pattern": "^2.0.0"
}, },
"keywords": ["HTML5 Video", "HTML5 Audio", "Media Player", "DASH", "Shaka", "WordPress", "HLS"], "keywords": [
"HTML5 Video",
"HTML5 Audio",
"Media Player",
"DASH",
"Shaka",
"WordPress",
"HLS"
],
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git://github.com/sampotts/plyr.git" "url": "git://github.com/sampotts/plyr.git"
+7
View File
@@ -1029,6 +1029,10 @@ class Plyr {
* @param {boolean} soft - Whether it's a soft destroy (for source changes etc) * @param {boolean} soft - Whether it's a soft destroy (for source changes etc)
*/ */
destroy(callback, soft = false) { destroy(callback, soft = false) {
if (!this.ready) {
return;
}
const done = () => { const done = () => {
// Reset overflow (incase destroyed while in fullscreen) // Reset overflow (incase destroyed while in fullscreen)
document.body.style.overflow = ''; document.body.style.overflow = '';
@@ -1071,6 +1075,9 @@ class Plyr {
callback.call(this.elements.original); callback.call(this.elements.original);
} }
// Reset state
this.ready = false;
// Clear for garbage collection // Clear for garbage collection
setTimeout(() => { setTimeout(() => {
this.elements = null; this.elements = null;
+1 -5
View File
@@ -30,13 +30,9 @@ const support = {
break; break;
case 'youtube:video': case 'youtube:video':
api = true;
ui = support.rangeInput && (!browser.isIPhone || playsInline);
break;
case 'vimeo:video': case 'vimeo:video':
api = true; api = true;
ui = support.rangeInput && !browser.isIPhone; ui = support.rangeInput && (!browser.isIPhone || playsInline);
break; break;
default: default:
+1 -2
View File
@@ -5,7 +5,6 @@
import utils from './utils'; import utils from './utils';
import captions from './captions'; import captions from './captions';
import controls from './controls'; import controls from './controls';
import listeners from './listeners';
const ui = { const ui = {
addStyleHook() { addStyleHook() {
@@ -25,7 +24,7 @@ const ui = {
// Setup the UI // Setup the UI
build() { build() {
// Re-attach media element listeners // Re-attach media element listeners
// TODO: Use event bubbling // TODO: Use event bubbling?
this.listeners.media(); this.listeners.media();
// Don't setup interface if no support // Don't setup interface if no support
+2
View File
@@ -3,9 +3,11 @@
// ========================================================================== // ==========================================================================
.plyr__ads { .plyr__ads {
border-radius: inherit;
bottom: 0; bottom: 0;
cursor: pointer; cursor: pointer;
left: 0; left: 0;
overflow: hidden;
position: absolute; position: absolute;
right: 0; right: 0;
top: 0; top: 0;
-5828
View File
File diff suppressed because it is too large Load Diff