-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chore: Scrubber/Media fixes for mobile #185
Conversation
jeremypress
commented
Jun 26, 2017
- Enables scrubbing on mobile
- Prevents tap and hold from bringing up copy/paste menu
- makes track title the file name
Tests coming soon. I still see two issues with scrubbing in general.
|
src/lib/viewers/media/Scrubber.js
Outdated
@@ -77,6 +86,8 @@ const CLASS_SCRUBBER_HOVER = 'bp-media-scrubber-hover'; | |||
this.playedEl.removeEventListener('mousedown', this.mouseDownHandler); | |||
this.convertedEl.removeEventListener('mousedown', this.mouseDownHandler); | |||
this.handleEl.removeEventListener('mousedown', this.mouseDownHandler); | |||
this.scrubberContainerEl.removeEventListener('touchstart', this.mouseDownHandler); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this also need to be inside an if (this.hasTouch) {}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From MDN:
Calling removeEventListener() with arguments that do not identify any currently registered EventListener on the EventTarget has no effect.
@@ -1,10 +1,12 @@ | |||
import autobind from 'autobind-decorator'; | |||
import EventEmitter from 'events'; | |||
import scrubberTemplate from './Scrubber.html'; | |||
import Browser from '../../Browser'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this needed? Didn't see it used anywhere in the code you added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Browser.hasTouch()
on line 61
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff changing to use pointer terminology. It'll also be easier to mentally parse once we have PointerEvent support in all browsers