aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/js/plugins/youtube.js2
-rw-r--r--src/js/plyr.js8
2 files changed, 6 insertions, 4 deletions
diff --git a/src/js/plugins/youtube.js b/src/js/plugins/youtube.js
index 0bd232e0..d5972c80 100644
--- a/src/js/plugins/youtube.js
+++ b/src/js/plugins/youtube.js
@@ -130,7 +130,7 @@ const youtube = {
player.media = replaceElement(container, player.media);
// Id to poster wrapper
- const posterSrc = format => `https://img.youtube.com/vi/${videoId}/${format}default.jpg`;
+ const posterSrc = format => `https://i.ytimg.com/vi/${videoId}/${format}default.jpg`;
// Check thumbnail images in order of quality, but reject fallback thumbnails (120px wide)
loadImage(posterSrc('maxres'), 121) // Higest quality and unpadded
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);