-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Improve touch controls for dash quality selector #4750
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
Improve touch controls for dash quality selector #4750
Conversation
- Add `touchstart` event to quality button which toggles the `vjs-lock-showing` class used on other quality selectors - Call `this.handleClick` from touchstart (fixes issue with `e.target` not being correct) #239
(just like the other quality selectors do on mobile)
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.
LGTM
So idk if this is intentional but shouldnt the speed behave the same as the quality menu? If i tap on speed it will just move up instead of opening the menu for it, like for the qualities
VirtualBoxVM_swb0hDhHGU.mp4
I think it makes more sense to behave like the other quality controls (legacy & audio). Personally, I find the adjusting playback speed a little clunky. Its acceptable, but I don't think I would want that behavior for the quality selector. |
…h-matching-videos * development: Fix handling of video published date in video lists (FreeTubeApp#4752) Translated using Weblate (Dutch) Translated using Weblate (Chinese (Simplified)) Bump lefthook from 1.6.4 to 1.6.5 (FreeTubeApp#4758) Bump marked from 12.0.0 to 12.0.1 (FreeTubeApp#4757) Bump electron from 29.1.0 to 29.1.1 (FreeTubeApp#4756) Translated using Weblate (Portuguese) Translated using Weblate (Portuguese (Brazil)) Improve touch controls for dash quality selector (FreeTubeApp#4750) Translated using Weblate (Serbian) Translated using Weblate (Spanish) Translated using Weblate (French) Translated using Weblate (German) Translated using Weblate (Estonian)
* development: (28 commits) Fix handling of video published date in video lists (FreeTubeApp#4752) Translated using Weblate (Dutch) Translated using Weblate (Chinese (Simplified)) Bump lefthook from 1.6.4 to 1.6.5 (FreeTubeApp#4758) Bump marked from 12.0.0 to 12.0.1 (FreeTubeApp#4757) Bump electron from 29.1.0 to 29.1.1 (FreeTubeApp#4756) Translated using Weblate (Portuguese) Translated using Weblate (Portuguese (Brazil)) Improve touch controls for dash quality selector (FreeTubeApp#4750) Translated using Weblate (Serbian) Translated using Weblate (Spanish) Translated using Weblate (French) Translated using Weblate (German) Translated using Weblate (Estonian) Translated using Weblate (Polish) Translated using Weblate (Basque) Translated using Weblate (Portuguese (Brazil)) Translated using Weblate (Portuguese (Brazil)) Translated using Weblate (Portuguese (Brazil)) Fix playlists database import and export not using the actual database format (FreeTubeApp#4664) ... # Conflicts: # src/renderer/views/Search/Search.js
Improve touch controls for dash quality selector
Pull Request Type
Related issue
MarmadileManteater#239
Description
The dash quality selector does not respond well to touch input unlike the legacy and audio quality selectors. The
handleClick
event is being called, but the way that is being called on touch input causese.target
to reflect a different element than the one actually tapped on. This causes the quality selector to seem like it is ignoring user input when, it is just treating most taps as if they were on the current quality label (which causes the click handler to return immediately).This PR addresses this by adding a
touchstart
event to the button element which simply callshandleClick
with the appropriate target. Due to the fact that the quality selector is typically hidden and shown by ahover
psuedo class, code was also added to the touchstart event to handle flipping thevjs-lock-showing
class.This PR also sets the max-block-size for the dash-quality selector on narrow displays in order to enable scrolling the list of qualities in the same way as the audio quality selector.
Screenshots
the touch responsiveness
the scrollability
Testing
dash
is the preferred formatDesktop
Additional context
To be clear, it is possible to make the dash quality selector "work" (kind of) as is, but it requires "hovering" the button by hold tapping before making a quick shorter tap. Simply tapping once doesn't do anything most of the time.
note: I just noticed that the audio / legacy quality selector hides when a quality selection is made.
This implementation only hides the selector once theAfter adjusting the scroll-ability of the quality selector, I think it makes more sense to replicate the behavior of the existing audio selector and hide the selector after the selection is made.focusexit
event triggers. It may be preferable to hide the quality selector when a selection is made more like the other quality selectors on mobile, but I am divided since the dash quality selector tends to be tall enough that it needs to be able to be scroll-able.