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

View File

@ -1029,6 +1029,10 @@ class Plyr {
* @param {boolean} soft - Whether it's a soft destroy (for source changes etc)
*/
destroy(callback, soft = false) {
if (!this.ready) {
return;
}
const done = () => {
// Reset overflow (incase destroyed while in fullscreen)
document.body.style.overflow = '';
@ -1071,6 +1075,9 @@ class Plyr {
callback.call(this.elements.original);
}
// Reset state
this.ready = false;
// Clear for garbage collection
setTimeout(() => {
this.elements = null;

View File

@ -30,13 +30,9 @@ const support = {
break;
case 'youtube:video':
api = true;
ui = support.rangeInput && (!browser.isIPhone || playsInline);
break;
case 'vimeo:video':
api = true;
ui = support.rangeInput && !browser.isIPhone;
ui = support.rangeInput && (!browser.isIPhone || playsInline);
break;
default:

View File

@ -5,7 +5,6 @@
import utils from './utils';
import captions from './captions';
import controls from './controls';
import listeners from './listeners';
const ui = {
addStyleHook() {
@ -25,7 +24,7 @@ const ui = {
// Setup the UI
build() {
// Re-attach media element listeners
// TODO: Use event bubbling
// TODO: Use event bubbling?
this.listeners.media();
// Don't setup interface if no support

View File

@ -3,9 +3,11 @@
// ==========================================================================
.plyr__ads {
border-radius: inherit;
bottom: 0;
cursor: pointer;
left: 0;
overflow: hidden;
position: absolute;
right: 0;
top: 0;