aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2019-02-24 12:10:20 +1100
committerSam Potts <sam@potts.es>2019-02-24 12:10:20 +1100
commit4c3bf25b8a6228b8b48a28f351df1ae2523e6d19 (patch)
treee9491b31fa6d5158e76a240133b2342fdc60b74c /src
parent215fc3677af16e08ffa351b20a4b5b15719df307 (diff)
downloadplyr-4c3bf25b8a6228b8b48a28f351df1ae2523e6d19.tar.lz
plyr-4c3bf25b8a6228b8b48a28f351df1ae2523e6d19.tar.xz
plyr-4c3bf25b8a6228b8b48a28f351df1ae2523e6d19.zip
Fixed issue where the preview thumbnail was present while scrubbing
Diffstat (limited to 'src')
-rw-r--r--src/js/config/defaults.js2
-rw-r--r--src/js/plugins/previewThumbnails.js7
-rw-r--r--src/js/plyr.js2
-rw-r--r--src/js/plyr.polyfilled.js2
4 files changed, 8 insertions, 5 deletions
diff --git a/src/js/config/defaults.js b/src/js/config/defaults.js
index a1eb50a7..82809511 100644
--- a/src/js/config/defaults.js
+++ b/src/js/config/defaults.js
@@ -60,7 +60,7 @@ const defaults = {
// Sprite (for icons)
loadSprite: true,
iconPrefix: 'plyr',
- iconUrl: 'https://cdn.plyr.io/3.5.1/plyr.svg',
+ iconUrl: 'https://cdn.plyr.io/3.5.2/plyr.svg',
// Blank video (used to prevent errors on source change)
blankVideo: 'https://cdn.plyr.io/static/blank.mp4',
diff --git a/src/js/plugins/previewThumbnails.js b/src/js/plugins/previewThumbnails.js
index 834d16f2..bd7a6bbd 100644
--- a/src/js/plugins/previewThumbnails.js
+++ b/src/js/plugins/previewThumbnails.js
@@ -220,6 +220,7 @@ class PreviewThumbnails {
// Only act on left mouse button (0), or touch device (event.button is false)
if (event.button === false || event.button === 0) {
this.mouseDown = true;
+
// Wait until media has a duration
if (this.player.media.duration) {
this.toggleScrubbingContainer(true);
@@ -307,7 +308,6 @@ class PreviewThumbnails {
if (this.mouseDown) {
this.setScrubbingContainerSize();
} else {
- this.toggleThumbContainer(true);
this.setThumbContainerSizeAndPos();
}
@@ -319,7 +319,10 @@ class PreviewThumbnails {
const hasThumb = thumbNum >= 0;
let qualityIndex = 0;
- this.toggleThumbContainer(hasThumb);
+ // Show the thumb container if we're not scrubbing
+ if (!this.mouseDown) {
+ this.toggleThumbContainer(hasThumb);
+ }
// No matching thumb found
if (!hasThumb) {
diff --git a/src/js/plyr.js b/src/js/plyr.js
index c9b51423..0d3d1674 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -1,6 +1,6 @@
// ==========================================================================
// Plyr
-// plyr.js v3.5.1
+// plyr.js v3.5.2
// https://github.com/sampotts/plyr
// License: The MIT License (MIT)
// ==========================================================================
diff --git a/src/js/plyr.polyfilled.js b/src/js/plyr.polyfilled.js
index d9a8c0b1..8623e41a 100644
--- a/src/js/plyr.polyfilled.js
+++ b/src/js/plyr.polyfilled.js
@@ -1,6 +1,6 @@
// ==========================================================================
// Plyr Polyfilled Build
-// plyr.js v3.5.1
+// plyr.js v3.5.2
// https://github.com/sampotts/plyr
// License: The MIT License (MIT)
// ==========================================================================