diff options
author | Sam Potts <sam@potts.es> | 2020-02-08 22:17:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-08 22:17:41 +0000 |
commit | b63b62f6dce901c25052ee8cbdaa212f042e78e9 (patch) | |
tree | b0b8e47d850d6c0c595d281915ebfb9379953455 /src | |
parent | 0f08c7c13a62792fd4a6ae76b62e480bbdcc2c78 (diff) | |
parent | 9075ea189a013f7c9ddc0a473d7efbd96ac557f8 (diff) | |
download | plyr-b63b62f6dce901c25052ee8cbdaa212f042e78e9.tar.lz plyr-b63b62f6dce901c25052ee8cbdaa212f042e78e9.tar.xz plyr-b63b62f6dce901c25052ee8cbdaa212f042e78e9.zip |
Merge pull request #1677 from ydylla/fix-scrubbing-chrome-android
Fix preview thumbnail scrubbing not working on mobile touch devices
Diffstat (limited to 'src')
-rw-r--r-- | src/js/listeners.js | 2 | ||||
-rw-r--r-- | src/js/plugins/preview-thumbnails.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/js/listeners.js b/src/js/listeners.js index f68245e4..5b888a90 100644 --- a/src/js/listeners.js +++ b/src/js/listeners.js @@ -725,7 +725,7 @@ class Listeners { }); // Hide thumbnail preview - on mouse click, mouse leave, and video play/seek. All four are required, e.g., for buffering - this.bind(elements.progress, 'mouseleave click', () => { + this.bind(elements.progress, 'mouseleave touchend click', () => { const { previewThumbnails } = player; if (previewThumbnails && previewThumbnails.loaded) { diff --git a/src/js/plugins/preview-thumbnails.js b/src/js/plugins/preview-thumbnails.js index 44e6ace7..6cd09ef2 100644 --- a/src/js/plugins/preview-thumbnails.js +++ b/src/js/plugins/preview-thumbnails.js @@ -239,8 +239,8 @@ class PreviewThumbnails { } startScrubbing(event) { - // Only act on left mouse button (0), or touch device (event.button is false) - if (event.button === false || event.button === 0) { + // Only act on left mouse button (0), or touch device (event.button does not exist or is false) + if (is.nullOrUndefined(event.button) || event.button === false || event.button === 0) { this.mouseDown = true; // Wait until media has a duration |