Vimeo fix
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user