diff options
author | Jimmy Jia <tesrin@gmail.com> | 2019-04-01 14:42:51 -0400 |
---|---|---|
committer | Jimmy Jia <tesrin@gmail.com> | 2019-04-01 14:42:51 -0400 |
commit | 266b70d9d083c99b606bbf63f1a05e0cfe52a18c (patch) | |
tree | 88bbb7570e83c2ec6c82fce899b7e60646c55bf9 /src | |
parent | c202551e6d0b11656a99b41f3f8b3a48f2bf1e0a (diff) | |
download | plyr-266b70d9d083c99b606bbf63f1a05e0cfe52a18c.tar.lz plyr-266b70d9d083c99b606bbf63f1a05e0cfe52a18c.tar.xz plyr-266b70d9d083c99b606bbf63f1a05e0cfe52a18c.zip |
fix: Properly clear all timeouts on destroy
Diffstat (limited to 'src')
-rw-r--r-- | src/js/plyr.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js index 0d3d1674..e28c5da3 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -1088,11 +1088,13 @@ class Plyr { // Stop playback this.stop(); + // Clear timeouts + clearTimeout(this.timers.loading); + clearTimeout(this.timers.controls); + clearTimeout(this.timers.resized); + // Provider specific stuff if (this.isHTML5) { - // Clear timeout - clearTimeout(this.timers.loading); - // Restore native video controls ui.toggleNativeControls.call(this, true); |