diff options
author | Sam Potts <sam@potts.es> | 2019-04-11 21:18:52 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-11 21:18:52 +1000 |
commit | a8456f4ca7caad16dc055c4d92eaf1d7aa43788d (patch) | |
tree | 88bbb7570e83c2ec6c82fce899b7e60646c55bf9 /src | |
parent | c202551e6d0b11656a99b41f3f8b3a48f2bf1e0a (diff) | |
parent | 266b70d9d083c99b606bbf63f1a05e0cfe52a18c (diff) | |
download | plyr-a8456f4ca7caad16dc055c4d92eaf1d7aa43788d.tar.lz plyr-a8456f4ca7caad16dc055c4d92eaf1d7aa43788d.tar.xz plyr-a8456f4ca7caad16dc055c4d92eaf1d7aa43788d.zip |
Merge pull request #1404 from taion/clear-timeouts
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); |