fix scrubbing for chrome android & hide thumb preview on touchend
Chrome android sends TouchEvent which does not have a button property.
This commit is contained in:
@ -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) {
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user