Skip to content
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

Added a class for when slider is "sliding" #1385

Merged
merged 1 commit into from
Aug 4, 2014

Conversation

Akkuma
Copy link
Contributor

@Akkuma Akkuma commented Jul 30, 2014

If you've used YouTube their volume control "expands/collapses" on hover and to guarantee the collapse doesn't occur until the user let's go a sliding class is required.

@mmcc
Copy link
Member

mmcc commented Aug 1, 2014

Thank you for the PR! I follow what you're referring to about the YouTube player, but you lost me with the rest of the description. What are we trying to guarantee? Just that no slider will collapse while a user is in the process of manipulating it? Is that an issue in this case sense we don't collapse the main slider unless there's no mouse activity and the volume slider doesn't collapse at all?

@Akkuma
Copy link
Contributor Author

Akkuma commented Aug 3, 2014

Basically the following situation occurs when building out a YouTube like volume bar.

  1. Volume bar hidden by default
  2. Move mouse over hover area
  3. Volume bar appears
  4. Click on handle
  5. Drag handle and in the process move mouse outside of hover area
  6. Volume bar disappears again

I've resolved 6 by setting a class called sliding when the handle is mousedown, which forces the bar to remain visible until a mouse up occurs, which removes the class and lets the transition effect to occur.

@heff
Copy link
Member

heff commented Aug 4, 2014

Makes sense to me. And looks good, thanks!

heff added a commit that referenced this pull request Aug 4, 2014
Added a class for when slider is "sliding"
@heff heff merged commit 5266755 into videojs:master Aug 4, 2014
heff added a commit that referenced this pull request Aug 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants